Bug 1191496

Summary: /opt/rh/cfme-gemset/vmdb/Gemfile is missing, cannot use rake tasks.
Product: Red Hat CloudForms Management Engine Reporter: Milan Falešník <mfalesni>
Component: ApplianceAssignee: Joe Vlcek <jvlcek>
Status: CLOSED ERRATA QA Contact: Jan Krocil <jkrocil>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.4.0CC: jhardy, jkrocil, jrafanie, jvlcek, xlecauch
Target Milestone: GA   
Target Release: 5.4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.4.0.0.11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-16 12:50:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milan Falešník 2015-02-11 11:54:38 UTC
Description of problem:
The /opt/rh/cfme-gemset/vmdb/Gemfile is missing, therefore preventing of running `bin/rake task` from /var/www/miq/vmdb


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

How reproducible:
always

Steps to Reproduce:
1. Go to /var/www/miq/vmdb
2. Do bin/rake evm:automate:export DOMAIN=ManageIQ EXPORT_DIR=/tmp/miq PREVIEW=false OVERWRITE=true

Actual results:
An error message appears:
/opt/rh/cfme-gemset/vmdb/Gemfile not found

Expected results:
The task works

Additional info:
The workaround for this issue is to use the Gemfile from vmdb.

cd /var/www/miq/vmdb
BUNDLE_GEMFILE=./Gemfile bin/rake my:awesome:task

I just don't know if that will work for all cases.

Comment 2 Joe Vlcek 2015-02-11 22:37:52 UTC
I have a fix for this issue submitted which the next image build
will include.

We created a sym link for the bin stubs which resulted in the
rake tasks incorrectly resolving the root directory to /opt/rh/cfme-gemset

Until the next image is available a better work around would be:

rm -rf /var/www/miq/vmdb/bin      # remove the sym-link
mkdir /var/www/miq/vmdb/bin       # create a real directory
cp /opt/rh/cfme-gemset/bin/* bin  # copy the bin stubs to the real directory

Comment 3 Joe Vlcek 2015-02-11 22:42:32 UTC
(In reply to Joe Vlcek from comment #2)
> I have a fix for this issue submitted which the next image build
> will include.
> 
> We created a sym link for the bin stubs which resulted in the
> rake tasks incorrectly resolving the root directory to /opt/rh/cfme-gemset
> 
> Until the next image is available a better work around would be:
> 
> rm -rf /var/www/miq/vmdb/bin      # remove the sym-link
> mkdir /var/www/miq/vmdb/bin       # create a real directory
> cp /opt/rh/cfme-gemset/bin/* bin  # copy the bin stubs to the real directory

Sorry, that last line is not fully correct

The work around should read:

rm -rf /var/www/miq/vmdb/bin      # remove the sym-link
mkdir /var/www/miq/vmdb/bin       # create a real directory

# copy the bin stubs to the real directory
cp /opt/rh/cfme-gemset/bin/* /var/www/miq/vmdb/bin

Comment 5 Milan Falešník 2015-03-12 13:18:15 UTC
Verified in 5.4.0.0.11, it works now.

Comment 10 errata-xmlrpc 2015-06-16 12:50:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1100.html