Forum: Cfengine Help
Subject: Re: Cfengine Help: Re: Concatenating "inputs" from slists seems broken 
for cf-serverd
Author: schattenfell
Link to topic: https://cfengine.com/forum/read.php?3,22004,22024#msg-22024

Hello,

now I can confirm what is meant. If you want to make an efficient config where 
only the needed files and configs should be loaded you get into trouble with 
cf-serverd.

example:


body common control
{
   inputs => { @(v.inputs) };
   bundlesequence  => { @(v.bundlesequence) };
}

bundle common c
{
   classes:
      "CL_any" expression => "any";
      "CL_webserver" expression => "web1|web2";
      "CL_database" expression => "mysql";
}

bundle common v
{
   vars:

      CL_webserver::
         "cf_webserver" slist => { "webserver.cf" };
         "bs_webserver" slist  => { "webserver" };

      CL_database::
         "cf_database" slist => { "database.cf" };
         "bs_database" slist  => { "database" };

      CL_any::
         "inputs" slist => {
                                     "update.cf",
                                     "cf-serverd.cf",
                                      @(cf_webserver),
                                      @(cf_database)
                                     };

         "bundlesequence" slist  => {
                                                          "update",
                                                          "server",
                                                          @(bs_webserver),
                                                          @(bs_database)
                                                         };
}


In this scenario database server is also the policy host. The webservers are 
other dedicated servers:


root@mysql:/# /var/cfengine/bin/cf-serverd
Can't stat file "/var/cfengine/inputs/@(cf_webserver)" for parsing
 !!! System error for stat: "No such file or directory"


Is this behaviour intended? If yes I see no way, how to make a efficient 
config, that only reads the parts needed.

Best wishes
Michael

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

Reply via email to