On Wed, May 18, 2011 at 7:28 AM, Michael Schwartzkopff <mi...@schwartzkopff.org> wrote: > Hi, > > I have seen some strange errors in my application. It tells me that the config > file is not available. Since no admin messed around with the file the usual > suspect is cfengine sice we roll out that file with it. > > Is it possible that cfengine while rolling out the file prohibits access to > that file for a short moment?
I don't think so. Is the config file deployed using an edit_line promise bundle, or is the file copied over from another location? If it is deployed using an edit_line promise bundle, Cfengine is not your culprit: The reference manual section "File editing in cfengine 3" reads: All file edits specified in a single edit_line bundle are handled "atomically". Cfengine edits files like this: * Cfengine makes a copy of the file you you want to edit * Cfengine makes all the edits in the copy of the file. The filename is the same as your original file with the extension .cf-after-edit appended. * After all edits are complete ... Cfengine checks to see if the new file is the same as the original one. If there are no differences ... it deletes the copy, and the original is left completely unmodified. * If there are any differences, Cfengine makes a copy of your original file with the extension .cf-before-edit (so you always have the most recent backup available), and then renames the edited version to your original filename. Because file rename is an atomic operation (guaranteed by the operating system), any application program will either see the old version of the file or the new one – there is no "window of opportunity" where a partially edited file can be seen (unless an application intentionally looks for the .cf-after-edit file). Problems during editing (such as disk-full or permission errors) are likewise detected, and Cfengine will not rename a partial file over your original. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine