Forum: CFEngine Help
Subject: Make CFEngine update itself
Author: analogue
Link to topic: https://cfengine.com/forum/read.php?3,25972,25972#msg-25972
Hi,
As I'm lazy, I tried building a bundle to make CFEngine update itself.
I'm trying with cfengine-community_3.3.1 -> 3.3.2
Here's my bundle:
bundle agent local_packages
{
vars:
"pkg_name" string => "cfengine-community";
"pkg_version" string => "3.3.2";
"pkg_file" string => "$(pkg_name)_$(pkg_version)_amd64.deb";
files:
"$(def.dir_packages)/$(pkg_file)"
comment => "Copy remote package locally",
copy_from => remote_cp("$(def.dir_packages)/$(pkg_file)",
"$(sys.policy_hub)"),
classes => if_ok(canonify("package_$(pkg_file)_present"));
packages:
"$(pkg_name)"
comment => "Install or update the local package",
package_policy => "addupdate",
package_select => ">=",
package_version => "$(pkg_version)",
package_method => dpkg_version("$(def.dir_packages)"),
ifvarclass => canonify("package_$(pkg_file)_present");
}
$(def.dir_packages) is the folder containing the .deb packages
When I'm running it, it works, 3.3.2 replaces 3.3.1 locally. But now I get this
error:
# cf-promises
cf-promises: symbol lookup error: cf-promises: undefined symbol: GOALCATEGORIES
Restarting cfengine (/etc/init.d/cfengine3 restart) does not help.
But waiting helps: After 15 minutes, the error is not displayed anymore.
Am I doing something bad by making CFEngine replacing and restarting itself?
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine