Project

General

Profile

Actions

Bug #3624

closed

/etc/crontab duplicate entries on debian

Added by Fabrice FLORE-THÉBAULT over 11 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
N/A
Assignee:
-
Category:
Packaging
Target version:
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.


Related issues 1 (0 open1 closed)

Is duplicate of Rudder - Bug #3894: Rudder cron file repot error caused by "\&\&" at installation of rudder-agentReleasedJonathan CLARKE2013-08-29Actions
Actions #1

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.

Actions #2

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.

Actions #3

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

Actions #4

Updated by Nicolas PERRON over 11 years ago

  • Target version changed from 2.4.6 to 2.4.7
Actions #5

Updated by Nicolas PERRON about 11 years ago

  • Target version changed from 2.4.7 to 2.4.8
Actions #6

Updated by Nicolas PERRON about 11 years ago

I suppose that since #3013 this ticket is fixed but not sure.

Actions #7

Updated by Jonathan CLARKE about 11 years ago

  • Status changed from New to Rejected

Nicolas PERRON wrote:

I suppose that since #3013 this ticket is fixed but not sure.

I don't think you mean #3013, but because of #3894, yes.

I'll mark this as a duplicate, even though this was opened first. Thanks for the report Fabrice, sorry we couldn't find this faster!

Actions #8

Updated by Benoît PECCATTE over 9 years ago

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

Also available in: Atom PDF