Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2518

As a policy writer I would like to be able to explicitly avoid pre-evaluation so that the agent does not spend time on un-necessary things



    • Type: Story
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      The current implementation (since version 3.6.0) of the evaluator includes a pre-evaluation step which attempts to resolve classes and variables in order to support dynamic inputs.

      The specific details of the pre-evaluation have changed over time but essentially when the agent component runs all agent related bundles (common and agent) attempt to resolve vars type promises. Additionally all discovered common bundles classes type promises are attempted to be resolved. Note the resolution is not a full 3 pass resolution; it's only for vars and or classes type promises and its only 1 or two passes.

      This pre-evaluation implementation detail allow for many variables and classes from different areas of policy to be used without having to explicitly actuate them from the bundlesequence or worry too much about the order in which inputs are specified. For example, all of the variables from the paths bundle are resolved and available for use even though the paths bundle is never explicitly called from the bundlesequence.

      This can also provide some level of efficiency gain since many library bundles like the paths bundle won't get 3 passes of evaluation that they don't need.

      However, most custom policies are not necessarily simple library policies. Some bundles are written to be used with parameters. Without the parameters converging the other variables could be considered wasteful. This can also pose a usability issue as deep guards can be required in order to suppress errors.

      It would be nice if there were a way to explicitly opt a bundle out (and eventually opt a bundle into) pre-evaluation.

      Some ideas:

      Use meta vars to decide if variable and class pre-eval convergence should be skipped:

      bundle agent example
          "pre_eval" string => "false";


          Issue Links



              • Assignee:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created:

                  Summary Panel