[Bug 1060184] Re: puppet client init script pid file error
Oh, i forgot to mention. I discovered this bug on a server, and then to confirm i set up a clean install of ubuntu server (same version) in virtualbox and it shows the same problem. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to puppet in Ubuntu. https://bugs.launchpad.net/bugs/1060184 Title: puppet client init script pid file error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1060184/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1060184] Re: puppet client init script pid file error
Thank you for taking the time to report this bug and helping to make Ubuntu better. I have not managed to reproduce this on Precise using puppet 2.7.11-1ubuntu2.1. When I start puppet using "/etc/init.d/puppet start", I get /var/run/puppet/agent.pid. When I stop it using "/etc/init.d/puppet stop", the process seems to terminate correctly although the pidfile remains. This does not seem to cause a problem starting puppet again though; the pidfile gets updated as expected. "/etc/init.d/puppet restart" appears to work fine, too. Marking this bug as Incomplete for now. If you are still having problems, please post exact steps to reproduce, including exact commands used, and then change the status back to New. ** Changed in: puppet (Ubuntu) Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to puppet in Ubuntu. https://bugs.launchpad.net/bugs/1060184 Title: puppet client init script pid file error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1060184/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1060184] Re: puppet client init script pid file error
After a clean install i type #apt-get install puppet following which i change the line in /etc/default/puppet from START=no to START=yes then i join the puppet client to my puppet server using #puppetd --server servername --waitforcert 60 --test on the client side and #puppetca --sign servername on the server side then the following session can occur: root@testserv1:~# pgrep puppet root@testserv1:~# dpkg -s puppet Package: puppet Status: install ok installed Priority: optional Section: admin Installed-Size: 336 Maintainer: Ubuntu Developers Architecture: all Version: 2.7.11-1ubuntu2.1 Depends: puppet-common (= 2.7.11-1ubuntu2.1), ruby1.8 Pre-Depends: dpkg (>= 1.15.7.2) Recommends: rdoc Suggests: puppet-el, vim-puppet, etckeeper Conffiles: /etc/init.d/puppet 05404948b351469e8d56ac080f5d92fe /etc/default/puppet 9e5a0cf174ccff1af10342297b8b1bdb Description: Centralized configuration management - agent startup and compatibility scripts This package contains the startup script and compatbility scripts for the puppet agent, which is the process responsible for configuring the local node. . Puppet lets you centrally manage every important aspect of your system using a cross-platform specification language that manages all the separate elements normally aggregated in different files, like users, cron jobs, and hosts, along with obviously discrete elements like packages, services, and files. . Puppet's simple declarative specification language provides powerful classing abilities for drawing out the similarities between hosts while allowing them to be as specific as necessary, and it handles dependency and prerequisite relationships between objects clearly and explicitly. Homepage: http://projects.puppetlabs.com/projects/puppet Original-Maintainer: Puppet Package Maintainers root@testserv1:~# uname -a Linux testserv1 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux root@testserv1:~# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS" root@testserv1:~# /etc/init.d/puppet start * Starting puppet agent ...done. root@testserv1:~# pgrep puppet 8459 root@testserv1:~# /etc/init.d/puppet stop * Stopping puppet agent ...done. root@testserv1:~# pgrep puppet 8459 root@testserv1:~# /etc/init.d/puppet start * Starting puppet agent ...done. root@testserv1:~# pgrep puppet 8459 8941 root@testserv1:~# /etc/init.d/puppet stop * Stopping puppet agent ...done. root@testserv1:~# pgrep puppet 8459 8941 root@testserv1:~# /etc/init.d/puppet start * Starting puppet agent ...done. root@testserv1:~# pgrep puppet 8459 8941 9395 root@testserv1:~# pkill puppet root@testserv1:~# pgrep puppet 9395 root@testserv1:~# pkill puppet root@testserv1:~# pgrep puppet root@testserv1:~# exit as you can see, the /etc/init.d/puppet stop appears to have no effect - puppet processes remain running after it is called. the reason appears to be because the /etc/init.d/puppet file contains the line: PIDFILE="/var/run/puppet/${NAME}.pid" I assume in this case ${NAME} resolves to "puppet" therefore when it is attempting to stop puppet it searches for /var/run/puppet/puppet.pid but the agent creates /var/run/puppet/agent.pid Simply changing the line in the /etc/init.d/puppet file from "${NAME}" to "agent" should (and does) solve the problem -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to puppet in Ubuntu. https://bugs.launchpad.net/bugs/1060184 Title: puppet client init script pid file error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1060184/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1060184] Re: puppet client init script pid file error
Strange Unfortunately I didn't keep the instance of the VM I just got those results above from. Having just recreated the VM (always from a snapshot of 12.04.1 before first boot but after installation) following the same steps and before I connected it to the puppetmaster i tested and it worked just fine as you said. After connecting to the puppetmaster it continued to work just fine. I had created an puppetmaster entry for puppet's init script, but only after i discovered the problem initially and only to solve that problem. I have tested with that entry enabled and disabled so it appears to make no difference. Indeed the only difference between the two files is one (the one installed by the puppetmaster) has PIDFILE="/var/run/puppet/agent.pid" and the other (before puppetmaster changed it) had "/var/run/puppet/${NAME}.pid" (difference tracked with mercurial) So i'm now a bit confused as to how this could have happened, but it doesn't appear to be a bug as I originally thought. This is how events have progressed: 2012-10-02: - on new physical server: - detected problem - installed copy of 12.04.1 server on virtualbox for testing - took snapshot before first boot - detected same problem on VM after installation - discovered it had to do with name of pid file - reported bug 2012-10-15 - saw response - rolled VM back to snapshot above - installed puppet and produced output as seen above in my previous reply (recorded with screen and then manually tidied) - saw response - rolled VM back to snapshot above - installed puppet without joining to puppetmaster - no problem - joined to puppetmaster having commented out the entry that affects /etc/init.d/puppet - no problem - uncommented entry - /etc/init.d/puppet changed - no problem In conclusion I don't know what was causing the problem initially but whatever it was appears to have gone away. Unless an update for puppet has been released between 2nd and 15th then I can't understand how come it now works, but it does so I shan't complain. I am sorry - It seems I've been wasting your time. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to puppet in Ubuntu. https://bugs.launchpad.net/bugs/1060184 Title: puppet client init script pid file error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1060184/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1060184] Re: puppet client init script pid file error
** Changed in: puppet (Ubuntu) Status: Incomplete => Invalid -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to puppet in Ubuntu. https://bugs.launchpad.net/bugs/1060184 Title: puppet client init script pid file error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1060184/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 1060184] Re: puppet client init script pid file error
On Mon, Oct 15, 2012 at 12:44:16PM -, Matthew Malkin wrote: > I assume in this case ${NAME} resolves to "puppet" ${NAME} is set directly in the init script, two lines above, to "agent". Do you see this in your init script too? Unfortunately I can't reproduce your setup exactly since I don't have access to your puppetmaster setup. It looks like this is the only thing that is different. I tested the behaviour without connecting to a puppetmaster at all, since the agent appears to happily run even if it cannot connect to one. Can you try this, perhaps? Are you sure that your puppet manifests aren't accidentally changing puppet's own startup scripts or configuration in a way that is causing this? -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to puppet in Ubuntu. https://bugs.launchpad.net/bugs/1060184 Title: puppet client init script pid file error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1060184/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 1060184] Re: puppet client init script pid file error
Matthew Malkin <1060...@bugs.launchpad.net> writes: > the reason appears to be because the /etc/init.d/puppet file contains the > line: > PIDFILE="/var/run/puppet/${NAME}.pid" > I assume in this case ${NAME} resolves to "puppet" [...] > Simply changing the line in the /etc/init.d/puppet file from "${NAME}" > to "agent" should (and does) solve the problem There is no need to assume, that is set explicitly in the init script. What does the command 'grep ^NAME /etc/init.d/puppet' give as output in your case? In the debian packaging, it was set to "puppetd" in 0.25.5-1, but changed to "agent" in 2.6.0-1. For the ubuntu packaging, it may be different. Your bug report mentions a newer version, could you check if you have the init script that came with the package, or if it is changed, or an older version is kept when upgrading? An "md5sum /etc/init.d/puppet" may also help, if they differ. -- Stig Sandbeck Mathisen -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to puppet in Ubuntu. https://bugs.launchpad.net/bugs/1060184 Title: puppet client init script pid file error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1060184/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
Re: [Bug 1060184] Re: puppet client init script pid file error
Matthew Malkin <1060...@bugs.launchpad.net> writes: > Indeed the only difference between the two files is one (the one > installed by the puppetmaster) has PIDFILE="/var/run/puppet/agent.pid" > and the other (before puppetmaster changed it) had > "/var/run/puppet/${NAME}.pid" (difference tracked with mercurial) After setting NAME in /etc/init.d/puppet, the file /etc/default/puppet is sourced, so a NAME=puppet in /etc/default/puppet could give the reported behaviour. Apart from that, I'm out of ideas. Anyhow, thanks for a very thorough report, even if the source of the bug was not found. :) -- Stig Sandbeck Mathisen -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to puppet in Ubuntu. https://bugs.launchpad.net/bugs/1060184 Title: puppet client init script pid file error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1060184/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs