Bug 999384 - passenger-status command is not found when executed from user's ruby-1.8 application shell
passenger-status command is not found when executed from user's ruby-1.8 appl...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Michal Fojtik
libra bugs
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-21 05:03 EDT by Wei Sun
Modified: 2015-05-14 19:26 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-29 19:48:23 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Updated rubygem-passenger spec file (16.05 KB, text/x-rpm-spec)
2013-09-11 04:51 EDT, Michal Fojtik
no flags Details

  None (edit)
Description Wei Sun 2013-08-21 05:03:44 EDT
Description of problem:
When executing the passenger-status command from a user's Ruby 1.8 application shell,could not execute successfully.,it shows "bash: passenger-status: command not found"

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

How reproducible:
Always

Steps to Reproduce:
1. Create a new ruby-1.8 application
2. Log in to the application's shell as the user
3. Execute 'passenger-status'

Actual results:
[r8-wsunint.int.rhcloud.com 52146ece6cec0e434300023e]\> passenger-status
bash: passenger-status: command not found


Expected results:
Could execute this command

Additional info:
For ruby-1.9 application,can execute this command
[r9-wsunint.int.rhcloud.com 521479986cec0e84cb000031]\> passenger-status
----------- General information -----------
max      = 6
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0

----------- Application groups -----------
Comment 1 Michal Fojtik 2013-08-21 08:06:42 EDT
I did some investigation on this and I found that the 'bin/' directory is excluded in rubygem-passenger-3.0.21-5.el6oso which is the version we are currently using for ruby-1.8.

The reason, from the RPM spec file is:

# XXX: removing everything in bin until daemon_controller >= 1.0.0
%{__rm} -rf %{buildroot}%{gem_instdir}/bin

This change was brought in by Brett Lentz (CC'ing this bug) and I guess the reason was that the passenger-status and probably other commands won't work with daemon_controller < 1.0 (currently not available for RHEL).
Comment 2 Brett Lentz 2013-08-21 08:58:19 EDT
I've fixed the daemon_controller spec and will be building it for EPEL and OpenShift Online. Once that is done, we can restore the bin/ directory in the passenger package.
Comment 3 Wei Sun 2013-08-22 01:10:05 EDT
Check this bug on devenv-stage_448 ,still can reproduce this bug.
Comment 4 Michal Fojtik 2013-08-22 09:13:26 EDT
Wei Sun, we need to wait until Brett build the updated passenger package with bin/ dir enabled.
Comment 5 Brett Lentz 2013-08-22 11:48:02 EDT
Packages for rubygem-daemon_controller and rubygem-passenger are now built.
Comment 6 Wei Sun 2013-08-22 23:31:20 EDT
Check this bug on STG(devenv-stage_452),devenv-stage_452,devenv_3691.Still can reproduce this bug.

Result:
[r8-wsunstg.stg.rhcloud.com 5216cd842587c85f4a0000ef]\> passenger-status
bash: passenger-status: command not found
Comment 7 Michal Fojtik 2013-08-23 08:19:24 EDT
Wei, can you please retry? I think it takes 1d or so for mirrors to sync... The package was pushed to stable just yesterday. Also make sure you have the latest rubygem-passenger installed.
Comment 8 chunchen 2013-09-02 00:24:54 EDT
This issue is reproduced and met "Phusion Passenger doesn't seem to be running" errors on devenv_3734, please refer to the following results:

1. Run "passenger-status" directly
1) SSH into instance and check the rubygem-passenger version
rubygem-passenger-3.0.21-5.el6oso.x86_64
2) Create a ruby-1.8 app and ssh into this app to execute "passenger-status"
\> passenger-status
bash: passenger-status: command not found

2. Run "passenger-status" after gem install "passenger"
1) Create a ruby-1.8 app and ssh into this app
2) Install "passenger" by gem
\> gem install passenger
Building native extensions.  This could take a while...
Successfully installed daemon_controller-1.1.5
Successfully installed passenger-4.0.14
2 gems installed
Installing ri documentation for daemon_controller-1.1.5...
Installing ri documentation for passenger-4.0.14...
Installing RDoc documentation for daemon_controller-1.1.5...
Installing RDoc documentation for passenger-4.0.14...
3) Execute "passenger-status"
\> passenger-status
*** Phusion Passenger: no passenger_native_support.so found for the current Ruby interpreter. Downloading precompiled binary from the Phusion server (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)...
cp /var/lib/openshift/52240346f80f2e7353000288/.gem/gems/passenger-4.0.14/download_cache/rubyext-ruby-1.8.7-x86_64-linux.tar.gz /tmp/passenger-native-support-1iroydr/rubyext-ruby-1.8.7-x86_64-linux.tar.gz
# tar xzf rubyext-ruby-1.8.7-x86_64-linux.tar.gz
# rm -f rubyext-ruby-1.8.7-x86_64-linux.tar.gz
Checking whether downloaded binary is usable...
# /usr/bin/ruby -I. test.rb
Binary is usable.
# mkdir -p /var/lib/openshift/52240346f80f2e7353000288/.gem/gems/passenger-4.0.14/buildout/ruby/ruby-1.8.7-x86_64-linux
# cd /var/lib/openshift/52240346f80f2e7353000288/.gem/gems/passenger-4.0.14/buildout/ruby/ruby-1.8.7-x86_64-linux
# Installing passenger_native_support.so
ERROR: Phusion Passenger doesn't seem to be running.
Comment 9 Michal Fojtik 2013-09-09 12:15:21 EDT
The update should be now pushed, could you please re-test?
Comment 10 Michal Fojtik 2013-09-09 12:29:05 EDT
chunsen:

The script should be now installed in '/usr/share/rubygems/gems/passenger-3.0.21/bin/passenger-status'.

I'll work on adding this to $OPENSHIFT_RUBY_PATH_ELEMENT tomorrow morning so this command will become available without specifying the whole path.
Comment 11 Michal Fojtik 2013-09-10 04:06:23 EDT
So after some investigation, the passenger-status command is not the right one :(

[root@ip-10-242-66-32 ~]# /usr/share/rubygems/gems/passenger-3.0.21/bin/passenger-status

/usr/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem passenger (>= 0) (Gem::LoadError)
	from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
	from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
	from /usr/share/rubygems/gems/passenger-3.0.21/bin/passenger-status:18

This is because the 'passenger-status' script is just a runner for the real script:

if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
  version = $1
  ARGV.shift
end

gem 'passenger', version
load Gem.bin_path('passenger', 'passenger-status', version
Comment 12 Brett Lentz 2013-09-10 12:46:43 EDT
Can you explain what you mean by "not the right one" ?

The passenger-status command is what ships with the passenger tarball.
Comment 13 Michal Fojtik 2013-09-10 13:12:45 EDT
rubygems basically create an 'launcher' script upon the gem install that is placed to the $PATH (/usr/bin usually)... This launcher then points to the 'original' ruby script/binary which is located in the $GEM_HOME (/usr/share/rubygems/.../passenger-xyz/bin) 

The current passenger RPM installs the launcher into $GEM_HOME and the original ('right one' ;-) file is not being installed. So this launcher points to a file which does not exists in RPM...

The 'passenger-status' command is definitely present in passenger-xyz.gem (gem unpack passenger.gem).

I'll check this out tomorrow morning as first thing.
Comment 14 Michal Fojtik 2013-09-11 04:51:53 EDT
Created attachment 796296 [details]
Updated rubygem-passenger spec file

I tried to fix this by adding a 'suffix' to the passenger commands (as they might conflict with the SCL ones...)

So for now all commands are installed into _bindir and suffixed by '-3'. We might consider using different suffix, like '-mri18' or something similar.
Comment 16 Brett Lentz 2013-10-02 17:41:18 EDT
I found the issue. Our spec file was using the wrong %gem_dir for el6.

Confirmed fixed in rubygem-passenger-3.0.21-10.el6oso.
Comment 17 Wei Sun 2013-10-08 01:24:21 EDT
Will verify this bug after rubygem-passenger is rubygem-passenger-3.0.21-10.el6oso
Comment 18 Xiaoli Tian 2013-10-09 06:50:56 EDT
(In reply to Brett Lentz from comment #16)
> I found the issue. Our spec file was using the wrong %gem_dir for el6.
> 
> Confirmed fixed in rubygem-passenger-3.0.21-10.el6oso.

On the latest devenv(devenv_3884) and latest devenv-stage(devenv-stage_488),  rubygem-passenger is still not upgraded to above version, please help double confirming: 

devenv_3874
[root@ip-10-140-13-160 ~]# rpm -qa|grep passenger
ruby193-rubygem-passenger-devel-3.0.21-2.el6_4.x86_64
ruby193-rubygem-passenger-3.0.21-2.el6_4.x86_64
ruby193-rubygem-passenger-native-libs-3.0.21-2.el6_4.x86_64
rubygem-passenger-3.0.21-7.el6oso.x86_64
rubygem-passenger-native-3.0.21-7.el6oso.x86_64
ruby193-rubygem-passenger-native-3.0.21-2.el6_4.x86_64
rubygem-passenger-native-libs-3.0.21-7.el6oso.x86_64


devenv-stage_488

[root@ip-10-204-47-115 ~]# rpm -qa|grep passenger
ruby193-rubygem-passenger-native-libs-3.0.21-2.el6_4.x86_64
rubygem-passenger-native-libs-3.0.21-6.el6oso.x86_64
ruby193-rubygem-passenger-devel-3.0.21-2.el6_4.x86_64
rubygem-passenger-3.0.21-6.el6oso.x86_64
ruby193-rubygem-passenger-native-3.0.21-2.el6_4.x86_64
ruby193-rubygem-passenger-3.0.21-2.el6_4.x86_64
rubygem-passenger-native-3.0.21-6.el6oso.x86_64
ruby193-mod_passenger-3.0.21-2.el6_4.x86_64


yum update  rubygem-passenger does not find any updates as well.
Comment 19 Brett Lentz 2013-10-10 12:02:25 EDT
The package has been synced. It should now be available in devenv.
Comment 20 Wei Sun 2013-10-11 02:05:09 EDT
Checked this bug on devenv_3886 with rubygem-passenger-3.0.21-10.el6oso.x86_64,but still got error:

1.[r8-wsundev3886.dev.rhcloud.com 525790201c0a3cb0f4000009]\> passenger-status
/usr/lib/ruby/site_ruby/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem daemon_controller (>= 1.0.0) (Gem::LoadError)
	from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:214:in `activate'
	from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:249:in `activate'
	from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `each'
	from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate'
	from /usr/lib/ruby/site_ruby/1.8/rubygems.rb:1082:in `gem'
	from /usr/bin/passenger-status:18
[r8-wsundev3886.dev.rhcloud.com 525790201c0a3cb0f4000009]\> gem list|grep passenger
passenger (3.0.21)

2.[r8-wsundev3886.dev.rhcloud.com 525790201c0a3cb0f4000009]\> /usr/lib/ruby/gems/1.8/gems/passenger-3.0.21/bin/passenger-status
----------- General information -----------
max      = 6
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0

----------- Application groups -----------
Comment 21 Brett Lentz 2013-10-11 10:36:51 EDT
'Require: rubygem-daemon_controller' was commented out for some reason.

Fixed in rubygem-passenger-3.0.21-11.el6oso
Comment 22 Steve Snodgrass 2013-10-17 10:37:22 EDT
I've encountered this bug myself.  I'd like to test the fix, but I've been googling like mad and I can't figure out what "devenv" is or how to get the updated packages.  My apologies for my ignorance of the development process.  If someone could point me to the packages or any docs about how to use devenv, I'd be grateful.
Comment 23 Brett Lentz 2013-10-17 14:56:00 EDT
(In reply to Steve Snodgrass from comment #22)
> I've encountered this bug myself.  I'd like to test the fix, but I've been
> googling like mad and I can't figure out what "devenv" is or how to get the
> updated packages.  My apologies for my ignorance of the development process.
> If someone could point me to the packages or any docs about how to use
> devenv, I'd be grateful.


Steve -

What you're seeing is a discussion of packages used to run OpenShift Online. The packages being mentioned aren't available for public consumption. These packages will eventually also be a part of a future OpenShift Enterprise release.

I'll be updating the EPEL packages to incorporate these changes, also. As soon as that happens, you'll be able to consume the EPEL version.
Comment 24 Steve Snodgrass 2013-10-17 21:45:09 EDT
OK.  Is there a different bug ID for EPEL or should I just keep following this one?
Comment 25 Wei Sun 2013-10-17 22:48:44 EDT
Check devenv_3912,rubygem-passenger is rubygem-passenger-3.0.21-10.el6oso.x86_64,will verify this bug when rubygem-passenger is rubygem-passenger-3.0.21-11.el6oso
Comment 26 Brett Lentz 2013-10-18 11:53:00 EDT
(In reply to Steve Snodgrass from comment #24)
> OK.  Is there a different bug ID for EPEL or should I just keep following
> this one?

Go ahead and continue following this bug. I'll update it when I push the new build to EPEL.
Comment 27 Xiaoli Tian 2013-10-21 05:44:34 EDT
Since it's still not ready for QE to test, move it back to Assigned.
Comment 28 Michal Fojtik 2013-10-23 09:51:56 EDT
Xiaoli: It looks to me that the changes are now available in latest devenv:

[ruby01-mfojtik.dev.rhcloud.com 5267d3fe9b1d09a7d7000027]\> passenger-status 
----------- General information -----------
max      = 3
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0

----------- Application groups -----------
Comment 29 Wei Sun 2013-10-23 20:12:18 EDT
Verified on devenv_3937 with  rubygem-passenger-3.0.21-11.el6oso.x86_64

Result:
[r8-wsundev3937.dev.rhcloud.com 526864f8ec1063a77200003d]\>  passenger-status
----------- General information -----------
max      = 3
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0

----------- Application groups -----------
Comment 30 Steve Snodgrass 2013-11-01 17:08:43 EDT
Any word on getting this in EPEL?  Even having it in epel-testing would be really helpful.
Comment 31 Brett Lentz 2013-11-07 16:34:44 EST
(In reply to Steve Snodgrass from comment #30)
> Any word on getting this in EPEL?  Even having it in epel-testing would be
> really helpful.

Here you go:
https://admin.fedoraproject.org/updates/rubygem-passenger-3.0.21-11.el6
Comment 32 Johan De Wit 2014-01-17 10:29:11 EST
Any change on promoting this version (3.0.21-11.el6) to the EPEL stable repo.

I tested everything and it works with this version on centos6.5.

The current stable version (3.0.21-5.el6) is broken, and should be replaced with the working one.
Comment 33 Troy Dawson 2014-01-17 10:48:36 EST
I've marked it as stable.  It should make it into EPEL6 stable in a day or two.  (However long it takes for stable packages to make it in.)

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