Already, I''m posting here rather than submitting a Redmine because I''m almost 100% certain there is something that I''m doing that is foolish, but alas, it is Monday after all.. :) This is on a RHEL 5.2 system with the latest patches. The default RHEL init script is failing to stop puppetd and puppetmasterd - it calls killproc as such: puppetd=${PUPPETD-/usr/sbin/puppetd} ... killproc $puppetd So.. in /etc/init.d/functions, looking at killproc, it goes something like - 1 - Did I get passed a pidfile? ( In this case, no. ) 2 - Can I find a file called ''/var/run/puppetd.pid''? ( No, because it''s in /var/run/puppet/ ) 3 - Can I use ''pidof'' to find the pid? ( No, because it''s running as ''ruby /usr/sbin/puppetd'' and pidof needs the first argument ) So it fails to find the proper pidfile and won''t stop the process. I''ve tested by moving puppetd.pid to /var/run and it works. Also manually passed the pidfile to killproc via ''killproc -p $puppetpid $puppetd'' and that works. So the only thing I can think of is that for some reason my system is running puppet as ''ruby /usr/sbin/ puppetd'', rather than just ''/usr/sbin/puppetd'' so pidof is failing. Anyone have any ideas on this? It''s easy enough to change and I can submit a redmine/patch to actually pass the pidfile, but I gather the problem is rather on my end than something in the scripts. sh --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
2008/8/25 hajducko@gmail.com <hajducko@gmail.com>:> > Already, I''m posting here rather than submitting a Redmine because I''m > almost 100% certain there is something that I''m doing that is foolish, > but alas, it is Monday after all.. :) > > This is on a RHEL 5.2 system with the latest patches.I''m running the same OS version here and /etc/init.d/puppet stop|start works fine. Same for puppetmasterd, I used the dlutter repository. Are you using a different repo? Kent --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
If you look at the process table, what does your puppetd process look like? I''m not using any repository, I''m simply using the client.init and server.init from the distribution on the Puppet site, which I used to make an RPM. -- sh On Aug 26, 8:00 am, "Kenton Brede" <kbr...@gmail.com> wrote:> 2008/8/25 hajdu...@gmail.com <hajdu...@gmail.com>: > > > > > Already, I''m posting here rather than submitting a Redmine because I''m > > almost 100% certain there is something that I''m doing that is foolish, > > but alas, it is Monday after all.. :) > > > This is on a RHEL 5.2 system with the latest patches. > > I''m running the same OS version here and /etc/init.d/puppet stop|start > works fine. Same for puppetmasterd, I used the dlutter repository. > Are you using a different repo? > Kent--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
2008/8/26 hajducko@gmail.com <hajducko@gmail.com>:> > If you look at the process table, what does your puppetd process look > like?[root@puppet ~]# ps ax|grep puppet 21836 ? Ss 0:08 /usr/bin/ruby /usr/sbin/puppetd --logdest=/var/log/puppet/puppet.log 21852 pts/0 S 0:00 /bin/bash /root/bin/chkpuppet_repo.sh 22589 ? Ss 1:01 /usr/bin/ruby /usr/sbin/puppetmasterd --logdest=/var/log/puppet/puppetmaster.log> I''m not using any repository, I''m simply using the client.init and > server.init from the distribution on the Puppet site, which I used to > make an RPM.This repo should work for you: http://people.redhat.com/dlutter/ Kent --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Also if your calling the init script from puppetd in order to restart it''s self; the way killproc uses pidof it will not kill it''s parent or grandparent processes as it uses the -o flag (unless this has changed in the last few months). On Tue, Aug 26, 2008 at 9:03 AM, Kenton Brede <kbrede@gmail.com> wrote:> > 2008/8/26 hajducko@gmail.com <hajducko@gmail.com>: >> >> If you look at the process table, what does your puppetd process look >> like? > > [root@puppet ~]# ps ax|grep puppet > 21836 ? Ss 0:08 /usr/bin/ruby /usr/sbin/puppetd > --logdest=/var/log/puppet/puppet.log > 21852 pts/0 S 0:00 /bin/bash /root/bin/chkpuppet_repo.sh > 22589 ? Ss 1:01 /usr/bin/ruby /usr/sbin/puppetmasterd > --logdest=/var/log/puppet/puppetmaster.log > > >> I''m not using any repository, I''m simply using the client.init and >> server.init from the distribution on the Puppet site, which I used to >> make an RPM. > > This repo should work for you: http://people.redhat.com/dlutter/ > > Kent > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Yeah, I just downloaded the puppet RPM''s from that repository - no joy. The init scripts are the same as those that I am using - the only difference being that I have puppet installed in a different location ( /opt/puppet/sbin rather than /usr/sbin ) and have changed my scripts accordingly. It seems to be that my processtable is running the commands as ''ruby'' rather than ''/path/to/ruby /path/to/puppetd''. The kill part of the script is falling to the logic of running ''pidof'' and pidof is failing to find a pid, unless the full path to ruby is specified in the process table. Here''s some tests. With full path: [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] (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 [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] (DEV)$ pidof -c -o $$ -o $PPID -o %PPID -x test.rb 29627 With short path to ruby: [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] (DEV)$ ps -eaf | grep test root 29635 17949 0 09:24 pts/1 00:00:00 ruby /opt/puppet/sbin/ test.rb root 29637 17872 0 09:24 pts/0 00:00:00 grep test [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] (DEV)$ pidof -c -o $$ -o $PPID -o %PPID -x test.rb [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] (DEV)$ So it seems that I''ve got to figure out how to make puppet run with the full path to ruby, rather than just ''ruby''. :) On Aug 26, 9:03 am, "Kenton Brede" <kbr...@gmail.com> wrote:> 2008/8/26 hajdu...@gmail.com <hajdu...@gmail.com>: > > > > > If you look at the process table, what does your puppetd process look > > like? > > [root@puppet ~]# ps ax|grep puppet > 21836 ? Ss 0:08 /usr/bin/ruby /usr/sbin/puppetd > --logdest=/var/log/puppet/puppet.log > 21852 pts/0 S 0:00 /bin/bash /root/bin/chkpuppet_repo.sh > 22589 ? Ss 1:01 /usr/bin/ruby /usr/sbin/puppetmasterd > --logdest=/var/log/puppet/puppetmaster.log > > > I''m not using any repository, I''m simply using the client.init and > > server.init from the distribution on the Puppet site, which I used to > > make an RPM. > > This repo should work for you:http://people.redhat.com/dlutter/ > > Kent--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
It was definitely the problem, I''m just not sure of the best method of fixing it. I changed puppetd from ''#!/usr/bin/env ruby'' to ''#!/usr/bin/ruby'' and restarted it and now the kill scripts work fine. As it turns out, there is a longer thread on this issue and it turns out that because my RPM isn''t using the install.rb functionality, it''s not replacing the shebang line with the literal path to ruby and hence, breaking it. :) On Aug 26, 9:25 am, "hajdu...@gmail.com" <hajdu...@gmail.com> wrote:> Yeah, I just downloaded the puppet RPM''s from that repository - no > joy. The init scripts are the same as those that I am using - the > only difference being that I have puppet installed in a different > location ( /opt/puppet/sbin rather than /usr/sbin ) and have changed > my scripts accordingly. > > It seems to be that my processtable is running the commands as ''ruby'' > rather than ''/path/to/ruby /path/to/puppetd''. The kill part of the > script is falling to the logic of running ''pidof'' and pidof is failing > to find a pid, unless the full path to ruby is specified in the > process table. > > Here''s some tests. > > With full path: > [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] > (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 > [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] > (DEV)$ pidof -c -o $$ -o $PPID -o %PPID -x test.rb > 29627 > > With short path to ruby: > [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] > (DEV)$ ps -eaf | grep test > root 29635 17949 0 09:24 pts/1 00:00:00 ruby /opt/puppet/sbin/ > test.rb > root 29637 17872 0 09:24 pts/0 00:00:00 grep test > [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] > (DEV)$ pidof -c -o $$ -o $PPID -o %PPID -x test.rb > > [root@ratchet1a:/var/cache/yum/dlutter-rhel5/packages/etc/rc.d/init.d] > (DEV)$ > > So it seems that I''ve got to figure out how to make puppet run with > the full path to ruby, rather than just ''ruby''. :) > > On Aug 26, 9:03 am, "Kenton Brede" <kbr...@gmail.com> wrote: > > > 2008/8/26 hajdu...@gmail.com <hajdu...@gmail.com>: > > > > If you look at the process table, what does your puppetd process look > > > like? > > > [root@puppet ~]# ps ax|grep puppet > > 21836 ? Ss 0:08 /usr/bin/ruby /usr/sbin/puppetd > > --logdest=/var/log/puppet/puppet.log > > 21852 pts/0 S 0:00 /bin/bash /root/bin/chkpuppet_repo.sh > > 22589 ? Ss 1:01 /usr/bin/ruby /usr/sbin/puppetmasterd > > --logdest=/var/log/puppet/puppetmaster.log > > > > I''m not using any repository, I''m simply using the client.init and > > > server.init from the distribution on the Puppet site, which I used to > > > make an RPM. > > > This repo should work for you:http://people.redhat.com/dlutter/ > > > Kent--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---