Just curious as to the functionality of puppet. Does Puppet ensure that a service is up and running as long as puppet is running? Ie, I want to make sure ssh is always running, if for some reason ssh get''s shut down, does puppet start it back up when it does it''s config sync run? Thanks! --------------------------------- Pinpoint customers who are looking for what you sell. _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
HARRIS Jimmy \(AXA-Tech-AU\)
2007-Jul-05 03:43 UTC
Re: Does Puppet ensure that a service is up and running?
If your service is configured to be running and Puppet sees that it''s not, it will start it. Puppet isn''t a dedicated monitoring tool though - I''d recommend Monit for that. James ________________________________ From: puppet-users-bounces@madstop.com [mailto:puppet-users-bounces@madstop.com] On Behalf Of Brent Clements Sent: Thursday, 5 July 2007 1:38 PM To: puppet-users@madstop.com Subject: [Puppet-users] Does Puppet ensure that a service is up and running? Just curious as to the functionality of puppet. Does Puppet ensure that a service is up and running as long as puppet is running? Ie, I want to make sure ssh is always running, if for some reason ssh get''s shut down, does puppet start it back up when it does it''s config sync run? Thanks! ________________________________ Pinpoint customers <http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/ sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50> who are looking for what you sell. ********************************************************************************* Important Note This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the sender immediately and delete this email. Any views expressed in this email are not necessarily the views of AXA-Tech Australia. Thank you. ********************************************************************************** _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
BUSTARRET, Jean-francois
2007-Jul-05 07:25 UTC
Re: Does Puppet ensure that a service is up andrunning?
Definitely monit + puppet. You can even have puppet monitoring that monit is running, and monit monitoring puppet... puppet : service { "monit": ensure => running, enable => true; } monit : check process puppetd with pidfile /var/run/puppet/puppetd.pid start program = "/etc/init.d/puppet start" stop program = "/etc/init.d/puppet stop" (you would have also to monitor puppetmaster) Jean-François ________________________________ De : puppet-users-bounces@madstop.com [mailto:puppet-users-bounces@madstop.com] De la part de HARRIS Jimmy (AXA-Tech-AU) Envoyé : jeudi 5 juillet 2007 05:43 À : Puppet User Discussion Objet : Re: [Puppet-users] Does Puppet ensure that a service is up andrunning? If your service is configured to be running and Puppet sees that it''s not, it will start it. Puppet isn''t a dedicated monitoring tool though - I''d recommend Monit for that. James ________________________________ From: puppet-users-bounces@madstop.com [mailto:puppet-users-bounces@madstop.com] On Behalf Of Brent Clements Sent: Thursday, 5 July 2007 1:38 PM To: puppet-users@madstop.com Subject: [Puppet-users] Does Puppet ensure that a service is up and running? Just curious as to the functionality of puppet. Does Puppet ensure that a service is up and running as long as puppet is running? Ie, I want to make sure ssh is always running, if for some reason ssh get''s shut down, does puppet start it back up when it does it''s config sync run? Thanks! ________________________________ Pinpoint customers <http://us.rd.yahoo.com/evt=48250/*http://searchmarketing.yahoo.com/arp/sponsoredsearch_v9.php?o=US2226&cmp=Yahoo&ctv=AprNI&s=Y&s2=EM&b=50> who are looking for what you sell. ********************************************************************************* Important Note This email (including any attachments) contains information which is confidential and may be subject to legal privilege. If you are not the intended recipient you must not use, distribute or copy this email. If you have received this email in error please notify the sender immediately and delete this email. Any views expressed in this email are not necessarily the views of AXA-Tech Australia. Thank you. ********************************************************************************** _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Mike Renfro
2007-Jul-05 12:35 UTC
Re: Does Puppet ensure that a service is up and running?
On 7/5/2007 2:25 AM, BUSTARRET, Jean-francois wrote:> Definitely monit + puppet. You can even have puppet monitoring that monit is running, and monit monitoring puppet... > > puppet : > service { > "monit": > ensure => running, > enable => true; > } > > monit : > check process puppetd with pidfile /var/run/puppet/puppetd.pid > start program = "/etc/init.d/puppet start" > stop program = "/etc/init.d/puppet stop" > > (you would have also to monitor puppetmaster)And if you''re not running monit, you can do it purely with cron. Mind any line breaks that may have crept in, there may be Linux-specific flags to ps, and you can adapt this for puppetmasterd, too: # Bulletproof puppetd -- if puppetd dies, cron will restart it at # the top of the hour. In the unlikely event that cron dies, puppetd # will restart it on its next run. We''re screwed if both cron and # puppetd die, though. cron { restart-puppet: command => "if [ -e /var/run/puppetd.pid ]; then ps uw -p `cat /var/run/puppetd.pid` | grep -q '' ruby /usr/sbin/puppetd'' || (rm /var/run/puppetd.pid; /etc/init.d/puppet start); fi", user => root, minute => 0, } service { cron: ensure => running, enable => true, } -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University -- renfro@tntech.edu
Lucas Di Pentima
2007-Jul-05 12:47 UTC
Re: Does Puppet ensure that a service is up and running?
Hi all, I''m new to this list and to puppet. I can make a contribution here so here I am :-) Mike Renfro escribió:> On 7/5/2007 2:25 AM, BUSTARRET, Jean-francois wrote: >> Definitely monit + puppet. You can even have puppet monitoring that monit is running, and monit monitoring puppet... >> >> puppet :[...]> # Bulletproof puppetd -- if puppetd dies, cron will restart it at > # the top of the hour. In the unlikely event that cron dies, puppetd > # will restart it on its next run. We''re screwed if both cron and > # puppetd die, though.What I''ve done in this cases is to make some simple bash script that is run from ''init'' directly, in ''respawn'' mode, adding a line in /etc/inittab similar to this: C0:respawn:2345:/usr/local/sbin/check_puppetd.sh Inside the script I can have something like: while [ 1 ] do EXPR=`ps ax | grep puppetd | grep -v grep | grep -v $0 | wc -l` if [ "$EXPR" == "0" ] then /etc/init.d/puppetd restart fi sleep 60 done If for some reason the script dies, init will re-execute it. If for some reason init dies....well, you''re screwed :-) Best regards -- Lucas Di Pentima - Santa Fe, Argentina - Jabber ID: lucas@lunix.com.ar LUNIX: Soluciones en GNU/Linux - http://www.lunix.com.ar GnuPG Public Key: http://random.sks.keyserver.penguin.de:11371/pks/lookup?op=get&search=0x6AA54FC9 Key fingerprint = BD3B 08C4 661A 8C3B 1855 740C 8F98 3FCF 6AA5 4FC9 _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
At work we run puppetmasterd and puppetd under daemontools on >200 machines and it works well. Avoids having to use monit/cron and less intrusive/more flexible than using /etc/inittab. -- Jos Backus jos at catnook.com
Quoting Jos Backus <jos@catnook.com>:> At work we run puppetmasterd and puppetd under daemontools on >200 machines > and it works well. Avoids having to use monit/cron and less intrusive/more > flexible than using /etc/inittab. >Please ignore my ignorance, but what is ''daemontools''? How does using this avoid using monit/cron? How would /etc/inittab play into this? Maybe all my questions will be answered by the first question! :) Thanks for the feedback. Mike B. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Russ Allbery
2007-Jul-05 16:50 UTC
Re: Does Puppet ensure that a service is up and running?
barsalou <barjunk@attglobal.net> writes:> Please ignore my ignorance, but what is ''daemontools''?http://cr.yp.to/daemontools.html I''m tempted to do the same thing; we already use daemontools for a ton of stuff. Although we''ll probably replace daemontools with something with a slightly saner license at some point in our environment. -- Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>
Quoting Russ Allbery <rra@stanford.edu>:> barsalou <barjunk@attglobal.net> writes: > >> Please ignore my ignorance, but what is ''daemontools''? > > http://cr.yp.to/daemontools.html > > I''m tempted to do the same thing; we already use daemontools for a ton of > stuff. Although we''ll probably replace daemontools with something with a > slightly saner license at some point in our environment. >Thanks for that. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Jordan Share
2007-Jul-05 18:38 UTC
Re: Does Puppet ensure that a service is up and running?
Russ Allbery wrote:> barsalou <barjunk@attglobal.net> writes: > >> Please ignore my ignorance, but what is ''daemontools''? > > http://cr.yp.to/daemontools.html > > I''m tempted to do the same thing; we already use daemontools for a ton of > stuff. Although we''ll probably replace daemontools with something with a > slightly saner license at some point in our environment.You might look into runit. I believe you can just use the daemontools-alike programs, without actually going so far as to replace init. http://smarden.org/runit/ Jordan
On Thu, Jul 05, 2007 at 08:48:54AM -0800, barsalou wrote:> Quoting Jos Backus <jos@catnook.com>: > >> At work we run puppetmasterd and puppetd under daemontools on >200 >> machines >> and it works well. Avoids having to use monit/cron and less >> intrusive/more >> flexible than using /etc/inittab. >> > > Please ignore my ignorance, but what is ''daemontools''? How does using this > avoid using monit/cron? How would /etc/inittab play into this?daemontools is a collection of tools for managing UNIX services. See http://cr.yp.to/daemontools.html for details. Sample run file: #!/bin/sh exec 2>&1 user=release # Allow user to control this service chown $user supervise supervise/control supervise/ok exec \ /usr/sbin/puppetmasterd \ --verbose \ --debug \ --manifest=/etc/puppet/manifests/site.pp \ --templatedir=/cc/ops/config/puppet/templates \ --logdest=/var/log/puppet/puppetmaster.log -- Jos Backus jos at catnook.com