Forum: CFEngine Help Subject: 3.3.0 bug in 'contain' Author: neilhwatson Link to topic: https://cfengine.com/forum/read.php?3,25519,25519#msg-25519
Having slept on this I still think I've found a 3.3.0 bug neil@ettin ~/.cfagent/inputs $ cat bug.cf body common control { bundlesequence => { "main", }; inputs => { "cfengine_stdlib.cf", }; } bundle agent main { commands: '/bin/true' contain => in_dir('/tmp/foobar'), classes => if_else('good', 'bad'); reports: good:: "True command OK."; bad:: "True command NOT OK."; } /tmp/foobar does not exist. Expected results: command will fail and define class 'bad' resulting in NOT OK report. Actual results: neil@ettin ~/.cfagent/inputs $ ../bin/cf-agent -IKf ./bug.cf -> Executing '/bin/true' ...(timeout=-678,owner=-1,group=-1) Q: ".../bin/true": Couldn't chdir to /tmp/foobar Q: ".../bin/true": !!! System error for chdir: "No such file or directory" Q: ".../bin/true": !! Couldn't open pipe to command /bin/true Q: ".../bin/true": !!! System reports error for cf_popen: "No such file or directory" Q: ".../bin/true": I: Report relates to a promise with handle "" Q: ".../bin/true": I: Made in version 'not specified' of './bug.cf' near line 17 Q: ".../bin/true": R: True command NOT OK. I: Last 7 quoted lines were generated by promiser "/bin/true" -> Completed execution of /bin/true R: True command OK. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine