Bug 510117 - crond running run-parts twice
crond running run-parts twice
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: cronie (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Marcela Mašláňová
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-07 14:36 EDT by Valdis Kletnieks
Modified: 2009-07-09 07:44 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-08 03:30:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Valdis Kletnieks 2009-07-07 14:36:46 EDT
Description of problem:
Although I have only one entry for 'cron.hourly' in /etc/crontab, it's running it twice for some reason:

% cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
00 0 * * * root run-parts /etc/cron.midnight
02 2 * * * root ionice -c3 run-parts /etc/cron.daily
42 3 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
% cat /var/log/cron
Jul  7 10:24:54 turing-police crond[2728]: (CRON) STARTUP (1.3)
Jul  7 10:24:54 turing-police crond[2728]: (CRON) INFO (running with inotify support)
Jul  7 11:01:01 turing-police CROND[14343]: (root) CMD (run-parts /etc/cron.hourly)
Jul  7 11:01:01 turing-police CROND[14344]: (root) CMD (run-parts /etc/cron.hourly)
Jul  7 11:01:01 turing-police run-parts(/etc/cron.hourly)[14343]: starting 0anacron
Jul  7 11:01:01 turing-police run-parts(/etc/cron.hourly)[14344]: starting 0anacron
Jul  7 11:01:01 turing-police run-parts(/etc/cron.hourly)[14360]: finished 0anacron
Jul  7 11:01:01 turing-police run-parts(/etc/cron.hourly)[14362]: finished 0anacron
Jul  7 11:01:01 turing-police run-parts(/etc/cron.hourly)[14343]: starting mcelog.cron
Jul  7 11:01:01 turing-police run-parts(/etc/cron.hourly)[14344]: starting mcelog.cron
Jul  7 11:01:02 turing-police run-parts(/etc/cron.hourly)[14377]: finished mcelog.cron
Jul  7 11:01:02 turing-police run-parts(/etc/cron.hourly)[14378]: finished mcelog.cron
Jul  7 12:01:01 turing-police CROND[18279]: (root) CMD (run-parts /etc/cron.hourly)
Jul  7 12:01:01 turing-police CROND[18278]: (root) CMD (run-parts /etc/cron.hourly)
Jul  7 12:01:01 turing-police run-parts(/etc/cron.hourly)[18278]: starting 0anacron
Jul  7 12:01:01 turing-police run-parts(/etc/cron.hourly)[18279]: starting 0anacron
Jul  7 12:01:01 turing-police run-parts(/etc/cron.hourly)[18299]: finished 0anacron
Jul  7 12:01:01 turing-police run-parts(/etc/cron.hourly)[18301]: finished 0anacron
Jul  7 12:01:01 turing-police run-parts(/etc/cron.hourly)[18279]: starting mcelog.cron
Jul  7 12:01:01 turing-police run-parts(/etc/cron.hourly)[18278]: starting mcelog.cron
Jul  7 12:01:01 turing-police run-parts(/etc/cron.hourly)[18316]: finished mcelog.cron
Jul  7 12:01:01 turing-police run-parts(/etc/cron.hourly)[18317]: finished mcelog.cron
% ps ax|grep 'cr[o]n'
  2728 ?        Ss     0:00 crond

One cron running, one entry in /etc/crontab, but it's getting run twice.  And it's not just a double-logging issue (note the different PIDs), I'm seeing e-mail from both mcelog.cron runs, 2 per hour.

Oddly enough, this *only* seems to affect the cron.hourly - the other run-parts calls in crontab are only run once.  Perhaps a "first entry in crontab" bug?

Not sure how long it's been doing this - I only noticed it because Bug #507026 was causing mcelog.cron to generate e-mail outputs, and my cron logs only go back to June 1.

Version-Release number of selected component (if applicable):
cronie-1.3-2.fc12.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Marcela Mašláňová 2009-07-08 03:30:47 EDT
Since F-11 are hourly executed from /etc/cron.d/0hourly and /etc/crontab is empty in default installation. 

So you need remove /etc/cron.d/0hourly job or your line:
"01 * * * * root run-parts /etc/cron.hourly"

Anyway I should document it in man pages.
Comment 2 Valdis Kletnieks 2009-07-08 13:06:59 EDT
Damn.  I must have missed that change in the release notes.
Comment 3 Marcela Mašláňová 2009-07-09 07:44:36 EDT
Damn, I didn't document enough. I'm still working so hopefully the next release will be fully documented and with release notes.

Note You need to log in before you can comment on or make changes to this bug.