Hi Todd,
This indeed is a bad condition. Curious what version of the agent
your running. I think there were some performance related patches
in 3.10.
How many files are being considered during policy updates?
> QUESTION.. is all of the dynamic classes stored in memory or
> stored back to
> the cf-execd? Im guessing the latter because then cf-execd
> calling the
> second agent hands it all the bad info..
During an agent run all non persistent classes are stored in
memory. Persistent classes are stored so that they can be defined
at the start of the next agent run. Promise executions will result
in locks that are stored, but promise locks aren't classes.
> How would a guy right a policy that would enable only a SINGLE
> run of
> cf-agent and if one is already running to not SPAWN a second
> one?
There is =agent_expireafter= in =body executor control= which is
the number of minutes that an agent should be allowed to execute
without sending some data back to =cf-execd=. That won't provide a
hard limit to a single agent though. If you want a strict limit on
the number of agent processes I think a good option is to replace
the =exec_command= with a custom wrapper. From the custom wrapper
you can check to see if there is an existing agent process and
then you can choose to kill it or skip the execution (because
there is an agent already at work).
>
agent_expireafter in body executor control is the number of
minutes an agent
can execute without sending some data back to cf-execd. With the
default run
interval of 5 minutes as setting of 20 should limit the number of
concurrent
agents to ~ 4 as you say.
>
--
Nick Anderson
Doer of things, CFEngine