I''ve got a host here where I am trying to ensure that syslog-ng is running, and not surprisingly that syslog is NOT running. My manifest has... class syslog_ng { package { "syslog-ng": name => "syslog-ng", ensure => installed; } service { "syslog": ensure => stopped, enable => false; } service { "syslog-ng" : ensure => running, enable => true, subscribe => [ Package["syslog-ng"], File["/etc/syslog-ng/syslog-ng.conf"] ]; } .... The following is appearing in the message log... Oct 15 10:10:01 gumby puppetd[3788]: Starting catalog run Oct 15 10:10:02 gumby syslog-ng[3675]: Termination requested via signal, terminating; Oct 15 10:10:02 gumby syslog-ng[3675]: syslog-ng shutting down; version=''2.1.4'' Oct 15 10:10:03 gumby syslog-ng[4091]: syslog-ng starting up; version=''2.1.4'' Oct 15 10:10:03 gumby puppetd[3788]: (//Node[test_node]/syslog_ng/Service[syslog-ng]/ensure) ensure changed ''stopped'' to ''running'' It seems to me like there might be a bug here. Puppet appears to think the syslog-ng and syslog service are the same thing and stops syslog-ng instead of syslog. If I change the name of the syslog service, like this... service { "XXXsyslog": ensure => stopped, enable => false; } then puppet does NOT stop syslog-ng. Is it doing a regex search on the first part of the service name or something and stopping when it gets a match? Doug. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Douglas Garstang <doug.garstang@gmail.com> wrote: [...]> It seems to me like there might be a bug here. Puppet appears to think > the syslog-ng and syslog service are the same thing and stops > syslog-ng instead of syslog. > If I change the name of the syslog service, like this... > > service { "XXXsyslog": > ensure => stopped, > enable => false; > } > > then puppet does NOT stop syslog-ng. Is it doing a regex search on the > first part of the service name or something and stopping when it gets > a match?I think puppet looks for the process name by default. What you want to do is use "hasstatus => true" after making sure that "service syslog status" returns a correct exit status (i.e. zero only when the service is actually running). Matthias --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
there is also a param for service called "pattern" that allows you to specify the regex that should be used to determine the process (in case one of them doesnt properly implement status) On Thu, Oct 15, 2009 at 8:53 PM, Matthias Saou < thias@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net> wrote:> > Douglas Garstang <doug.garstang@gmail.com> wrote: > > [...] > > It seems to me like there might be a bug here. Puppet appears to think > > the syslog-ng and syslog service are the same thing and stops > > syslog-ng instead of syslog. > > If I change the name of the syslog service, like this... > > > > service { "XXXsyslog": > > ensure => stopped, > > enable => false; > > } > > > > then puppet does NOT stop syslog-ng. Is it doing a regex search on the > > first part of the service name or something and stopping when it gets > > a match? > > I think puppet looks for the process name by default. What you want to > do is use "hasstatus => true" after making sure that "service syslog > status" returns a correct exit status (i.e. zero only when the service > is actually running). > > Matthias > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On Oct 15, 2009, at 3:10 PM, Dan Bode wrote:> there is also a param for service called "pattern" that allows you > to specify the regex that should be used to determine the process > (in case one of them doesnt properly implement status)This is almost certainly the issue - Puppet just looks for the service name in the process table, anywhere, if your init script doesn''t have a ''status'' option and/or you haven''t told Puppet to use it. Try specifying hasstatus => true or a pattern.> On Thu, Oct 15, 2009 at 8:53 PM, Matthias Saou <thias@spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net > > wrote: > > Douglas Garstang <doug.garstang@gmail.com> wrote: > > [...] > > It seems to me like there might be a bug here. Puppet appears to > think > > the syslog-ng and syslog service are the same thing and stops > > syslog-ng instead of syslog. > > If I change the name of the syslog service, like this... > > > > service { "XXXsyslog": > > ensure => stopped, > > enable => false; > > } > > > > then puppet does NOT stop syslog-ng. Is it doing a regex search on > the > > first part of the service name or something and stopping when it > gets > > a match? > > I think puppet looks for the process name by default. What you want to > do is use "hasstatus => true" after making sure that "service syslog > status" returns a correct exit status (i.e. zero only when the service > is actually running). > > Matthias > > > > > >-- Hoare''s Law of Large Problems: Inside every large problem is a small problem struggling to get out. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---