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

Augments file not able to define classes based on other hard classes.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 3.7.3, 3.8.2
    • Fix Version/s: 3.9.0, 3.7.4
    • Component/s: Evaluation
    • Labels:
      None

      Description

      When using the augments file to define classes I am unable to use other hard classes to base those on.

      I expected that I would be able to use any hardclass detected by the agent.

      For example anything listed in:

      cf-promises --show-classes | grep hardclass
      

      I did not test with EVERY hardclass, but I did test with a subset of classes that should be representative.

      For my easy testing I just added =services/autorun/def_classes.cf= and then
      tried to enable the =services_autorun= from =def.json= basing the class on other
      hard classes.

      #+BEGIN_SRC cfengine3
      bundle agent inventory_def_hard_classes
      {
        meta:
          "tags" slist => { "autorun" };
      
        reports:
           "my flavor: $(def.myflavor)";
           "services_autorun: Enabled"
             printfile => head_n("$(this.promise_dirname)/../../def.json", 20);
      }
      
      body printfile head_n(file, n)
      {
        file_to_print => "$(file)";
        number_of_lines => "$(n)";
      
      }
      #+END_SRC
      
      • any PASS
      #+BEGIN_EXAMPLE
      [root@hub masterfiles]# cf-agent -K
      R: my flavor: centos_6
      R: services_autorun: Enabled
      R: {
      R:   "classes": {
      R:     "services_autorun": [ "any" ]
      R:   }
      R: }
      R:
      R:
      #+END_EXAMPLE
      
      • 127_0_0_1 FAIL
      • 192_168_33_2 FAIL
      • $(sys.flavor) FAIL
      • 2_cpus FAIL
      • 64_bit FAIL
      • Yr2016 FAIL
      • am_policy_hub FAIL
      • centos FAIL
      • cfengine FAIL
      • feature_def_json_preparse FAIL
      • hub FAIL
      • mac_08_00_27_35_32_6d FAIL
      • policy_server FAIL
      • x86_64 FAIL

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10040 Kristian Amlie
                Reporter:
                a10042 Nick Anderson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel