restrictions in C-parsing of def.json

7 views
Skip to first unread message

Stefan Skoglund (lokal

unread,
Jun 13, 2016, 7:13:48 AM6/13/16
to help-cfengine
Hello.

I'm hitting an restriction with classes in def.json
(cfengine nova 3.7.3 so def.json is parsed in C) which makes me believe
that the set of usable guards is severily restricted.

Basically i believe that hard classes sourced from the environment is
unknown at parse time. Specifically i can't use this class as a guard:

---
cf-promises --show-classes|grep lokeldarn
lokeldarn_hobby_site_org source=agent,derived-from=sys.domain,hardclass
---

The solution i can see is parsing in my own code in the same way as
with the old lib/3.7/def.cf (or modify the MPF.)

Ted Zlatanov

unread,
Jun 13, 2016, 7:44:16 AM6/13/16
to help-c...@googlegroups.com
On Mon, 13 Jun 2016 13:13:43 +0200 "Stefan Skoglund (lokal" "användare)" <stefan....@agj.net> wrote:

SS> I'm hitting an restriction with classes in def.json
SS> (cfengine nova 3.7.3 so def.json is parsed in C) which makes me believe
SS> that the set of usable guards is severily restricted.

SS> Basically i believe that hard classes sourced from the environment is
SS> unknown at parse time.

This was a bug, see https://tracker.mender.io/browse/CFE-2333

It's resolved in 3.9.0 and will be fixed in the next 3.7 and 3.8
releases. There's a workaround in
https://github.com/cfengine/masterfiles/pull/700 that's already been merged.

Ted

Reply all
Reply to author
Forward
0 new messages