Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1514618 - OvfManager upload works fine with rails, but not within automation
Summary: OvfManager upload works fine with rails, but not within automation
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: cfme-future
Assignee: Greg McCullough
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-17 22:17 UTC by Saif Ali
Modified: 2017-12-18 18:06 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-18 18:06:53 UTC
Category: ---
Cloudforms Team: ---


Attachments (Terms of Use)

Description Saif Ali 2017-11-17 22:17:27 UTC
Description of problem:
OvfManager upload works fine with rails, but not within automation

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Saif Ali 2017-11-17 22:19:04 UTC
I did some research, found out this comments:
Redirecting STDOUT with that option appears to be new with Ruby 2.0.

So I changed code:
vi ./opt/rh/cfme-gemset/gems/rbvmomi-1.8.2/lib/rbvmomi/vim/OvfManager.rb
        #system("#{downloadCmd} | #{uploadCmd}", STDOUT => "/dev/null")
        system("#{downloadCmd} | #{uploadCmd}")

Comment 4 mkanoor 2017-11-20 20:16:27 UTC
I looked at what the gem is trying to do.
It uses a system command with the STDOUT option set to /dev/null

I created a simple Automate Method and ran it thru Simulation


# This fails
system('curl -L http://www.yahoo.com', STDOUT => "/dev/null")

# This works
# system('curl -L http://www.yahoo.com')

Trying to investigate if the Automate method closing or redirecting the STDOUT is causing this issue.

Comment 5 Jason Frey 2017-11-20 22:33:39 UTC
https://github.com/vmware/rbvmomi/pull/124

Comment 6 mkanoor 2017-11-20 22:38:38 UTC
Can you please find out on which version they need the fix on.
Is it for 5.7?

Comment 8 mkanoor 2017-11-20 23:07:32 UTC
Waiting on Jason's PR to be merged in RBVMOMI repo

Comment 13 Greg McCullough 2017-12-18 18:06:53 UTC
The PR from comment #5 has been released in the rbvmomi gem version 1.11.6


Note You need to log in before you can comment on or make changes to this bug.