Hi,

I have been using cfengine for some time now, and most of the time I had 
used just one config file with all configuration in it. Recently have 
divided cf file to multiple ones.

eg.
one with bundle agent default and second with bundle edit_line edit_file

the configuration is very similar to 
http://www.cfengine.org/manuals/cf3-solutions.html#Postfix-mail-configuration, 
except two differences: delete_lines: ".*"; and DefineIfChanged();

default.cf
[...]
  "/etc/file"
                 create  => "false",
                 edit_line => edit_file,
                 classes => DefineIfChanged("process_reload");
[...]

bundle.cf
[...]
bundle edit_line edit_sysctl_conf
{

vars:
         "ps[name]"                       string => "value";
         "parameter_name" slist => getindices("ps");

delete_lines:

   ".*";

insert_lines:

   "$(parameter_name) = $(ps[$(parameter_name)])";

}
[...]


then in commands: i have
process_reload::
     /sbin/service process restart;

The problem is, that from time to time the process is restarted by 
cfengine even though there were not changes done to the configuration. 
This is not happening all the time and it is not happening on all 
systems. I cannot reproduce the problem, because when i run it with -v 
manually, it just wont do the same thing. I mean i cannot reproduce it 
manually, the reporting emails show this problem to happen sometime.
I have checked the times when the files were modified and they were not. 
It looks like that the DefineIfChanged goes crazy sometimes. Could it 
has something to do with that bad classes evaluation?

Im using 3.1.4 version of cfengine and 3.0.4 both do the same thing, 
3.1.4 do it more often, 3.0.4 just once or twice..
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to