Issue #12146 has been reported by Glenn Aaldering. ---------------------------------------- Bug #12146: Unable to implement upstart when starting puppet agent in default daemon mode https://projects.puppetlabs.com/issues/12146
Author: Glenn Aaldering Status: Unreviewed Priority: Normal Assignee: Category: Target version: Affected Puppet version: 2.7.9 Keywords: upstart ubuntu sysv puppet agent daemon pid fork system programs Branch: It is currently not possible to implement an upstart script when using the puppet agent in default daemon mode. The current workaround is to start the daemon with the --no-daemonize option in the upstart script. Another solution would be to create a flag in puppet like --upstart which will make use of the SIGSTOP function. After looking at the strace it seems that when starting the puppet agent in daemon mode (this is the default starting behaviour of puppet agent) the daemon seems to 'detach' and then exec more then 20 system programs before it will spawn the final process. This is no problem with SysV since that supports pid files. Upstart though currently has no support for pid files and will try to find the pid by itself. The issue though is that upstart will only go to a maximum of 2 forks. More on this can be found here: http://upstart.ubuntu.com/cookbook/#expect After discussing with masterzen on #puppet-dev he suggested me to file a bug for this since he thought this could be caused by redmine/facter. Before puppet is actually started in 'daemon' mode the puppet agent will load providers which will call system programs. Each of these calls spawns a new pid and when all these calls are done the final process is started. Since this is more then 2 forks, upstart cannot track this PID and therefore upstart is unaware of the 'daemon'. Some examples on the system program calls: * arp * which * uname * hostname * ip * ifconfig * whoami * lsb_release * lsdev small example of a working upstart script for puppet agent: description "puppet agent" start on runlevel [2345] stop on runlevel [!2345] exec /usr/bin/puppet agent --no-daemonize small example of the failing upstart script for puppet agent: description "puppet agent" start on runlevel [2345] stop on runlevel [!2345] exec /usr/bin/puppet agent This has been tested on both Ubuntu Lucid 10.04 64bits with puppet 2.7.1 and Ubuntu 12.04 64bits with puppet 2.7.9. Using upstart for puppetmaster was not tested. -- 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://projects.puppetlabs.com/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.
