Working around getindices with dynamically generated arrays in CFEngine 3

There is a known bug where getindices is unable to get the index Workaroundof a dynamically generated array until the next pass. This comes up from time to time so I thought I would post an example using a pattern shared on the CFEngine help mailing list. The policy below shows 3 working examples. They are mostly similar, example0 shows the simplest workaround, example1 and example2 in addition show ways to suppress the “Duplicate selection of value for variable” messages. (Read More)


Deep thoughts

bundle common knowledge(status)
{
  vars:
    "software" string => "$(status)", policy => "free";

    !isUsable::
      "software" string => "usable", policy => "free";

    isUsable::
      "software" string => "reusable", policy => "free";

  classes:
    "isUsable" expression => regcmp("$(software)", "usable");
    "reUsable" expression => regcmp("$(software)", "resuable");

  reports:
      Morning|Afternoon|Evening|Night::
        "Before software can be reusable it first has to be useable.",
          comment => "Ralph Johnson";
}
(Read More)


CFEngine 3.4.2 Changelog for Breakfast

Changelogs Dexter Eggsare just as important as the most important meal of the day. OK so I don’t always eat breakfast, but I do make an effort to read changelogs. CFEngine 3.4.2 was released today. (Read More)


Quick Tip: Drilling into zenoss data with zendmd

Sometimes you want to know what value zenoss has for something. The numbers sent in alerts seem to be the value that zenoss has, but the graphs are usually formatted to make more sense. 1394606080 might come in an alert, but on the graph it would show as 1.3 or 1.4G. It can cause some slight confusion when other people expect 90% of 1.4G instead of 90% of 1394606080 to be an alert threshold. (Read More)


CFEngine 3 Policy Update or How cf_promises_validated Works

Over the past several months 2 years (since 3.1.2 release, wow time flys when your having fun. I checked and 3.1.2 was released on Dec 9th 2010.) I have seen a few questions regarding how the default CFEngine policy update works, and more specifically how cf_promises_validated plays into the update process. This is my stab at describing the history and behaviour. I welcome any corrections. (Read More)