Bug 1136736

Summary: Failed to remove libvirt-daemon-1.2.8-1.el7.x86_64 package
Product: Red Hat Enterprise Linux 7 Reporter: zhoujunqin <juzhou>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: dyuan, eblake, hliu, juzhou, mzhan, rbalakri, rjones, zhwang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.2.8-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 07:43:45 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:
Embargoed:

Description zhoujunqin 2014-09-03 07:55:20 UTC
Description of problem:
Failed to remove libvirt-daemon-1.2.8-1.el7.x86_64 package

Version-Release number of selected component (if applicable):
libvirt-1.2.8-1.el7.x86_64.rpm
qemu-kvm-1.5.3-69.el7.x86_64
kernel-3.10.0-148.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. Check now system libvirt package version is: libvirt-1.1.1-29.el7.x86_64
2. Update the system all libvirt package to latest version: libvirt-1.2.8-1.el7.x86_64
3. Try to remove package libvirt-daemon-1.2.8-1.el7.x86_64 from system.

Actual results:
Failed to remove libvirt-daemon-1.2.8-1.el7.x86_64 with following error message.

# yum remove libvirt-daemon-1.2.8-1.el7.x86_64
....
Dependencies Resolved

==============================================================================================================================================================================================
 Package                                    Arch                               Version                                  Repository                                                       Size
==============================================================================================================================================================================================
Removing:
 libvirt-daemon                             x86_64                             1.2.8-1.el7                              @/libvirt-daemon-1.2.8-1.el7.x86_64                             1.5 M

Transaction Summary
==============================================================================================================================================================================================
Remove  1 Package

Installed size: 1.5 M
Is this ok [y/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
/var/tmp/rpm-tmp.YEDpLL: line 8: libvirtd.socket: command not found
error: %preun(libvirt-daemon-1.2.8-1.el7.x86_64) scriptlet failed, exit status 127
Error in PREUN scriptlet in rpm package libvirt-daemon-1.2.8-1.el7.x86_64
  Verifying  : libvirt-daemon-1.2.8-1.el7.x86_64                                                                                                                                          1/1

Failed:
  libvirt-daemon.x86_64 0:1.2.8-1.el7

or
# rpm -e libvirt-daemon-1.2.8-1.el7.x86_64
/var/tmp/rpm-tmp.kJgCYW: line 8: libvirtd.socket: command not found
error: %preun(libvirt-daemon-1.2.8-1.el7.x86_64) scriptlet failed, exit status 127
error: libvirt-daemon-1.2.8-1.el7.x86_64: erase failed

Expected results:
Package libvirt-daemon-1.2.8-1.el7.x86_64 can be removed successfully

Additional info:
Don't hit this issue on libvirt version: libvirt-1.1.1-29.el7.x86_64.

Comment 2 Jiri Denemark 2014-09-03 09:59:35 UTC
Pushed upstream as v1.2.8-5-g6209454:

commit 6209454d5b10c2d89faab8a56b250f1569d823fe
Author: Jiri Denemark <jdenemar>
Date:   Wed Sep 3 10:51:14 2014 +0200

    spec: Fix preun script for daemon
    
    %systemd_preun macro cannot be split into several lines.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1136736
    
    Signed-off-by: Jiri Denemark <jdenemar>

Comment 5 Daniel Berrangé 2014-09-11 10:39:12 UTC
*** Bug 1140604 has been marked as a duplicate of this bug. ***

Comment 6 zhoujunqin 2014-09-12 06:27:22 UTC
I can reproduce with package:
libvirt-1.2.8-1.el7.x86_64
and try to verify with package:
libvirt-1.2.8-2.el7.x86_64

steps:
# yum remove libvirt-daemon
Loaded plugins: langpacks, product-id, refresh-packagekit, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
....
Removed:
  libvirt-daemon.x86_64 0:1.2.8-2.el7                                                                                                                                                                              

Dependency Removed:
  libguestfs.x86_64 1:1.27.43-1.1.el7                 libguestfs-devel.x86_64 1:1.27.43-1.1.el7            libguestfs-gfs2.x86_64 1:1.27.43-1.1.el7              libguestfs-gobject.x86_64 1:1.27.43-1.1.el7     
  libguestfs-gobject-devel.x86_64 1:1.27.43-1.1.el7   libguestfs-java.x86_64 1:1.27.43-1.1.el7             libguestfs-java-devel.x86_64 1:1.27.43-1.1.el7        libguestfs-rescue.x86_64 1:1.27.43-1.1.el7      
.....

or use rpm command.
# rpm -e libvirt-daemon
error: Failed dependencies:
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-driver-network-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-driver-nwfilter-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-driver-interface-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-driver-secret-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-driver-nodedev-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-driver-storage-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-driver-lxc-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-driver-qemu-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-config-nwfilter-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-config-network-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-kvm-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-daemon-lxc-1.2.8-2.el7.x86_64
	libvirt-daemon = 1.2.8-2.el7 is needed by (installed) libvirt-lock-sanlock-1.2.8-2.el7.x86_64
# rpm -e libvirt-daemon --nodeps
# rpm -q libvirt-daemon
package libvirt-daemon is not installed

since package libvirt-daemon can be removed successfully, move this bug from ON_QA to VERIFIED.

Comment 7 Eric Blake 2014-09-17 15:39:09 UTC
see bug 1142367 for Fedora counterpart

Comment 9 errata-xmlrpc 2015-03-05 07:43:45 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://rhn.redhat.com/errata/RHSA-2015-0323.html