CFEngine 3.5.0 - Release Candidate for Community

Posted by Mahesh Kumar
June 3, 2013

The Release Candidate of CFEngine 3.5.0 Community Edition is now available for download at:

https://cfengine.com/inside/myspace

We’re looking forward to your feedback to the changes and improvements!

Significantly improved parsing and evaluation of policies

A large number of parser and evaluation problems have been fixed. Iterating over arrays with nested lists has caused many headaches and workarounds in previous versions of CFEngine. With 3.5, many of those can disappear.

  • Policy developers get clear and consistent messages from the stricter parser.

Note: If your policy has syntactically incorrect code, then the new parser will mark those as errors. Fixing those errors should be straight forward, but we’re interested in hearing about your experience with this so that we can make this as smooth as possible and document the typical issues for the final release!

  • cf-promises allows partial check of policy - now you are not required to have `body common control` to check syntax. This will allow better integration with editors to perform automatic syntax validation.
  • `action_policy => warn` now sets `not_kept` classes, which allows you to see deeper than first order changes that might occur during **dry-runs**.
  • The new scope attribute in classes bodies allows policy writers to set non global classes based on result of a promise.

This reduces managing class naming conflicts, especially when multiple activations of a bundle may happen.

  • Significant enhancements to bundle common paths, including the ability to test with automatically defined classes.

Policy writers don’t have to maintain their own common paths locations, or hard code paths into each bundle for paths that are well known.

  • CFEngine operators benefit from a range of improvements in logging output, both to the syslog and to the standard output.

New built-in functions and capabilities

A broad range of new built-in functions simplify the coding of policies significantly and offer completely new functionality.

  • set operation functions that test for set membership and find intersections/differences:
    • every
    • none
    • some
    • intersection
    • difference
  • list functions to look up a specific element, find the list length, extract a portion of the list, reduce it to unique element, sort it, and filter it
    • nth
    • length
    • sublist
    • unique
    • sort
    • shuffle
    • filter
  • function that returns a list of all the classes that match a regular expression
    • classesmatching
  • function that converts date/time values into a formatted string
    • stftime
  • function for building a string from data, using sprintf semantics
    • format
  • function for making logical decisions in a function call based on classes
    • ifelse
  • mapping function for arrays
    • maparray
  • function for getting detailed file information
    • filestat

Improvements and simplifications for CFEngine Operators

avahi auto discovery is available now in addition to specifying a static ip. Clearer messages during the bootstrapping process makes it easier to analyze why things might not have worked.

Self-diagnostics of agent binaries via new command line option –self-diagnosics, checks the environment and state files on which CFEngine operates for consistency.

For a comprehensive list of changes in CFEngine Community, see the ChangeLog file in the package, or in the GitHub repository. Documentation for 3.5 is still work in progress in our new documentation repostiory.