Bug 660706

Summary: do not start libvirt-guests on upgrade
Product: Red Hat Enterprise Linux 6 Reporter: Dan Kenigsberg <danken>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: urgent    
Version: 6.0CC: abaron, bsarathy, cpelland, dallan, dyuan, eblake, gren, hateya, jdenemar, plyons, xen-maint, yoyzhang
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-0.8.7-2.el6 Doc Type: Bug Fix
Doc Text:
The %post script (part of the libvirt-client package) started the libvirt-guests service even when the service was explicitly turned off. With this update, the libvirt-guests service is no longer started when explicitly turned off.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:24:51 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:    
Bug Blocks: 668694    

Description Dan Kenigsberg 2010-12-07 16:19:35 UTC
Description of problem:
the %post script of libvirt-client starts libvirt-guests service, which is against packaging guidelines, and (more painful to me) surprises users who explicitly turned libvirt-guests service off.

Version-Release number of selected component (if applicable):
libvirt-0.8.1-28.el6.x86_64

Comment 2 Eric Blake 2010-12-20 19:07:39 UTC
upstream patch in commit 91b3e1038f; will be picked up as part of rebasing libvirt for RHEL 6.1.

Comment 3 Jiri Denemark 2010-12-21 12:43:25 UTC
Fixed upstream by v0.8.6-80-g91b3e10:

commit 91b3e1038f32524304063c17e4dd56b9fb66f362
Author: Dan Kenigsberg <danken>
Date:   Tue Dec 7 18:05:44 2010 +0200

    spec: do not start libvirt-guests if that service is off

Comment 5 Jiri Denemark 2011-01-09 23:57:47 UTC
Built into libvirt-0.8.7-1.el6

Comment 7 Jiri Denemark 2011-01-11 10:25:08 UTC
Oops, libvirt.spec was not properly updated to upstream version and thus it doesn't contain this fix. I'll fix that in -2.

Comment 8 Gunannan Ren 2011-01-11 10:28:58 UTC
# service libvirt-guests status
started
# service libvirt-guests stop
Running guests on default URI: no running guests.
# chkconfig --list libvirt-guests
libvirt-guests  0:off   1:off   2:off   3:off   4:off   5:off   6:off
# rpm -ivh libvirt-client-0.8.7-1.el6.x86_64.rpm --force
Preparing...                ########################################### [100%]
   1:libvirt-client         ########################################### [100%]
# service libvirt-guests status
started

Comment 10 zhanghaiyan 2011-01-18 03:28:30 UTC
Tested fail with libvirt-client-0.8.7-2.el6.x86_64
- 2.6.32-94.el6.x86_64
- qemu-kvm-0.12.1.2-2.129.el6.x86_64
- libvirt-0.8.7-2.el6.x86_64

The test step and actual result is the same wtih comment 8

Comment 11 Jiri Denemark 2011-01-18 08:24:31 UTC
Are you sure libvirt-guests init script was turned off before upgrading to libvirt-0.8.7-2.el6.x86_64? You need to see the exact same output of chkconfig --list libvirt-guests as shown in comment 8. If you have the script on for any of the runlevels, the init script will be started (although it should probably be started only if it is on in current runlevel but that's a different issue).

It works as expected for me.

Comment 12 zhanghaiyan 2011-01-18 09:17:12 UTC
Thanks Jiri, my testing in comment 10 didn't make all run level off, and after #chkconfig libvirt-guests off, then test pass
1. # service libvirt-guests status
started
2. # service libvirt-guests stop
Running guests on default URI: no running guests.
3. # chkconfig libvirt-guests off
# chkconfig --list libvirt-guests
libvirt-guests  0:off   1:off   2:off   3:off   4:off   5:off   6:off
4. # rpm -Uvh libvirt-0.8.7-2.el6.x86_64.rpm libvirt-client-0.8.7-2.el6.x86_64.rpm libvirt-python-0.8.7-2.el6.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:libvirt-client         ########################################### [ 33%]
   2:libvirt                ########################################### [ 67%]
   3:libvirt-python         ########################################### [100%]
5. # service libvirt-guests status
stopped, with saved guests

Comment 13 Martin Prpič 2011-04-15 14:24:01 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:
The %post script (part of the libvirt-client package) started the libvirt-guests service even when the service was explicitly turned off. With this update, the libvirt-guests service is no longer started when explicitly turned off.

Comment 16 errata-xmlrpc 2011-05-19 13:24:51 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/RHBA-2011-0596.html