Forum: CFEngine Help
Subject: About cf_promises_validated
Author: neilhwatson
Link to topic: https://cfengine.com/forum/read.php?3,26590,26590#msg-26590

The cf_promises_validated file is a bit of a mystery to folks. In fact this 
topic does not exist in the reference or the tutorial.  No wonder the mystery. 
I've been skeptical of this feature since the beginning.

Originally cf_promises_validated was an empty file.  One could only determine 
if the file was new via timestamp.  This was risky because the client may use a 
different timezone than the server.  Further, should the client's copy of 
cf_promises_validated be accidentally timestamped into the future no updates 
will ever be downloaded. After some discussion is was decided that 
cf_promises_validated should have some content to allow for more reliable 
digest comparisons. Having looked at this today I believe I see a flaw in its 
execution.

The contents of cf_promises_validated is the datestamp from cf-execd during its 
run. It appears that this is updated every run even if there are no new 
masterfiles. Thus cf_promises_validated has new contents after every run.  Thus 
a failsafe that checks for this file will always proceed to check all inputs.  
The idea of caching has now been lost.

Unless I have misunderstood I believe that cf_promises_validated should be 
updated only if masterfiles are new or changed.

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

Reply via email to