Project

General

Profile

Actions

Bug #3183

closed

on debian, deinstall rudder-agent doesn't remove the cron entry

Added by Fabrice FLORE-THÉBAULT almost 12 years ago. Updated almost 10 years ago.

Status:
Rejected
Priority:
2
Assignee:
Matthieu CERDA
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

after purge of rudder agent, the entry in crontab still exist:

# dpkg -l rudder-agent && tail -1 /etc/crontab 
Souhait=inconnU/Installé/suppRimé/Purgé/H=à garder
| État=Non/Installé/fichier-Config/dépaqUeté/échec-conFig/H=semi-installé/W=attend-traitement-déclenchements
|/ Err?=(aucune)/besoin Réinstallation (État,Err: majuscule=mauvais)
||/ Nom            Version        Description
+++-==============-==============-============================================
un  rudder-agent   <néant>       (aucune description n'est disponible)
0,5,10,15,20,25,30,35,40,45,50,55 * * * * root if [ ! -e /opt/rudder/etc/disable-agent -a `ps -efww | grep -E "(cf-execd|cf-agent)" | grep -E "/var/rudder/cfengine-community/bin/(cf-execd|cf-agent)" | grep -v grep | wc -l` -eq 0 ]; then /var/rudder/cfengine-community/bin/cf-agent -f failsafe.cf && /var/rudder/cfengine-community/bin/cf-agent; fi

It leads to cron errors like:

Cron <root@node> if [ ! -e /opt/rudder/etc/disable-agent -a `ps -efww | grep -E "(cf-execd|cf-agent)" | grep -E "/var/rudder/cfengine-community/bin/(cf-execd|cf-agent)" | grep -v grep | wc -l` -eq 0 ]; then /var/rudder/cfengine-community/bin/cf-agent -f failsafe.cf \&\& /var/rudder/cfengine-community/bin/cf-agent; fi (failed)

IMHO, it would be much cleaner to have a file in /etc/crond.d/ instead of an entry in /etc/crontab : its far much easier to change and clean !


Related issues 1 (0 open1 closed)

Is duplicate of Rudder - Bug #3146: remove : crontab not cleanReleasedJonathan CLARKE2013-01-16Actions
Actions #1

Updated by Fabrice FLORE-THÉBAULT almost 12 years ago

and even better: if you install rudder-agent, purge it, reinstall it, then you have a duplicate entry in /etc/crontab, then CFEngine is started twice at the same time, then cfengine processes get fighting together, then the load of the server increase, and it becomes barely usable.

Actions #2

Updated by Jonathan CLARKE almost 12 years ago

I completely agree this should be in cron.d. Thanks for pointing it out, we'll as if can fix this for 2.5.

However I'm surprised about the duplication you mention. This shouldn't happen. What versions of rudder-agent did this happen with? Was it the same one you purged and reinstalled? Can you copy paste the two exact lines here so I can check please?

Actions #3

Updated by Jonathan CLARKE almost 12 years ago

  • Status changed from New to 8
  • Assignee set to Matthieu CERDA
  • Priority changed from N/A to 2
  • Target version changed from 2.4.3 to 2.5.0~rc1

Matthieu, can you work on this please?

Actions #4

Updated by Jonathan CLARKE almost 12 years ago

  • Status changed from 8 to Rejected

It turns out this a duplicate of #3146! Thanks for the details, anyway, we'll work on this issue in the original ticket.

Actions #5

Updated by Nicolas PERRON almost 12 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #6

Updated by Benoît PECCATTE almost 10 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF