Project

General

Profile

Actions

Bug #5488

closed

Do not write into cf3.[hostname].runlog files used for debug or CFEngine Enterprise edition

Added by Lionel Le Folgoc almost 8 years ago. Updated over 7 years ago.

Status:
Released
Priority:
1
Assignee:
Matthieu CERDA
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:

Description

Hi,

  1. du -sh /var/rudder/cfengine-community/
    606M /var/rudder/cfengine-community/
  2. 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* )

Actions #1

Updated by Dennis Cabooter almost 8 years ago

+1

Actions #2

Updated by Dennis Cabooter almost 8 years ago

I see myself doing

echo ''> /var/rudder/cfengine-community/cf3.$node.runlog

many times a week since a while.

Actions #3

Updated by Benoît PECCATTE almost 8 years ago

  • Status changed from New to 8

There musr be a logrotate configuration provided by rudder for this.

Actions #4

Updated by François ARMAND almost 8 years ago

  • Category set to 39
  • Status changed from 8 to In progress
  • Assignee set to Benoît PECCATTE
  • Priority changed from N/A to 1
  • 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.

Actions #5

Updated by François ARMAND almost 8 years ago

  • Description updated (diff)
Actions #6

Updated by François ARMAND almost 8 years ago

  • Target version changed from 2.10.6 to 2.11.3
Actions #7

Updated by Benoît PECCATTE almost 8 years ago

  • 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

PR https://github.com/Normation/rudder-packages/pull/487

Be careful, the PR contains a patch, it's not easy to read in diff form.

Actions #8

Updated by François ARMAND almost 8 years ago

  • 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)

Actions #9

Updated by Benoît PECCATTE almost 8 years ago

  • Status changed from In progress to Pending release
  • % Done changed from 0 to 100

Applied in changeset packages:commit:71ee0ad6873fd322f17dd22f329e35b9abe83cea.

Actions #10

Updated by François ARMAND almost 8 years ago

Applied in changeset packages:commit:0d162099275826259638d897c79793bc4f7303de.

Actions #11

Updated by François ARMAND almost 8 years ago

  • 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)

PR https://github.com/Normation/rudder-packages/pull/487 was reverted because the deletion of existing cf3.[hostname].runlog* should be done at most once, when the package is installed.

A new PR is coming.

Actions #12

Updated by Benoît PECCATTE almost 8 years ago

  • 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
Actions #13

Updated by Benoît PECCATTE almost 8 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset packages:commit:b39ecb80f68fa966d779db575cfb2a6f629ce1d2.

Actions #14

Updated by Matthieu CERDA almost 8 years ago

Applied in changeset packages:commit:68de4d54f31f4d5e9ea57fd8d0a5f0bf19bd6b6b.

Actions #15

Updated by Vincent MEMBRÉ over 7 years ago

  • 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.

Actions #16

Updated by Benoît PECCATTE over 7 years ago

  • Category changed from 39 to System integration
Actions

Also available in: Atom PDF