EXECUTIVE SUMMARY: What's needed is the ability to dynamically construct the inputs list and the bundlesequence list. Is this possible in CFEngine 3? If so, could you please demonstrate how to do it? If not, could it be made possible, please?
Getting this working is the last thing that stands between upgrading this site from CFEngine 2 to CFEngine 3 (or possibly losing them to Chef). DETAILED VERSION: On Thu, Feb 23, 2012 at 10:45 PM, Diego Zamboni <di...@zzamboni.org> wrote: > > you could use the second method described by Neil (and which I very much > prefer) of having a fixed bundlesequence, and use methods: to call the > different > bundles. Dear Diego, This site has been using CFEngine 2 for 5 years and they have a very large policy set. We're talking thousands or more of little inputs files. They do EVERYTHING in CFEngine. Their system architect teaches all their sysadmins, "It's not done until you do it in CFEngine." Their total policy set size is measured in gigabytes. They have class expressions that are wider than a line width on a 22 inch monitor. Lots of soft classes. Using methods: type processes to choose from a menu of bundlesequence lists doesn't work for them due to the large number of combinations possible. Each bundle should be tested as to whether it should be run or not. Moreover, limiting inputs to just the files containing the bundles needed would speed up the CFEngine run. (Loading the entire policy set in memory is impractical as it measures in gigabytes.) What's needed is the ability to dynamically construct the inputs list and the bundlesequence list. Here is what their systems architect wrote: > Here is my dilemma: > > * In promises.cf I will have classes get defined. > * Based on those classes I will add additional inputs. > * Each inputs file will have a separate bundle > * I need to have a dynamic bundle list that will call the main bundle in each > input file. > * I have no way of enumerating every possible combination. > > Examples: > > 1. global -> main -> linux -> debian -> apache -> www > 2. global -> main -> xen -> linux -> debian -> dom0 > 3. global -> main -> linux -> debian -> domU -> apache -> www > > My end result is that I have no way of knowing what bundlesequence I need > until all of the classes and inputs have been compiled, especially since some > classes will be determined by examining the system. That is, some hard > classes will trigger additional inputs, regardless of whatever else is going > on. > > This is close: > http://watson-wilson.ca/2011/09/dynamic-bundlesequence-in-cfengine.html > > But when I try to redefine @{bseq} on 3.2.1 it tells me that it's an > unkeepable promise. > > ---- > > Other notes: > > Perhaps use an array? Then I can push the bundle onto the array. Right before > declaring the bundlesequence push the indices into a list and bundlesequence > that list. > > Use [Aleksey's practical example from > http://www.verticalsysadmin.com/cfengine/practical_examples.tar] 0620 as a > guide? > > — _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine