[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: cfexecd runlog bug

From: Jason Kim
Subject: Fwd: cfexecd runlog bug
Date: Thu, 5 May 2005 12:38:56 -0400
User-agent: KMail/1.7.2

Finally able to access the bug list, so I'm resending. Still unable to get to 
the archives, so I apologize again if this is old news.

----------  Forwarded Message  ----------

Subject: cfexecd runlog bug
Date: Wednesday 04 May 2005 20:22
From: Jason Kim <address@hidden>
To: address@hidden

I know this is the wrong place to send this, but I seem to be having trouble
getting to the bug list and/or archives, hoping someone who knows something
can forward this on to the right people...

I'm new to cfengine, but I noticed that when running cfexecd in daemon mode
I'd get 2 runlog files: 'cfengine.<hostname>.runlog' and 'cfengine..runlog'.
A quick google search indicates this is a bug of some sort, but I never saw a
resolution. I've just poked around in the code (damn does my head hurt), I
think I've found the problem. If this is old news, I apologize.

In the cfexecd source (cfexecd.c) in the 'CheckOptsAndInit' function, a call
is made to 'GetNameInfo', which seems to (among other things) set 'VUQNAME'
to NUL and populate 'VSYSNAME'. Then, in 'CheckOptsAndInit', 'VUQNAME' is set
to 'VSYSNAME.nodename'.

Now if I'm understanding correctly, 'VUQNAME' is used as the hostname in the
'StartServer' function for getting locks (and therefore also setting the
runlog filename), which works for the initial 'cfexecd' lock. However, before
the lock is gotten for 'cfd', a call is made to 'ScheduleRun', which in turn
calls 'GetNameInfo', which sets 'VUQNAME' to NUL. Then the lock for 'cfd' is
gotten with an empty 'VUQNAME'.

I've attached a trivial patch that resets 'VUQNAME' whenever 'GetNameInfo' is
called. Seems to fix the problem for me.


Attachment: cfexecd.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]