Bug #3183
closedon debian, deinstall rudder-agent doesn't remove the cron entry
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 !
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.
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?
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?
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.
Updated by Nicolas PERRON almost 12 years ago
- Project changed from Rudder to 34
- Category deleted (
11)
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging