Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 994326 - Fatal Installation Error: rake not found
Summary: Fatal Installation Error: rake not found
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.0.1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: Unspecified
Assignee: Mike McCune
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-07 04:27 UTC by Mike McCune
Modified: 2019-09-26 13:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike McCune 2013-08-07 04:27:00 UTC
When running katello-configure during installation of Satellite 6 with Foreman you will receive the following error in the katello-configure log file:

30731-11:21:08 Debug: Exec[foreman_migrate_db](provider=posix): Executing '/usr/bin/ruby193-rake db:migrate --trace --verbose && touch /var/lib/foreman/foreman_db_migrate_done'
130731-11:21:08 Debug: Executing '/usr/bin/ruby193-rake db:migrate --trace --verbose && touch /var/lib/foreman/foreman_db_migrate_done'
130731-11:21:08 Error: /var/tmp/sclVlBn0j: line 8: rake: command not found

There is no known workaround without modification to the puppet manifest that we use to configure Foreman.  The results of this is that Satellite 6 can not be installed.

Will be posting a patch shortly.

Comment 1 Mike McCune 2013-08-07 04:40:06 UTC
made a modified [/usr/bin/ruby193-rake] that included output of the path and 'which rake':

#!/bin/bash

COMMAND="echo $PATH && which rake &&  rake $@"
scl enable ruby193 "$COMMAND"

when ran from normal shell you see:

# /usr/bin/ruby193-rake
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
/opt/rh/ruby193/root/usr/bin/rake
rake aborted!

I'm not familiar enough with how SCL works to know how it includes commands that are not in the shell's PATH to be found as an executable but when ran from within puppet with a simple manifest:

 exec {"test_rake":
    cwd         => "/tmp",
    environment => ["HOME=/tmp"],
    command     => "/usr/bin/ruby193-rake",
    path        => "/sbin:/usr/sbin:/bin:/usr/bin",
    user        => "root";
  }

you get:

# ruby193-puppet apply repro.pp 
Notice: /Stage[main]//Exec[test_rake]/returns: /sbin:/usr/sbin:/bin:/usr/bin
Notice: /Stage[main]//Exec[test_rake]/returns: which: no rake in (/sbin:/usr/sbin:/bin:/usr/bin)
Error: /usr/bin/ruby193-rake --help returned 1 instead of one of [0]
Error: /Stage[main]//Exec[test_rake]/returns: change from notrun to 0 failed: /usr/bin/ruby193-rake --help returned 1 instead of one of [0]
Notice: Finished catalog run in 0.55 seconds

but if ran *without* the path =? ...  it runs rake just fine:

# ruby193-puppet apply repro.pp 
Notice: /Stage[main]//Exec[test_rake]/returns: executed successfully
Notice: Finished catalog run in 0.81 seconds
[root@sat6-mdp1 ~]# vim repro.pp 
[root@sat6-mdp1 ~]# ruby193-puppet apply repro.pp 
Notice: /Stage[main]//Exec[test_rake]/returns: /opt/rh/ruby193/root/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
Notice: /Stage[main]//Exec[test_rake]/returns: /opt/rh/ruby193/root/usr/bin/rake
Notice: /Stage[main]//Exec[test_rake]/returns: rake aborted!
Notice: /Stage[main]//Exec[test_rake]/returns: No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
Notice: /Stage[main]//Exec[test_rake]/returns: 
Notice: /Stage[main]//Exec[test_rake]/returns: (See full trace by running task with --trace)
Error: /usr/bin/ruby193-rake returned 1 instead of one of [0]
Error: /Stage[main]//Exec[test_rake]/returns: change from notrun to 0 failed: /usr/bin/ruby193-rake returned 1 instead of one of [0]
Notice: Finished catalog run in 0.75 seconds

Comment 3 Dominic Cleal 2013-08-07 10:54:33 UTC
I've narrowed this down to the update of scl-utils from scl-utils-20120927-2.el6.x86_64 to scl-utils-20120927-2.el6_4.6.x86_64.  Before updating my host from one to the other, I couldn't reproduce it using the example in comment #1, now I can.  I'm pretty sure this is due to the change introduced in bug #976551.

The scl tool now checks to see if the SCL is already enabled by checking the $SCLS environment variable, then doesn't run the enable script to export $PATH etc if it was already enabled.  Since we're running Puppet under the SCL (via ruby193-puppet), $SCLS is already "ruby193".  By specifying "path" in Puppet, it exports PATH and since $SCLS still contains "ruby193", the scl tool doesn't re-enable/export $PATH for the collection.

So yes, I think your fix is correct Mike, we shouldn't override $PATH.

Comment 6 Corey Welton 2013-08-07 17:52:25 UTC
QE test notes:

Install latest and greatest RHEL 6.4, then install/configure katello*

Both repo and ISO will need to be tested.

Comment 7 Corey Welton 2013-08-07 19:58:55 UTC
Additional note:  this involves foreman so of course install katello-foreman-all, etc.

Comment 8 Mike McCune 2013-08-07 22:31:34 UTC
HOTFIX:

If you wish to deploy a fix ASAP do the following:

1) Download hotfix RPMS:

# wget http://mmccune.fedorapeople.org/hotfix/994326/katello-configure-1.4.3-17.el6sat.noarch.rpm
# wget http://mmccune.fedorapeople.org/hotfix/994326/katello-configure-foreman-1.4.3-17.el6sat.noarch.rpm


2) Upgrade RPMs on your Satellite 6 host:

# rpm -Uvh katello-configure-1.4.3-17.el6sat.noarch.rpm katello-configure-foreman-1.4.3-17.el6sat.noarch.rpm

3) proceed with katello-configure as indicated in the Installation Guide

Comment 9 Corey Welton 2013-08-08 13:57:47 UTC
Verified in install from repo (cswiii) and from ISO (gkhachik). With latest RHEL packages (and specifically scl-utils), installer does not fail, and no rake "command not found" errors occur in log(s). 

QE Verified.

Comment 12 Bryan Kearney 2014-04-24 17:11:14 UTC
This was verified and delivered with MDP2. Closing it out.

Comment 13 Bryan Kearney 2014-04-24 17:12:12 UTC
This was delivered and verified with MDP2. Closing the bug.


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