Project

General

Profile

Actions

Bug #3183

closed

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

Added by Fabrice FLORE-THÉBAULT over 11 years ago. Updated about 9 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

Also available in: Atom PDF