Forum: CFEngine Help
Subject: Is select_class is malfunctioning on 3.2.0?
Author: msvob...@linkedin.com
Link to topic: https://cfengine.com/forum/read.php?3,23607,23607#msg-23607

I'm trying to use the new feature introduced in 3.1.5 called select_class.

https://cfengine.com/manuals/cf3-reference.html#select_005fclass-in-classes


bundle agent update
{
vars:
        "generic_policy_location"               string  =>      
"/var/cfengine/masterfiles/generic_cf-agent_policies";

classes:
                "selection"     select_class    =>      { "mps1_primary", 
"mps2_primary" };


files:
            "/var/cfengine/inputs"
                        handle                          =>      
"multiple_mps_update_general_policies_for_cf_agent",
                        copy_from                       =>      
remote_copy_two_mps("$(generic_policy_location)","$(g.mps1)","$(g.mps2)"),
                        depth_search                    =>      recurse(inf),
                        action                          =>      immediate;

}
#########################################################
body copy_from remote_copy_two_mps(sourcedir,mps1,mps2)
{
        mps1_primary::  
                servers =>      {"$(mps1)", "$(mps2)"};

        mps2_primary::
                servers =>      {"$(mps2)", "$(mps1)"};

        source          =>      "$(sourcedir)";
        copy_backup     =>      "true";
        purge           =>      "true";
        trustkey        =>      "true";
        compare         =>      "digest";
        encrypt         =>      "true";
        verify          =>      "true";
}




Trying to execute this, i'm receiving the following error:


 $ /var/cfengine/bin/cf-promises -f failsafe.cf   
Fatal cfengine error: INTERN:format specifier for real rvalues is not ok for 
lval select_class - 1 items


 $ /var/cfengine/bin/cf-promises -f failsafe.cf -v
....
...
..
cf3>   > Parsing file /var/cfengine/inputs/update.cf
cf3> Fatal cfengine error: INTERN:format specifier for real rvalues is not ok 
for lval select_class - 1 items




So cf-promises is complaining about the select_class stanza in update.cf.  If I 
comment this out, it works.

Am I doing something wrong here that I'm missing, or should I file a bug report 
on this?

Thanks
Mike

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to