Forum: Cfengine Help
Subject: Re: Question on cf-agent locking
Author: ro
Link to topic: https://cfengine.com/forum/read.php?3,19505,19512#msg-19512
I believe in some instances this could be a problem - and if it's only that
unnecessary error messages are produced by child processes (e.g. apt) or
unsatisfied promises (e.g. promises that depend on a specific package that
hasn't been installed yet).
Is there any way to gracefully circumvent this problem - that is, to tell
cf-agent not to start if another cf-agent process is running?
Something like the following (pseudo-code and not going to work) comes to my
mind:
body executor control {
processes:
any::
"cf-agent" restart_class => "cfagent_not_running";
commands:
cfagent_not_running::
splaytime => "5";
schedule => { "Min00_05", "Min30_35" };
exec_command => "/usr/local/sbin/cf-agent -f
/var/cfengine/inputs/failsafe.cf && /usr/local/sbin/cf-agent";
}
Cheers,
Robert
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine