On 05-04-11 16:06, no-re...@cfengine.com wrote: > Forum: Cfengine Help > Subject: Hard classes vs defined classes ? > Author: jean_luc > Link to topic: https://cfengine.com/forum/read.php?3,21345,21345#msg-21345 > > Hello Everybody, > > I'm trying to setup rather complicated infrastructure based on cfengine3 > community edition. > Following the statement: > "The bundlesequence acts like the `genetic makeup' of the configuration. In a > large configuration, you might want to have a different bundlesequence for > different classes of host, so that you can build a complete system like a > check-list from different combinations of building blocks." > > So I'm trying to build setup which looks like this: > > > body common control > { > bundlesequence => { > "update", > "garbage_collection", > "main", > "cfengine", > "main_my" > }; > > # inputs cannot be redefined ! > redhat_sample:: > inputs => { > "update.cf", > "site.cf", > "cfengine_stdlib.cf", > "my_libs.cf", > "populate_keys_ssh.cf", > "tmp_cleaner_redhat.cf" > }; > > ubuntu_sample:: > inputs => { > "update.cf", > "site.cf", > "cfengine_stdlib.cf", > "my_libs.cf", > "populate_keys_ssh.cf", > "tmp_cleaner.cf" > }; > > central_system:: > inputs => { > "update.cf", > "site.cf", > "cfengine_stdlib.cf", > "my_libs.cf", > "populate_keys_ssh.cf", > "hosts/central_systems/promises.cf" > }; > > devel:: > inputs => { > "update.cf", > "site.cf", > "cfengine_stdlib.cf", > "my_libs.cf", > "populate_keys_ssh.cf", > "hosts/devel/promises.cf" > }; > > [...] > > ... and trying to fire the cf-agent from cron with -D flag: > > 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /var/cfengine/bin/cf-execd -F > --define "central_system" > > And of course it doesn't work because -D is treated as soft class, while hard > classes works well. > Probably, I'd be able to solve the problem with some commercial version of > cf3, according to cfengine: > > > community> # Extended system discovery is only available in version Nova and > above > community> Additional hard class defined as: 64_bit > community> Additional hard class defined as: linux_2_6_28_hardened_r9v4 > community> Additional hard class defined as: linux_x86_64 > community> Additional hard class defined as: > linux_x86_64_2_6_28_hardened_r9v4 > > I am little tired with rephrasing the whole bundlesequence and looking for > right solution :-) > > My questions are: > > * shouldn't be -D classes treated as hard class ? > > * could someone propose some other organisation of the bundle sequence ? I > would like to prepare it in a way, where one Admin is unable to block all > promises with simple typo. I was hoping that using hard clasesses solves the > problem in a way that files belonging to working set of promises wouldn't be > blocked by promises under development. > Paul,
What is defined for your 'exec_command' in body executor control, eg {{{ exec_command => "$(sys.workdir)/bin/cf-agent -f failsafe.cf && $(sys.workdir)/bin/cf-agent"; }}} }}} You now use: /var/cfengine/bin/cf-execd -F --define "central_system". The hard class is only for cf-execd. So your exec_command in body executor control must be: {{{ central_system:: exec_command => "$(sys.workdir)/bin/cf-agent -f failsafe.cf && $(sys.workdir)/bin/cf-agent -Dcentral_system"; -- ******************************************************************** * Bas van der Vlies e-mail: b...@sara.nl * * SARA - Academic Computing Services Amsterdam, The Netherlands * ******************************************************************** _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine