[Top][All Lists]

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

Some cfengine 2.0 oddities

From: Matt Armstrong
Subject: Some cfengine 2.0 oddities
Date: Wed, 30 Jan 2002 08:56:21 -0700
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1 (i386-debian-linux-gnu)

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:

    "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?


reply via email to

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