Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 730044

Summary: matahari-host shutdown/reboot not graceful
Product: Red Hat Enterprise Linux 6 Reporter: Dave Johnson <dajohnso>
Component: matahariAssignee: Andrew Beekhof <abeekhof>
Status: CLOSED ERRATA QA Contact: Dave Johnson <dajohnso>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: matahari-maint, rbryant, whayutin
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: matahari-0.4.2-7.el6 Doc Type: Bug Fix
Doc Text:
No description required
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 11:39:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Johnson 2011-08-11 15:45:25 UTC
Description of problem:
=======================
Not sure what the requirement is but I was expecting that the matahari host agent shutdown and reboot methods would gracefully shutdown the OS, it doesn't.  It seems to do a immediate halt (and then if reboot, begins to boot)

Version-Release number of selected component (if applicable):
=============================================================
matahari-host-0.4.2-5.el6.x86_64

How reproducible:
=================
100%

Steps to Reproduce:
===================
1.  on a vm, install matahari broker and host
2.  start broker and agent
3.  issue shutdown or reboot to matahari host agent 
4.  see vm, it halts immediately

Comment 2 Andrew Beekhof 2011-08-15 06:17:29 UTC
We use the standard reboot() function (man 2 reboot).
VMs just shut down really quickly.

void
host_os_reboot(void)
{
    reboot(LINUX_REBOOT_CMD_RESTART);
}

void
host_os_shutdown(void)
{
    reboot(LINUX_REBOOT_CMD_HALT);
}

Comment 3 Andrew Beekhof 2011-08-18 04:27:27 UTC
A related patch has been committed upstream: https://github.com/beekhof/matahari/commit/3eaaf04

Comment 4 Andrew Beekhof 2011-08-18 04:29:51 UTC
qmf: call 2 reboot

Broadcast message from root@pcmk-1
	(unknown) at 0:58 ...

The system is going down for reboot NOW!


In another window while watching /var/log/messages...

Broadcast message from root@pcmk-1
	(unknown) at 0:58 ...

The system is going down for reboot NOW!
Aug 18 00:58:43 pcmk-1 init: tty (/dev/tty1) main process (1244) killed by TERM signal
Aug 18 00:58:43 pcmk-1 init: tty (/dev/tty2) main process (1246) killed by TERM signal
Aug 18 00:58:43 pcmk-1 init: tty (/dev/tty3) main process (1248) killed by TERM signal
Aug 18 00:58:43 pcmk-1 init: tty (/dev/tty4) main process (1250) killed by TERM signal
Aug 18 00:58:43 pcmk-1 init: tty (/dev/tty5) main process (1252) killed by TERM signal
Aug 18 00:58:43 pcmk-1 init: tty (/dev/tty6) main process (1254) killed by TERM signal
Aug 18 00:58:43 pcmk-1 pacemakerd: [13869]: info: crm_signal_dispatch: Invoking handler for signal 15: Terminated


This indicates a "normal" shutdown occurred.

Comment 6 Dave Johnson 2011-08-19 20:32:12 UTC
good 2 go in v0.4.2-7 for both shutdown and reboot methods

Comment 7 Russell Bryant 2011-11-16 21:40:48 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description required

Comment 8 errata-xmlrpc 2011-12-06 11:39:43 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.

http://rhn.redhat.com/errata/RHBA-2011-1569.html