Bug 630621

Summary: libvirt-guests initscript Fedora compliance.
Product: Red Hat Enterprise Linux 5 Reporter: Jiri Denemark <jdenemar>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 5.6CC: dyuan, eblake, mjenner, mzhan, veillard, virt-maint, xen-maint
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libvirt-0.8.2-4.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 617300 Environment:
Last Closed: 2011-01-13 23:15:48 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:
Bug Depends On: 617300    
Bug Blocks:    

Description Jiri Denemark 2010-09-06 12:45:23 UTC
+++ This bug was initially created as a clone of Bug #617300 +++

Description of problem:

Clone of a corresponding bug fixed in RHEL-6...

QE is making an effort to make all initscripts comforming to consistency. More
information about it can be seen at 

https://wiki.test.redhat.com/BaseOs/Projects/InitScripts

and the guidelines can be seen at:

https://fedoraproject.org/wiki/Packaging/SysVInitScript

libvirt-guests init script has the following issues:
-- status is a valid action but is not listed in the usage script.
# service libvirt-guests usage
Usage: /etc/init.d/libvirt-guests {start|stop|restart|force-reload|gueststatus|shutdown}

-- status should print out the status but it doesn't print anything.
# service libvirt-guests status
# 

-- condrestart and try-restart should exist as an action but it doesn't.
# egrep "condrestart|try-restart" /etc/init.d/libvirt-guests 
#
-- reload should exist as an action, but it doesn't.
# grep "load" /etc/init.d/libvirt-guests | grep -v reload
#

-- When no or wrong argument is given the script should return 2 but it's
returning 3 instead.

-- # service libvirt-guests skdskjd; echo $?
Usage: /etc/init.d/libvirt-guests {start|stop|restart|force-reload|gueststatus|shutdown}
3

Comment 1 Jiri Denemark 2010-09-07 15:25:31 UTC
Some clarifications of the status of this script for 5.6:

- this is a new script in 5.6 introduced by the rebase and works well for kvm guests

- xen driver in libvirt doesn't support managed-save so the script will only work for xen guests if it's configured to shutdown them (instead of suspending)

- the script have no idea what Domain-0 is so it would try to shut it down as well, which will fortunately fail and nothing bad except for an error message will happen

- because of the two points above, we disabled libvirt-guests script for xen guests by default, that is if a user just updates libvirt packages, the script will only print it's disabled and advise using xendomains instead

- however, users may enable it by setting URIS="xen:///" in /etc/sysconfig/libvirt-guests configuration file

Comment 3 Jiri Denemark 2010-09-13 21:55:27 UTC
Fix built into libvirt-0.8.2-4.el5

Comment 5 Min Zhan 2010-10-12 10:14:35 UTC
Verified with below RHEL5U6 6 archs, and the results are passed.
-RHEL5.6-Server-xen-i386, 
-RHEL5.6-Server-xen-x86_64
-RHEL5.6-Server-xen-ia64
-RHEL5.6-Client-xen-i386
-RHEL5.6-Client-xen-x86_64
-RHEL5.6-Server-kvm-x86_64

Comment 6 dyuan 2010-10-19 02:31:03 UTC
According to the comment 5, change the bug status to verified.

Comment 8 errata-xmlrpc 2011-01-13 23:15:48 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0060.html