Igor, body changes triggers the persistent class "checksum_alerts" as it's been discussed earlier in this list:
https://cfengine.com/forum/read.php?3,17150,17150#msg-17150 2010/8/5 Igor Goncharenko <igor.gonchare...@gmail.com>: > Hi! > > I made promise like (cf3): > > ######################################################## > > bundle agent test3_file_changes > > { > files: > > "/var/test0/test1" > changes => tripwire, > classes => if_repaired("file_changed"); > > > commands: > file_changed:: > "/var/cfengine/bin/cf-runagent -H192.168.1.1"; > > > } > > > ######################################################### > > body changes tripwire > > { > hash => "md5"; > report_changes => "all"; > update_hashes => "true"; > } > > body classes if_repaired(x) > { > promise_repaired => { "$(x)" }; > } > > > ------------------ > when file /var/test0/test1 if exist and not changed, after cf-agent: > > {skip} > cf3 Promise made by: /var/test0/test1 > cf3 ......................................................... > cf3 > cf3 -> Using literal pathtype for /var/test0/test1 > cf3 -> Handling file existence constraints on /var/test0/test1 > cf3 -> File permissions on /var/test0/test1 as promised > cf3 -> Handling file existence constraints on /var/test0/test1 > cf3 -> File permissions on /var/test0/test1 as promised > {skip} > > when file /var/test0/test1 is changed i see: > > > {skip} > cf3 -> Using literal pathtype for /var/test0/test1 > cf3 -> Handling file existence constraints on /var/test0/test1 > cf3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > cf3 ALERT: Hash (md5) for /var/test0/test1 changed! > cf3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > cf3 -> Updating cryptohash for /var/test0/test1 to > MD5=6a802695bccdbe6533f8e738b8b31b88 > cf3 -> Persisent state checksum_alerts is already in a preserved state -- 0 > minutes to go > cf3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > cf3 ALERT: Last modified time for /var/test0/test1 changed Thu Aug 5 > 13:24:01 2010 -> Thu Aug 5 13:33:27 2010 > cf3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! > cf3 -> File permissions on /var/test0/test1 as promised > cf3 -> Handling file existence constraints on /var/test0/test1 > cf3 -> File permissions on /var/test0/test1 as promised > {skip} > > > I.e. md5 of file is changed and last modified time is changed. But class > file_changed not created and, therefore, command cf-runagent dont executed. > Where i was wrong? > > > -- > --- > Igor.Goncharenko > IG100-RIPE > _______________________________________________ > Help-cfengine mailing list > Help-cfengine@cfengine.org > https://cfengine.org/mailman/listinfo/help-cfengine > -- SY, Seva Gluschenko. _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine