Bug #5488
closed
Do not write into cf3.[hostname].runlog files used for debug or CFEngine Enterprise edition
Added by Lionel Le Folgoc about 10 years ago.
Updated over 9 years ago.
Category:
System integration
Description
Hi,
- du -sh /var/rudder/cfengine-community/
606M /var/rudder/cfengine-community/
- du -sh /var/rudder/cfengine-community/cf3.myhost.runlog
532M /var/rudder/cfengine-community/cf3.myhost.runlog
I have the (secret) wish to be able to use my systems for useful things, and adding a cronjob to clean *.runlog every minute/hour/day/week is not one of them.
Any chance they could be purged or rotated or something?
Thanks.
More information about these file can be found here: https://docs.cfengine.com/docs/3.6/guide-introduction-directory-structure.html#log-files-in-var-cfengine.
FAR note: as a workaround, you can either:
- create a symlink to /dev/null
- or create a cronjob that remove the file periodically (for ex: 0 0,12 * * * root rm -f /var/rudder/cfengine-community/*.runlog* )
I see myself doing
echo ''> /var/rudder/cfengine-community/cf3.$node.runlog
many times a week since a while.
- Status changed from New to 8
There musr be a logrotate configuration provided by rudder for this.
- Category set to 39
- Status changed from 8 to In progress
- Assignee set to Benoît PECCATTE
- Priority changed from N/A to 1 (highest)
- Target version set to 2.10.6
We more analysis of the problem, these logs don't fulfil any interesting purpose (either redondant with other agent output, or with sdtout for (interactive) debugging).
Moreover, it seems that CFEngine is in the path of removing (or at least hiding) that ouptup behind a cf-agent verbose or debug exec flag.
More to come.
- Description updated (diff)
- Target version changed from 2.10.6 to 2.11.3
- Status changed from In progress to Pending technical review
- Assignee changed from Benoît PECCATTE to Matthieu CERDA
- Pull Request set to https://github.com/Normation/rudder-packages/pull/487
- Subject changed from Limit runlogs size to Do not write into cf3.[hostname].runlog files used for debug or CFEngine Enterprise edition
- Description updated (diff)
- Status changed from Pending technical review to In progress
- Assignee changed from Matthieu CERDA to Benoît PECCATTE
The correction will take care of the files, cf3.[hostname].runlog with the following logic:
- truncate the file when agent starts (so that the file exists, if necessary for unknown or future-proof reason, but the existing big files are truncated)
- make call to function writing to that file no-op function (i.e, also take care of not opening/closing that file million time by run)
- Status changed from In progress to Pending release
- % Done changed from 0 to 100
Applied in changeset packages:commit:71ee0ad6873fd322f17dd22f329e35b9abe83cea.
Applied in changeset packages:commit:0d162099275826259638d897c79793bc4f7303de.
- Status changed from Pending release to In progress
- % Done changed from 100 to 0
- Pull Request deleted (
https://github.com/Normation/rudder-packages/pull/487)
- Status changed from In progress to Pending technical review
- Assignee changed from Benoît PECCATTE to Matthieu CERDA
- % Done changed from 0 to 100
- Pull Request set to https://github.com/Normation/rudder-packages/pull/488
- Status changed from Pending technical review to Pending release
Applied in changeset packages:commit:b39ecb80f68fa966d779db575cfb2a6f629ce1d2.
Applied in changeset packages:commit:68de4d54f31f4d5e9ea57fd8d0a5f0bf19bd6b6b.
- Status changed from Pending release to Released
This bug has been fixed in Rudder 2.11.3, which was released on the 25/09/2014.
- Category changed from 39 to System integration
Also available in: Atom
PDF