Forum: CFEngine Help
Subject: Re: avoiding double-runs to converge when using template operations
Author: jgreer
Link to topic: https://cfengine.com/forum/read.php?3,27428,27469#msg-27469


Be aware that all examples and policies produced by Cfengine include the 
failsafe usage as we've described.
 

That's good, but all of those assume the use of the executor, which is 
impractical when prototyping.  Isn't it much more natural to manually kick off 
the agent in that scenario?  And hasn't that been made harder by abandoning the 
ability to update policy prior to execution within an agent run?


Also, if the agent returns an error, typically from a syntax problem with 
inputs, it automatically performs a cf-agent -f failsafe.cf thus attempting to 
correct the issue. So the auto-correct feature is there but you've just missed 
the new standard operating procedure.
 

I am familiar with that feature, but at least earlier in v3's life (~2 years 
ago now), I ran into cases in which cf-promises/cf-agent detected syntax errors 
and silently terminated rather than running the followup failsafe run.  I filed 
bugs at the time, and perhaps all's better now, but since failsafe runs are 
(for me) cheap and prevent the very scary scenario of mass agent disconnection 
from the server, it's worth it to me to do an explicit failsafe run as a 
followup.


Finally this new way is more flexible. It allows for the development of 
self-contained policy files without needing an update.conf. This is especially 
useful for prototyping.
 

I don't think my proposal precludes the flexibility you describe?  If one were 
allowed the ability to run an arbitrary bundle prior to the standard 
bundlesequence in a single agent run, such that the standard bundlesequence 
read policy from $(sys.workdir) into memory, that would allow for that 
flexibility to be preserved AND for a single invocation of cf-agent to execute 
on a single revision from version control, where policy and backend managed 
file revisions might be tightly coupled.  That would allow me to trust that a 
single run of "cf-agent," anytime, on any of my systems, is safe - no need to 
remember to front it with a failsafe run.  That's something we've been able to 
trust for years, and we'd like to continue to be able to trust it blindly even 
as we make more use of templatization.

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to