Forum: Cfengine Help Subject: Re: cfengine svn1691 constant cf-promises firing? Author: matter Link to topic: https://cfengine.com/forum/read.php?3,20167,20183#msg-20183
Okay, so I am not crazy, cf-promises keeps firing with each connection. The fragment below appears on each client connection to the policy host (fragment from cf-serverd on the policy host) cf3 New connection...(from x.xx.xx.xx:sd 4) cf3 Spawning new thread... cf3 -> Promises seem to changed cf3 -> New promises detected... cf3 -> Verifying the syntax of the inputs... cf3 -> Failed to cache the state of validation cf3 !!! System error for creat: "No such file or directory" cf3 Rereading config files /var/cfengine/inputs/promises.cf.. cf3 Cfengine - 3.1.3a1 Copyright (C) Cfengine AS 2008,2010- In generic_agent.c (line 227) is where the "No such file or directory" error is coming from if (ShellCommandReturnsZero(cmd,true)) { if (MINUSF) { snprintf(filename,CF_MAXVARSIZE,"%s/state/validated_%s",CFWORKDIR,CanonifyName(VINPUTFILE)); MapName(filename); } else { snprintf(filename,CF_MAXVARSIZE,"%s/masterfiles/cf_promises_validated",CFWORKDIR); MapName(filename); } if ((fd = creat(filename,0600)) != -1) { close(fd); CfOut(cf_verbose,""," -> Caching the state of validation\n"); } else { CfOut(cf_verbose,"creat"," -> Failed to cache the state of validation\n"); } return true; It appears that the MINUSF variable is set to true if you use a "-f filename" flag, which I don't. So it is looking to create: /var/cfengine/masterfiles/cf_promises_validated I don't have that directory, so it thinks it hasn't validated the promises and tries every connection. Once I created the /var/cfengine/masterfiles directory, everything is peachy! So perhaps cfengine should create that directory if it doesn't exist? Interesting that you are moving from $(sys.workdir)/state to $(sys.workdir)/masterfiles. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine