cfengine / design-center

CFEngine community-contributed content
http://cfengine.com/
Other
80 stars 68 forks source link

slist (join) variable doesn't work with cfengine 3.6 with DC 3.6 #444

Closed keyurkapasi closed 10 years ago

keyurkapasi commented 10 years ago

We used Repository::apt::Maintain sketch for wheezy using cfengine 3.6 with design center 3.6 as well. We generate a runfile through DC interactive mode and execute that with cf-agent. While executing the file, it we get the following errors in cfengine logs

" /cfdc_aptrepo/ensure/vars: Function 'join', argument 'components' did not resolve to a variable "

Tested few more our customized sketches having 'join' function but they all have the same issue however slist variable works properly if we simply use it in insert lines but not in other functions. The same used to work in cfengine 3.5.3 with DC 3.5.

Tried to use datatype 'data' with parsejson but no success.

Could you please help us to resolve it for one sketch at least Repository::apt::Maintain.

shreyu82 commented 10 years ago

It's fixed , use 'getvalues' to gather lists of values. like as below code.... "values" slist => getvalues("cfdc_pdnsd:pdnsd.server_ip"); "ips" string => join(", ","values");

tzz commented 10 years ago

Could you show the runfile with 3.6 so we can understand the problem better? Right now I have no idea what's up.

shreyu82 commented 10 years ago

@tzz Issue fixed ..