help-cfengine
[Top][All Lists]
Advanced

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

RE: Some cfengine 2.0 oddities


From: Andrews, Martin
Subject: RE: Some cfengine 2.0 oddities
Date: Wed, 30 Jan 2002 15:39:17 -0500

I agree - I really want the cfexecd to start up when I run cfexecd. I
already sent a patch to Mark that has passes a zero ifelapsed when getting
the lock for cfexecd server mode. It seems to work nicely. I also added a
lock with a 5 minute ifelapsed for the actual cfagent runs that cfexecd and
cfservd perform (to avoid running cfagent to frequently).

The patch is attached - it also include some initial support for
windows-style file paths (sorry for the mixed-purpose patch).

Martin

> -----Original Message-----
> From: Matt Armstrong [mailto:address@hidden
> Sent: Wednesday, January 30, 2002 10:56 AM
> To: address@hidden
> Subject: Some cfengine 2.0 oddities
> 
> 
> I'm running a15, and have observed two oddities.
> 
> ----------------------------------------------------------------------
> I've got this in my /etc/crontab
> 
> 15 * * * * root /var/cfengine/bin/cfexecd -F
> 
> When I attempt to spawn cfexecd from cfagent.conf, cfexecd will never
> end up running:
> 
> processes:
>     "cfexecd -f" restart
>         "/var/cfengine/bin/cfexecd -f 
> /var/cfengine/inputs/cfagent.conf"
> 
> Why?  Because the cfexecd spawned by cfagent dies due to lock
> contention (since cfexecd is already running via cron).
> 
> This seems to violate cfengine's "heal the system" property.  I wanted
> to set up cfagent to run daily via cron for the sole purpose of
> starting up a dead cfexecd.
> 
> ----------------------------------------------------------------------
> The processes action grabs an internal lock called processes.allprocs
> when running ps.  If you set IfElapsed > 0 globally, that means that
> the processes action will usually only run once -- since a second run
> of processes, even in the same cfagent invocation, will fail because
> processes.allprocs was grabbed too recently.
> 
> This breaks cfengine 2.0's new magical ability to re-run actions that
> need to after certain classes have been defined.
> 
> I also personally ran into this when my update.conf's processes action
> caused cfagent.conf's processes action to be silently skipped in all
> cases.  (I've set up update.conf's processes: action to kill cfenvd,
> cfexecd, etc. if new copies of them are copied from the master
> server.  Since update.conf grabs processes.allprocs, cfagent will
> never end up re-starting those daemons.)
> 
> So now I do
> 
>     actionsequence = ( processes.IfElapsed0 )
> 
> But this sets IfElapsed to 0 for all actions under processes:, not
> just processes.allprocs.
> 
> I think that processes.allprocs should have a hard coded IfElapsed of
> 0.  Agreed?
> 
> 
> -- 
> matt
> 
> _______________________________________________
> Help-cfengine mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-cfengine
> 

Attachment: nt2.patch
Description: Binary data


reply via email to

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