Bug 1306385

Summary: /etc/cron.hourly/miq_top_hourly calls /bin/miqtop which does not exist
Product: Red Hat CloudForms Management Engine Reporter: Jeffrey Cutter <jcutter>
Component: ApplianceAssignee: Nick Carboni <ncarboni>
Status: CLOSED ERRATA QA Contact: luke couzens <lcouzens>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: abellott, cpelland, dajohnso, jhardy, jprause, mfeifer, ncarboni, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.6.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1306430 1306433 (view as bug list) Environment:
Last Closed: 2016-06-29 15:37:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1306430, 1306433    

Description Jeffrey Cutter 2016-02-10 17:05:32 UTC
Description of problem:

/etc/cron.hourly/miq_top_hourly calls /bin/miqtop which does not exist.  /bin/miqtop.sh does exist.  On CF 3.2 this appears to break the ability for top_output.log and vmstat_output.log processes from restarting automatically hourly.

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

5.4.4.2.20151130143928_89a28ce

How reproducible:

Install a current 3.2 appliance

Steps to Reproduce:
1. view /etc/cron.hourly/miq_top_hourly
2. try to run command from last line without redirecting stdout and stderr
3. view /bin/miqtop.sh and note error there as well for creation of cron job.

Actual results:

If top or vmstat logging processes die, they do not restart.

Expected results:

If top of vmstat logging processes die, the cron job will restart them.

Additional info:

This process appears to have been reworked in 4.0.  Not sure what restarts the processes there at this point, but there's no incorrect entry in the cron file and the cron file has been renamed.

Comment 2 Nick Carboni 2016-02-10 19:55:14 UTC
For version 5.5 these services were broken out into systemd units and the timestamp functionality was left as a cron job.

Systemd allows for options to restart services if they exit with a failure state.
This change can be made for 5.5 and upstream.

For 5.4 we can fix the typo in the file, and that should fix the issue.

Comment 4 CFME Bot 2016-02-10 21:43:46 UTC
New commit detected on ManageIQ/manageiq-appliance/master:
https://github.com/ManageIQ/manageiq-appliance/commit/ec48b862022c0adfe2d5aaadd54cdcdc1ee549da

commit ec48b862022c0adfe2d5aaadd54cdcdc1ee549da
Author:     Nick Carboni <ncarboni>
AuthorDate: Wed Feb 10 14:57:13 2016 -0500
Commit:     Nick Carboni <ncarboni>
CommitDate: Wed Feb 10 14:57:13 2016 -0500

    Added Restart directive for miqtop and miqvmstat services
    
    This tells systemd to restart these services if they exit uncleanly
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1306385

 COPY/usr/lib/systemd/system/miqtop.service    | 1 +
 COPY/usr/lib/systemd/system/miqvmstat.service | 1 +
 2 files changed, 2 insertions(+)

Comment 6 Nick Carboni 2016-04-28 12:37:43 UTC
Killing the processes (kill -9) running miqtop and miqvmstat (can be found via `systemctl status <service>`) should cause them to be restarted automatically (can be seen in the logs yielded with `journalctl -u <service>`)

Comment 9 errata-xmlrpc 2016-06-29 15:37:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348