Bug 1524436 - Cron job should only restart atop if running
Summary: Cron job should only restart atop if running
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: atop
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-11 13:51 UTC by Trey Dockendorf
Modified: 2018-01-16 16:05 UTC (History)
3 users (show)

Fixed In Version: atop-2.3.0-7.el7 atop-2.3.0-8.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-16 16:05:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Trey Dockendorf 2017-12-11 13:51:35 UTC
Description of problem:

If a top is stopped then every night at midnight atop is started back up due to cron file at /etc/cron.d/atop

Version-Release number of selected component (if applicable):

2.3.0-4


How reproducible:

100% of the time

Steps to Reproduce:
1. Install atop
2. Stop atop
3. Wait till next day and atop is running again

Actual results:

Atop ends up running when it shouldn't be

Expected results:

Atop to remain stopped.


Additional info:

The change is easy, change the cron task from:

0 0 * * * root systemctl restart atop

TO:

0 0 * * * root systemctl try-restart atop

Comment 1 Trey Dockendorf 2017-12-11 13:59:07 UTC
Looks like older versions of EPEL7 atop have correct /etc/cron.d/atop.  This is from 2.1-1:

# start atop daily at midnight
0 0 * * * root /bin/systemctl try-restart atop.service > /dev/null 2>&1 || :

Comment 2 Fedora Update System 2017-12-11 18:12:54 UTC
atop-2.3.0-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-3fc29cb70f

Comment 3 Fedora Update System 2017-12-12 16:12:57 UTC
atop-2.3.0-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-3fc29cb70f

Comment 4 Fedora Update System 2017-12-27 23:58:47 UTC
atop-2.3.0-7.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Trey Dockendorf 2017-12-29 13:06:13 UTC
The cron job was not updated in 2.3.0-7.el7

[root@protocol02 ~]# cat /etc/cron.d/atop 
# daily restart of atop at midnight
0 0 * * * root systemctl restart atop

[root@protocol02 ~]# rpm -q atop
atop-2.3.0-7.el7.x86_64

Comment 6 Gwyn Ciesla 2017-12-29 15:21:24 UTC
Odd. I made a perfectly lovely patch for this, and failed to apply it.  I'll get an update out ASAP. My apologies.

Comment 7 Fedora Update System 2017-12-29 15:31:01 UTC
atop-2.3.0-8.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-6f890fd832

Comment 8 Fedora Update System 2017-12-29 21:14:14 UTC
atop-2.3.0-8.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-6f890fd832

Comment 9 Ralf Ertzinger 2017-12-31 18:34:41 UTC
The fedora packages have exactly the same issue. Should that be a different ticket, or can they just be rebuilt from the same patch?

Comment 10 Gwyn Ciesla 2018-01-02 14:50:15 UTC
It's fixed in rawhide, I'll push to 27 and 26 as well.

Comment 11 Fedora Update System 2018-01-16 16:05:38 UTC
atop-2.3.0-8.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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