Actions
Bug #3624
closed/etc/crontab duplicate entries on debian
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:
Description
Migrating from rudder-agent 2.4.4-squeeze0 (using .../rudder-agent_2.4.5-squeeze0_amd64.deb), i found duplicate /etc/crontab entries for rudder-agent on several hosts, like such:
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 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
The &&
vs. \&\&
seems to be the only difference.
Updated by Fabrice FLORE-THÉBAULT over 11 years ago
These entries were added before the upgrade of the packages.
I found these entries also after the successfull installation of rudder-agent.
Updated by Nicolas PERRON over 11 years ago
Ok, I should test a migration between 2.4.4 and 2.4.5 to confirm this bug. Thanks for reporting it
This change about && and \&\& remind me of an old bug but I can't find it.
Updated by Nicolas PERRON over 11 years ago
I've tried to reproduce it without success:
root@node1:~# dpkg -l | grep rudder ii rudder-agent 2.4.4-squeeze0 Configuration management and audit tool - agent root@node1:~# cat /etc/crontab # /etc/crontab: system-wide crontab [...] 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 root@node1:~# aptitude install rudder-agent The following packages will be upgraded: rudder-agent 1 packages upgraded, 0 newly installed, 0 to remove and 64 not upgraded. Need to get 21.9 MB of archives. After unpacking 0 B will be used. Do you want to continue? [Y/n/?] y Get:1 http://www.rudder-project.org/apt-repos/2.4.5/ squeeze/main rudder-agent amd64 2.4.5-squeeze0 [21.9 MB] Fetched 21.9 MB in 10s (2,002 kB/s) (Reading database ... 33799 files and directories currently installed.) Preparing to replace rudder-agent 2.4.4-squeeze0 (using .../rudder-agent_2.4.5-squeeze0_amd64.deb) ... Unpacking replacement rudder-agent ... Setting up rudder-agent (2.4.5-squeeze0) ... Installing new version of config file /etc/init.d/rudder-agent ... [...] Current status: 64 updates [-1]. root@node1:~# cat /etc/crontab # /etc/crontab: system-wide crontab [...] 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
Maybe I should try with older versions of Rudder 2.4
Updated by Nicolas PERRON over 11 years ago
- Target version changed from 2.4.6 to 2.4.7
Updated by Nicolas PERRON over 11 years ago
- Target version changed from 2.4.7 to 2.4.8
Updated by Nicolas PERRON over 11 years ago
I suppose that since #3013 this ticket is fixed but not sure.
Updated by Jonathan CLARKE over 11 years ago
- Status changed from New to Rejected
Updated by Benoît PECCATTE almost 10 years ago
- Project changed from 34 to Rudder
- Category set to Packaging
Actions