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

policy_server and am_policy_hub classes should be defined before def.json is parsed so that they can be used to define other classes

    XMLWordPrintable

    Details

      Description

      We found that masterfiles-stage.sh was not getting triggered on the policy hubs because the cfengine_internal_masterfiles_stage class was not being defined.

      def.json was specifying the class like this:

      {
        "classes": { "cfengine_internal_masterfiles_stage": [ "policy_server" ] }
      }
      

      The expectation was that hosts having the policy_server class would also define cfengine_internal_masterfiles_stage in order to trigger automatic policy deployments from the configured upstream repository.

      Other hard classes like those defined for the hostname, public key, time, or system flavor already work. So the current work-around is to use one of those other classes instead. Specifically for this case we simply used any since the policy itself guards to policy_server.

      {
        "classes": { "cfengine_internal_masterfiles_stage": [ "any" ] }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              vpodzime Vratislav Podzimek
              Reporter:
              a10042 Nick Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel