Issue #1148 has been updated by hajducko.

Affected version set to 0.24.4

Just as a note for educational purposes:

1) RHEL expects pids to be in /var/run/process.pid, puppet puts them in 
/var/run/puppet
2) The pid file is not actually passed to 'killproc'
3) When you use the '#!/usr/bin/env ruby' shebang, it ends up causing the 
process table to look like the following:

puppet   15441     1  0 Aug25 ?        00:02:34 ruby 
/opt/puppet/sbin/puppetmasterd

Because RHEL could not find the correct pid file or wasn't implicitly told 
where it was, it falls to using 'pidof'.  However, pidof, for some reason, 
won't work unless the full path to ruby is in the process table.  Example tests:

Without full path:
[EMAIL PROTECTED]:/home/stha3155] (DEV)$ ps -eaf | grep test
root     29631 17949  0 09:21 pts/1    00:00:00 ruby ./test.rb
root     29633 17872  0 09:21 pts/0    00:00:00 grep test
[EMAIL PROTECTED]:/home/stha3155] (DEV)$ pidof -c -o $$ -o $PPID -o %PPID -x 
test.rb

[EMAIL PROTECTED]:/home/stha3155] (DEV)$

With full path:
[EMAIL PROTECTED]:/home/stha3155] (DEV)$ ps -eaf | grep test
root     29627 17949  0 09:20 pts/1    00:00:00 /usr/bin/ruby 
/opt/puppet/sbin/test.rb
root     29629 17872  0 09:20 pts/0    00:00:00 grep test
[EMAIL PROTECTED]:/home/stha3155] (DEV)$ pidof -c -o $$ -o $PPID -o %PPID -x 
test.rb
29627

In any case, as was noted, packaging mechanisms should be offering the 
functionality of install.rb and replacing '#!/usr/bin/env ruby' with the real 
path to the ruby binary. Or as a band-aid, just update the init scripts to pass 
the actual pid file to killproc.

----------------------------------------
Bug #1148: shebang should be '/usr/bin/env ruby'
http://reductivelabs.com/redmine/issues/show/1148

Author: do
Status: Closed
Priority: Normal
Assigned to: luke
Category: executables
Target version: 
Complexity: Trivial
Patch: None
Affected version: 0.24.4
Keywords: 


The shebang in all puppet-executables currently points at /usr/bin/ruby. While 
this might be true and the best choice for most of the unixes, it is somewhat 
undesired under Mac OS X. Here, one can have ruby installed via macports or 
fink, then ruby is in another path.

Thus it would make sense to have "/usr/bin/env ruby" as a shebang. WIth this, 
the ruby interpreted configured on the respective machine is used.



----------------------------------------
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://reductivelabs.com/redmine/my/account

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to