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

tracing provenance of hard classes for cf-agent

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.5.x
    • Component/s: Evaluation
    • Labels:
      None

      Description

      Description:

      (This was suggested by Nick Anderson and was recently asked on help-cfengine)

      It's currently easy to test for @net_x_y_z@ to see if the subnet is @x.y.z@. But there's no easy way to ask "what subnet did cf-agent detect, that ended up in the @net_x_y_z@ class."

      The core problem is that we can't trace the provenance of the "subnet" piece of knowledge, and we don't know that it determined the subnet to be @x.y.z@.

      The solution is in my opinion surprisingly simple. In addition to defining the class @net_x_y_z@, the agent should also fill in a special array:

      @sys.knowledge_trace[subnet] string => "net_x_y_z"@

      This is cheap and easy, and should not be hard to implement.

      Feature use case:

      • map hard classes to variables (often asked on help-cfengine)
      • provide a full list of the hard classes currently defined
      • structure the system knowledge better

      Current planned features:

      • implement the array suggested above

      Possible enhancements:

      • none

      Issues:

      • naming of array keys has to be systematic and not ad-hoc

      Cross feature mapping:

      • none

      Demoed for externals:

      • none

      Documentation:

      • manual update

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10025 Volker Hilsheimer (Inactive)
                Reporter:
                jiraadmin Old User (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel