| Newsgroups |
gmane.comp.sysutils.cfengine.bugs |
| Message-ID |
<[email protected]> |
Dear All,
I ran into a problem that might be related to the one mentioned by Lance.
Let me sum up my problem :
- Inform = ( on ) in cfagent.conf
- methods: one method is executed in cfagent.conf
- cfagent is run by cfexecd 'schedule = ( Min00_05 )', and by cron once per hour :
0 * * * * root /usr/sbin/cfexecd -F
- SplayTime = ( 5 )
IfElapsed = ( 10 )
ExpireAfter = ( 15 )
this results in 2 lines reported by mail every hour :
cfengine:host07: Executing method /var/cfengine/bin/cfagent -f /var/cfengine/modules/cf.homes -I -K -Z MD5=c56603ea6cddeb22e0b8d6c69cbbe31b ...(uid=-1,gid=-1)
cfengine:host07: Finished local method /var/cfengine/bin/cfagent -f /var/cfengine/modules/cf.homes -I -K -Z MD5=c56603ea6cddeb22e0b8d6c69cbbe31b processing
My goal is to avoid being informed of this too often.
In order to avoid printing these 2 lines, I think there is no other way than to turn the global 'Inform' off (which I want to avoid also).
Can anybody confirm this ?
If this is the case, I thought : ok, let's receive the email once, and only once since the output would be the same.
BUT:
- the documentation says an identical email would be sent "once per day" (my experience, and my reading of the code, show it's sent only once - can anyone confirm this also ?)
- the email is sent every hour, because :
(1) two instances of cfexecd are launched at about the same time
(2) the latest one has "nothing to report" (since the other is running => nothing promised => nothing done) and, thus, unlinks 'outputs/previous' (?!)
(3) the first one can't CompareResult() with the 'outputs/previous' file, so it sends out the same email
I can't figure out why is 'outputs/previous' unlinked if there's nothing to report ?
If my reasoning is correct, *nobody* running cfexecd by daemon and cron at the same time ever gets email...
Furthermore, I thought : ok, let's comment out the unlinking of 'outputs/previous' in the source (2.2.7), recompile, and see. I should get an email once and only once. But I observed that no email was ever sent, even if the output of cfagent was different ("Previous output is the same..." ?!)
I finally found out that FileChecksum() was not working as expected, because OpenSSL_add_all_digests() was not called around...
After I added it, cfexecd would behave as expected.
As a conclusion :
- why not keep 'outputs/previous' if CompareResult fails ?
- OpenSSL_add_all_digests() should be called in cfexecd (bug)
- is an identical mail really sent once per day ?
Maybe I wrong about all this... but then I'd love to have a clarification.