retitle 405924 puppetmaster daemon should fail to start if PID file cannot be 
properly written
Thankyou Mr Bug Control Robot.

On Sun, Jan 07, 2007 at 12:46:05PM +0000, Alex Owen wrote:
> It seemed my problem was user error... /var was full. The root user
> could still set pid files as I have 5% reserved for root on /var but
> the puppet user could not write the contents of the puppetmaster pid
> file it would seem.

> In summary my testing shows that if there is space available in
> /var/run then the current (0.20.1-1) init script works. Paul Hampson's
> statement:

> >I just tried the same procedure Alex R. Owen tried, on
> >an unstable powerpc box, and the PID file was created
> >fine, and had a PID in it, and puppetmaster stopped when
> >the init.d script told it to.

> Seems to confirm that the init scripts in version 0.20.1-1 work. I am
> therfore closing this bug as fixed in 0.20.1-1. However I am also
> going to clone this bug at the severity normal as
> pupetmasterd should fail to start if it cannot write it's PID file
> (for example in the case when /var if full !!!)

I agree, but I'm not sure that it's a bug in puppetmaster...

Amongst other things, that's common code between puppetmaster
and puppet. ^_^

The more relevant consideration is that it ought to be throwing
an exception when the disk is full, which would be caught and logged
by the rescue => detail bit. And I can confirm that works, when I typoed
the line I sent you before... ^_^

Maybe the close-file-after-executing-closure code doesn't throw
exceptions? Or they're ignored? I dunno. Need an actual Ruby programmer
for this one. ^_^

If this needs to be patched around, 

File.open(@pidfile, "r") { |f| raise "Read back different PID" if f.gets.to_i 
!= $$ }

after the File.open(@pidfile...) line would prolly do it.

But hopefully the 0.22 changes will make that all unneccessary.

-- 
-----------------------------------------------------------
Paul "TBBle" Hampson, B.Sc, LPI, MCSE
On-hiatus Asian Studies student, ANU
The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361)
[EMAIL PROTECTED]

Of course Pacman didn't influence us as kids. If it did,
we'd be running around in darkened rooms, popping pills and
listening to repetitive music.
 -- Kristian Wilson, Nintendo, Inc, 1989

License: http://creativecommons.org/licenses/by/2.1/au/
-----------------------------------------------------------

Attachment: pgp1g8C5cNbSV.pgp
Description: PGP signature

Reply via email to