Forum: Cfengine Help
Subject: diskfree a moving constant?
Author: matter
Link to topic: https://cfengine.com/forum/read.php?3,19754,19754#msg-19754
Greetings,
This is something new with 3.1.2. Consider the following snippet:
##########################################################################
body common control {
bundlesequence => { "test" };
}
##########################################################################
bundle agent test {
vars:
"cf_freespace" int => diskfree("$(sys.workdir)");
classes:
"low_space" expression => islessthan("$(cf_freespace)","20");
reports:
low_space::
"Warning: $(sys.workdir) has $(cf_freespace)KB available on
$(sys.fqhost)";
}
##########################################################################
The output I have been receiving since installing 3.1.2:
!! Redefinition of a constant scalar "cf_freespace" (was 80412 now 80404)
It seems to me that freespace is checked twice. I added policy=>"overridable".
I am not sure if this is a bug or feature.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine