I turned on reporting the other day and I''m seeing alot of these when puppet runs. Especially during times when nothing is going on (middle of the night etc) Tue Dec 11 12:34:48 -0500 2007 //base/puppet/puppet::client/Service[puppet]/ensure (notice): ensure changed ''stopped'' to ''running'' It''s also quite odd that puppet when it runs it thinks it''s not running, seems to be an existential crisis. Anyone else seen this? C -- stickm@gmail.com -==< Stick >==- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Dec 11, 2007, at 11:39 AM, Chris MacLeod wrote:> I turned on reporting the other day and I''m seeing alot of these > when puppet runs. Especially during times when nothing is going on > (middle of the night etc) > > Tue Dec 11 12:34:48 -0500 2007 //base/puppet/puppet::client/Service > [puppet]/ensure (notice): ensure changed ''stopped'' to ''running'' > > It''s also quite odd that puppet when it runs it thinks it''s not > running, seems to be an existential crisis. > > Anyone else seen this?Are you sure it''s actually stopped, and not just a failure in the init script or something? -- If there is anything the nonconformist hates worse than a conformist, it''s another nonconformist who doesn''t conform to the prevailing standard of nonconformity. --Bill Vaughan --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
I don''t think it''s stopped at all. How could puppet detect that it''s stopped and restart it if it was stopped? It just seems to be reporting that. C On 12/11/07, Luke Kanies <luke@madstop.com> wrote:> > On Dec 11, 2007, at 11:39 AM, Chris MacLeod wrote: > > > I turned on reporting the other day and I''m seeing alot of these > > when puppet runs. Especially during times when nothing is going on > > (middle of the night etc) > > > > Tue Dec 11 12:34:48 -0500 2007 //base/puppet/puppet::client/Service > > [puppet]/ensure (notice): ensure changed ''stopped'' to ''running'' > > > > It''s also quite odd that puppet when it runs it thinks it''s not > > running, seems to be an existential crisis. > > > > Anyone else seen this? > > Are you sure it''s actually stopped, and not just a failure in the > init script or something? > > -- > If there is anything the nonconformist hates worse than a conformist, > it''s another nonconformist who doesn''t conform to the prevailing > standard of nonconformity. --Bill Vaughan > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >-- stickm@gmail.com -==< Stick >==- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Chris MacLeod wrote:> I don''t think it''s stopped at all. How could puppet detect that it''s > stopped and restart it if it was stopped? It just seems to be reporting > that. > C > > On 12/11/07, Luke Kanies <luke@madstop.com> wrote: >> On Dec 11, 2007, at 11:39 AM, Chris MacLeod wrote: >> >>> I turned on reporting the other day and I''m seeing alot of these >>> when puppet runs. Especially during times when nothing is going on >>> (middle of the night etc) >>> >>> Tue Dec 11 12:34:48 -0500 2007 //base/puppet/puppet::client/Service >>> [puppet]/ensure (notice): ensure changed ''stopped'' to ''running'' >>> >>> It''s also quite odd that puppet when it runs it thinks it''s not >>> running, seems to be an existential crisis. >>> >>> Anyone else seen this? >> Are you sure it''s actually stopped, and not just a failure in the >> init script or something? >>In my experience, puppetd doesn''t seem to be capable of restarting itself through the init mechanism even when I''m trying to do it on purpose. -- Russell A. Jackson <raj@csub.edu> Network Analyst California State University, Bakersfield Iam not very happy acting pleased whenever prominent scientists overmagnify intellectual enlightenment _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Digant C Kasundra
2007-Dec-12 01:23 UTC
Re: puppet seems to be restarting itself very often
--On Tuesday, December 11, 2007 12:39:59 PM -0500 Chris MacLeod <stickm@gmail.com> wrote:> I turned on reporting the other day and I''m seeing alot of these when > puppet runs. Especially during times when nothing is going on (middle of > the night etc) > Tue Dec 11 12:34:48 -0500 2007 > //base/puppet/puppet::client/Service[puppet]/ensure (notice): ensure > changed ''stopped'' to ''running'' > > It''s also quite odd that puppet when it runs it thinks it''s not running, > seems to be an existential crisis. > > Anyone else seen this? > > CWhat does /etc/init.d/puppet status say when puppet is running? If you don''t have a status option in /etc/init.d/puppet, does your puppet service declaration provide a means of checking the status? How is your puppet service declaration written? -- Digant C Kasundra <digant@stanford.edu> Technical Lead, ITS Unix Systems and Applications, Stanford University
init.d/puppet status says it''s running (and indeed it is) my service declaration is: service { "puppet": ensure => running, enable => true, hasrestart => true, hasstatus => true, require => Package["puppet"], } I really don''t think it''s an issue that puppet isn''t running, it''s obviously running b/c the reports are being generated and if it wasn''t it wouldn''t be able to restart itself anyway. I''m more thinking there''s something in the reporting that causes that to be printed. I haven''t seen that message during a test run. I do see it in my logs. But looking at the pid numbers for each process they don''t change so I don''t think anything is actually being restarted. Perhaps a bug in how puppet/puppetmaster looks to determine if it''s running? C On 12/11/07, Digant C Kasundra <digant@stanford.edu> wrote:> > --On Tuesday, December 11, 2007 12:39:59 PM -0500 Chris MacLeod > <stickm@gmail.com> wrote: > > > I turned on reporting the other day and I''m seeing alot of these when > > puppet runs. Especially during times when nothing is going on (middle > of > > the night etc) > > Tue Dec 11 12:34:48 -0500 2007 > > //base/puppet/puppet::client/Service[puppet]/ensure (notice): ensure > > changed ''stopped'' to ''running'' > > > > It''s also quite odd that puppet when it runs it thinks it''s not running, > > seems to be an existential crisis. > > > > Anyone else seen this? > > > > C > > What does /etc/init.d/puppet status say when puppet is running? If you > don''t have a status option in /etc/init.d/puppet, does your puppet service > declaration provide a means of checking the status? How is your puppet > service declaration written? > > -- > Digant C Kasundra <digant@stanford.edu> > Technical Lead, ITS Unix Systems and Applications, Stanford University > > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >-- stickm@gmail.com -==< Stick >==- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Digant C Kasundra
2007-Dec-12 19:33 UTC
Re: puppet seems to be restarting itself very often
--On December 12, 2007 1:45:44 PM -0500 Chris MacLeod <stickm@gmail.com> wrote:> I really don''t think it''s an issue that puppet isn''t running, it''s > obviously running b/c the reports are being generated and if it wasn''t it > wouldn''t be able to restart itself anyway. > > > I''m more thinking there''s something in the reporting that causes that to > be printed. I haven''t seen that message during a test run. I do see it > in my logs. > But looking at the pid numbers for each process they don''t change so I > don''t think anything is actually being restarted. > > > Perhaps a bug in how puppet/puppetmaster looks to determine if it''s > running? > >I think when you run it by hand, puppet is able to properly determine the status of the service but when it runs as daemon, it isn''t getting that properly. Does puppet run as something other than root? -- Digant C Kasundra, Linux Tech Lead Information Technology Services, Stanford University
The following block produces the following errors... is interface working for redhat machines? Both puppetmaster and client are RHEL5 boxes interface { ''10.100.92.91'': interface => eth1, netmask => ''255.255.255.0'', onboot => true } [root@ev-agt64-91 ~]# puppetd --verbose notice: Starting Puppet client version 0.23.2 err: Could not retrieve configuration: Invalid parameter ''"netmask"'' for type ''interface'' at /etc/puppet/manifests/nodes.pp:15 ... err: Could not prefetch interface provider ''redhat'': undefined method `downcase'' for nil:NilClass err: //default/ev-agt64-91/Interface[10.100.92.91]: Failed to retrieve current state of resource: undefined method `downcase'' for nil:NilClass notice: Finished configuration run in 0.59 seconds And the interface doesn''t get configured either
On redhat (possibly others) the init scripts use `pidof -o $$ -o $PPID -o %PPID` from man pidof; -o Tells pidof to omit processes with that process id. The special pid %PPID can be used to name the parent process of the pidof program, in other words the calling shell or shell script. so /etc/init.d/puppet status is not accurate when called from puppet. Thanks Brian On 12/12/07, Digant C Kasundra <digant@stanford.edu> wrote:> > --On December 12, 2007 1:45:44 PM -0500 Chris MacLeod <stickm@gmail.com> > wrote: > > > I really don''t think it''s an issue that puppet isn''t running, it''s > > obviously running b/c the reports are being generated and if it wasn''t > it > > wouldn''t be able to restart itself anyway. > > > > > > I''m more thinking there''s something in the reporting that causes that to > > be printed. I haven''t seen that message during a test run. I do see it > > in my logs. > > But looking at the pid numbers for each process they don''t change so I > > don''t think anything is actually being restarted. > > > > > > Perhaps a bug in how puppet/puppetmaster looks to determine if it''s > > running? > > > > > > I think when you run it by hand, puppet is able to properly determine the > status of the service but when it runs as daemon, it isn''t getting that > properly. Does puppet run as something other than root? > > -- > Digant C Kasundra, Linux Tech Lead > Information Technology Services, Stanford University > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
<Derek.Whayman@barclayscapital.com>
2007-Dec-13 08:03 UTC
Re: puppet seems to be restarting itself very often
Ah yes, I remember being bitten by this pidof() issue when switching to Mongrel. We forked from David Lutterkort''s method (posted to this list a couple of months ago), which creates an init script for each puppetmasterd process. We resorted to cloning the status() function from /etc/rc.d/init.d/functions, and modifying it so that is greps for something more substantial. This was necessary on RHEL4, on RHEL5 I can see the use of pidof -o but I haven''t tested it. Anyway, that''s more of an FYI for those interested in poking around. More practically, you ought to be able to fix it by using hasstatus => false, pattern => ''puppetd'' That''ll be puppetd checking for itself, so it will always be true though, unless you run standalone (puppet --blah). So you may want to ask if you need this resource at all if you need "ensure => running" at all. Cheers, Derek ________________________________ From: puppet-users-bounces@madstop.com [mailto:puppet-users-bounces@madstop.com] On Behalf Of Brian Finney Sent: 12 December 2007 21:39 To: Puppet User Discussion Subject: Re: [Puppet-users] puppet seems to be restarting itself very often On redhat (possibly others) the init scripts use `pidof -o $$ -o $PPID -o %PPID` from man pidof; -o Tells pidof to omit processes with that process id. The special pid %PPID can be used to name the parent process of the pidof program, in other words the calling shell or shell script. so /etc/init.d/puppet status is not accurate when called from puppet. Thanks Brian On 12/12/07, Digant C Kasundra <digant@stanford.edu> wrote: --On December 12, 2007 1:45:44 PM -0500 Chris MacLeod <stickm@gmail.com> wrote: > I really don''t think it''s an issue that puppet isn''t running, it''s > obviously running b/c the reports are being generated and if it wasn''t it > wouldn''t be able to restart itself anyway. > > > I''m more thinking there''s something in the reporting that causes that to > be printed. I haven''t seen that message during a test run. I do see it > in my logs. > But looking at the pid numbers for each process they don''t change so I > don''t think anything is actually being restarted. > > > Perhaps a bug in how puppet/puppetmaster looks to determine if it''s > running? > > I think when you run it by hand, puppet is able to properly determine the status of the service but when it runs as daemon, it isn''t getting that properly. Does puppet run as something other than root? -- Digant C Kasundra, Linux Tech Lead Information Technology Services, Stanford University _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users ------------------------------------------------------------------------ For important statutory and regulatory disclosures and more information about Barclays Capital, please visit our web site at http://www.barcap.com. Internet communications are not secure and therefore the Barclays Group does not accept legal responsibility for the contents of this message. Although the Barclays Group operates anti-virus programmes, it does not accept responsibility for any damage whatsoever that is caused by viruses being passed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Barclays Group. Replies to this email may be monitored by the Barclays Group for operational or business reasons. Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP. This email may relate to or be sent from other members of the Barclays Group. ------------------------------------------------------------------------ _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Wed, Dec 12, 2007 at 02:43:25PM -0500, Eugene Ventimiglia wrote:> The following block produces the following errors... is interface > working for redhat machines?0.23.2 needs patches to work. Look for "interface" keyworded bugreports in puppet''s Trac. -- Marcin Owsiany Web Systems Integrator - Guardian Unlimited ------------------------------------------------------------------ Visit Guardian Unlimited - the UK''s most popular newspaper website http://guardian.co.uk http://observer.co.uk ------------------------------------------------------------------ The Newspaper Marketing Agency Opening Up Newspapers http://www.nmauk.co.uk ------------------------------------------------------------------ This e-mail and all attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender and delete the e-mail and all attachments immediately. Do not disclose the contents to another person. You may not use the information for any purpose, or store, or copy, it in any way. Guardian News & Media Limited is not liable for any computer viruses or other material transmitted with or as part of this e-mail. You should employ virus checking software. Guardian News & Media Limited A member of Guardian Media Group PLC Registered Office Number 1 Scott Place, Manchester M3 3GG Registered in England Number 908396
On 12/13/07, Derek.Whayman@barclayscapital.com < Derek.Whayman@barclayscapital.com> wrote:> > Ah yes, I remember being bitten by this pidof() issue when switching to > Mongrel. We forked from David Lutterkort''s method (posted to this list a > couple of months ago), which creates an init script for each puppetmasterd > process. > > We resorted to cloning the status() function from > /etc/rc.d/init.d/functions, and modifying it so that is greps for something > more substantial. This was necessary on RHEL4, on RHEL5 I can see the use > of pidof -o but I haven''t tested it. > > Anyway, that''s more of an FYI for those interested in poking around. > > More practically, you ought to be able to fix it by using > > hasstatus => false, pattern => ''puppetd'' > >This doesn''t seem to work, I''m still getting those messages in the logs. Interestingly though service puppet status reports 1 (and only 1) pid. does puppetd fork to do a configuration run and at that time the status is being checked? That''ll be puppetd checking for itself, so it will always be true though,> unless you run standalone (puppet --blah). So you may want to ask if you > need this resource at all if you need "ensure => running" at all. > >I guess it''s kinda silly to ensure => running for puppetd since it''s puppetd that''s doing the checking. -- stickm@gmail.com -==< Stick >==- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 14 December 2007, Chris MacLeod wrote:> On 12/13/07, Derek.Whayman@barclayscapital.com < > > unless you run standalone (puppet --blah). So you may want to ask if you > > need this resource at all if you need "ensure => running" at all. > > I guess it''s kinda silly to ensure => running for puppetd since it''s > puppetd that''s doing the checking.It can be quite handy, if one is running puppetd from the installer to ensure that puppetd is really running. Regards, DavidS - -- The primary freedom of open source is not the freedom from cost, but the free- dom to shape software to do what you want. This freedom is /never/ exercised without cost, but is available /at all/ only by accepting the very different costs associated with open source, costs not in money, but in time and effort. - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHYuDn/Pp1N6Uzh0URAuVwAJ9xAx3z4f8gU2X9d8VwOMTnhljaQwCdF8E3 a3kNS0cwPI3uJhliXZTQuWc=MyI8 -----END PGP SIGNATURE-----