Project

General

Profile

Bug #10771

check-rudder-agent doesn't purge the lmdb file when run via cron

Added by Nicolas CHARLES 4 months ago. Updated 3 months ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Target version (plugin):
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Priority:
61
Tags: Sponsored

Description

Sometimes, the check-rudder-agent task does not clean the lmdb lock file when run in cron

We've seen it twice, once on RedHat 6, once in SLESS11

There is no explanation on why however.
When ran manually, we get:

check_and_fix_cf_lock
+ MAX_CF_LOCK_SIZE=10485760
+ '[' -e /var/rudder/cfengine-community/state/cf_lock.lmdb ']'
+ '[' zLinux = zAIX ']'
++ stat -c%s /var/rudder/cfengine-community/state/cf_lock.lmdb
+ CF_LOCK_SIZE=104853504
+ '[' 104853504 -ge 10485760 ']'
+ echo_n 'WARNING: The file /var/rudder/cfengine-community/state/cf_lock.lmdb is too big (104853504 bytes), purging it...'
+ '[' zLinux = zAIX ']'
+ echo -n WARNING: The file /var/rudder/cfengine-community/state/cf_lock.lmdb is too big '(104853504' 'bytes),' purging it...
WARNING: The file /var/rudder/cfengine-community/state/cf_lock.lmdb is too big (104853504 bytes), purging it...+ clean_cf_lock_files
+ rm -f /var/rudder/cfengine-community/state/cf_lock.lmdb
+ rm -f /var/rudder/cfengine-community/state/cf_lock.lmdb.lock

lock is 10 times bigger than the maximum size !


Related issues

Related to Rudder - User story #8438: Log check-rudder-agent cron job output Released
Related to Rudder - Bug #10856: Cron service is not correctly managed by technique common New

Associated revisions

Revision 157035bd
Added by Benoît PECCATTE 4 months ago

Fixes #10771: check-rudder-agent doesn't purge the lmdb file when run via cron

History

#1 Updated by François ARMAND 4 months ago

  • Tags set to Sponsored
  • User visibility set to Operational - other Techniques | Technique editor | Rudder settings
  • Priority changed from 0 to 61

We at least need more log in rudder-agent to try to understand what is happening.

#2 Updated by Benoît PECCATTE 4 months ago

#3 Updated by Benoît PECCATTE 4 months ago

  • Status changed from New to Rejected

We cannot reproduce, with #8438 we should have more info next time.
Feel free to reopen if you have more information.

#4 Updated by Nicolas CHARLES 4 months ago

  • Related to Bug #10856: Cron service is not correctly managed by technique common added

#5 Updated by Benoît PECCATTE 4 months ago

  • Status changed from Rejected to New

Reopening, we found the bug

#6 Updated by Benoît PECCATTE 4 months ago

This is because the check is set -e, if the check fails (for example when restarting cfengine), it stops.

#7 Updated by Benoît PECCATTE 4 months ago

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE

#8 Updated by Benoît PECCATTE 4 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/1353

#9 Updated by Benoît PECCATTE 3 months ago

  • Status changed from Pending technical review to Pending release

#10 Updated by Alexis MOUSSET 3 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.21 which was released today.

Also available in: Atom PDF