Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-2497 As an MPF user I want a consistent way to override controls without modifying any of the files distribued with the MPF
  3. CFE-2326

I would like to be able to alter variables defined by the aguments_file (def.json) and have components pick up those changes automatically.

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Platform:
      Linux
    • Steps to reproduce:
      Manual steps provided

      Description

      When only the augments file (def.json) is altered in /var/cfengine/masterfiles on the hub the change is seen and /var/cfengine/masterfiles/cf_promises_validated is updated however daemons do not seem to reload their configuration.

      For example if I set mailto or mailfrom in def.json:

      {
        "vars": {
          "mailto": "nick@cmdln.org",
          "mailfrom": "nick@cmdln.org"
        }
      }
      

      The daemons continue sending email to the mailto defined in def.mailto at the time the daemon was started. The new setting is only picked up after re-starting cf-execd.

      I Merged https://github.com/cfengine/masterfiles/pull/928 to master and 3.11.x for 3.11.0. I do not currently plan to backport this to 3.10.x

      Basically I just collect all the control variables for each component (using simple regex def.control_component_.*) and then render the seralized version of the data into state. If the file containing the serialized data under state is repaired then either cf-serverd or cf-monitord will be restarted.

      Special Notes:
      1) it's only compatible with 3.10.0 and greater. And it's leveraging the minimum_version macro so that if installed on a 3.7.x host it will not blow it up.
      2) cf-execd is not restarted automatically. I haven't tested enough that doing so won't kill the executing agent leaving the host unmanaged.
      3) Variables used by control bodies that do not match the simple pattern are not yet covered. They can likely be added via tag matching.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10042 Nick Anderson
                Reporter:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel