Bug 1568676 - libguestfs installation failed with dependency issue of qemu-kvm-rhev / qemu-kvm-ma on ppc64le
Summary: libguestfs installation failed with dependency issue of qemu-kvm-rhev / qemu-...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.5
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1570533
TreeView+ depends on / blocked
 
Reported: 2018-04-18 05:36 UTC by Xianghua Chen
Modified: 2018-10-30 07:46 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.38.1-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1570533 (view as bug list)
Environment:
Last Closed: 2018-10-30 07:45:35 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:3021 None None None 2018-10-30 07:46:21 UTC

Description Xianghua Chen 2018-04-18 05:36:12 UTC
Description of problem:
libguestfs installation failed with dependency issue of qemu-kvm-rhev / qemu-kvm-ma on ppc64le


Version-Release number of selected component (if applicable):
libguestfs.ppc64le 1:1.36.10-6.el7_5.1


How reproducible:
100%


Steps:
1. Try to install libguestfs.ppc64le on ppc64le(p8) + RHEL7.5 with this repo:
[rhel7.5-z-candidate]
name=rhel7.5-z-candidate
baseurl=http://download.eng.brq.redhat.com/rel-eng/repos/rhel-7.5-z-candidate/ppc64le/
gpgcheck=0
enabled=1

[rhevh-rhel-7.5-candidate]
name=rhevh-rhel-7.5-candidate
baseurl=http://download.eng.brq.redhat.com/rel-eng/repos/rhevh-rhel-7.5-candidate/ppc64le/
gpgcheck=0
enabled=1

2. Installation failed because it only depend on qemu-kvm-ma , not qemu-kvm-rhev.
# yum install libguestfs
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package libguestfs.ppc64le 1:1.36.10-6.el7_5.1 will be installed
--> Processing Dependency: libvirt-daemon-kvm >= 3.9.0-1 for package: 1:libguestfs-1.36.10-6.el7_5.1.ppc64le
--> Processing Dependency: /usr/bin/qemu-img for package: 1:libguestfs-1.36.10-6.el7_5.1.ppc64le
--> Processing Dependency: qemu-img-ma for package: 1:libguestfs-1.36.10-6.el7_5.1.ppc64le
Package qemu-img-ma is obsoleted by qemu-img-rhev, but obsoleting package does not provide for requirements
--> Running transaction check
---> Package libguestfs.ppc64le 1:1.36.10-6.el7_5.1 will be installed
--> Processing Dependency: qemu-img-ma for package: 1:libguestfs-1.36.10-6.el7_5.1.ppc64le
Package qemu-img-ma is obsoleted by qemu-img-rhev, but obsoleting package does not provide for requirements
... ...
---> Package libguestfs.ppc64le 1:1.36.10-6.el7_5.1 will be installed
--> Processing Dependency: qemu-img-ma for package: 1:libguestfs-1.36.10-6.el7_5.1.ppc64le
Package qemu-img-ma is obsoleted by qemu-img-rhev, but obsoleting package does not provide for requirements
... ...
---> Package qemu-kvm-rhev.ppc64le 10:2.10.0-21.el7_5.2 will be installed
--> Processing Dependency: qemu-kvm-common-rhev = 10:2.10.0-21.el7_5.2 for package: 10:qemu-kvm-rhev-2.10.0-21.el7_5.2.ppc64le
--> Running transaction check
---> Package libguestfs.ppc64le 1:1.36.10-6.el7_5.1 will be installed
--> Processing Dependency: qemu-img-ma for package: 1:libguestfs-1.36.10-6.el7_5.1.ppc64le
Package qemu-img-ma is obsoleted by qemu-img-rhev, but obsoleting package does not provide for requirements
... ...
---> Package qemu-kvm-common-rhev.ppc64le 10:2.10.0-21.el7_5.2 will be installed
--> Finished Dependency Resolution
Error: Package: 1:libguestfs-1.36.10-6.el7_5.1.ppc64le (rhel7.5-z-candidate)
           Requires: qemu-img-ma
           Available: 10:qemu-img-ma-2.10.0-21.el7.ppc64le (beaker-Server)
               qemu-img-ma = 10:2.10.0-21.el7
           Available: 10:qemu-img-ma-2.10.0-21.el7_5.2.ppc64le (rhel7.5-z-candidate)
               qemu-img-ma = 10:2.10.0-21.el7_5.2
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

If there is only qemu-kvm-ma in the repo, then everything goes well.
If qemu-kvm-rhev is installed in advance , it will also fail.


3. Don't need to pay attention on the repo I used, the main problem is that , for:
 ppc64le(p8)+RHEL7.5, ppc64le(p9)+RHEL7.5+ALT, s390x+RHEL7.5+ALT, aarch64+RHEL7.5+ALT 

Since both qemu-kvm-rhev & qemu-kvm-ma should be supported(according to junli@), so no matter which qemu-kvm* is provided(you don't know which one the customer would like to use or is using), libguestfs should always be installed successfully without dependency error.



Actual results:
The command failed to run 


Expected results:
The command should run successfully.


Additional info:
ppc64le, aarch64, s390x all have the same problem.

Comment 2 Richard W.M. Jones 2018-04-19 07:48:45 UTC
The libguestfs package on ppc64le has a mysterious dependency on
qemu-img-ma (see https://brewweb.engineering.redhat.com/brew/rpminfo?rpmID=5518455).

As far as I can tell this has not been added by libguestfs.  Maybe
it comes from the supermin-find-requires script.  This will take a bit
of investigation.

Comment 3 Richard W.M. Jones 2018-04-19 08:00:42 UTC
The answer to that is ‘yes’.  qemu-img-ma comes from supermin.

The reason is complex:

(1) virt-dib needs qemu-img to be present inside the appliance.

(2) supermin looks for qemu-img and resolves it to the qemu-img-ma
package in the buildroot.

(3) We attempt to move the qemu-img dependency to the virt-dib
subpackage.  However because we move literal ‘qemu-img’ that
actually creates two dependencies:

/usr/lib64/guestfs/supermin.d/packages qemu-img-ma
/usr/lib64/guestfs/supermin.d/zz-packages-dib qemu-img

(NB this is with the ppc64le packages)

-----

There are at least two bugs in the spec file:

(a) The ‘move_to’ script should probably error out if the named dependency
does not actually exist in the packages file.  This would stop this kind of
error from happening again unnoticed in future.

(b) It seems as if virt-dib should depend on qemu-img (not qemu-img-ma)
on all architectures, and we should rely on the Provides of qemu-img-ma
to satisfy this.  This is what happens now, but only by accident, so
after fixing the move_to script we'll need a bit of %ifarch ... to add
the right dependency.

Comment 5 Richard W.M. Jones 2018-04-19 10:17:41 UTC
(Note these results are all for Fedora)

Failed on s390x:
  move_to zfs-fuse: package name not found in packages file

aarch64 - same

armv7 - same

ppc64 - build fails for unrelated reasons

These seem to be actual bugs so I corrected the package:

https://src.fedoraproject.org/rpms/libguestfs/c/8a4603542704c9daaa7b8109ed554793563a4016?branch=master

Another scratch build:

https://koji.fedoraproject.org/koji/taskinfo?taskID=26451040

Comment 8 Pino Toscano 2018-04-20 15:56:26 UTC
Fix for RHEL 7.6 landed in dist-git, it will be in whatever build is after libguestfs-1.38.0-1.el7.

Comment 13 Xianghua Chen 2018-05-18 02:43:50 UTC
Verified with package:
libguestfs-1.38.1-1.el7.ppc64le

Steps:
1. Prepare a rhel7.6,and set this repo to provide qemu-kvm-rhev:
[rhevh-rhel-7.6-candidate]
name=rhevh-rhel-7.6-candidate
baseurl=http://download.eng.brq.redhat.com/rel-eng/repos/rhevh-rhel-7.6-candidate/ppc64le/
gpgcheck=0
enabled=1

2. Install libguestfs
# yum install libguestfs

Libguestfs can be installed successfully without dependency error.

So verified.

Comment 15 errata-xmlrpc 2018-10-30 07:45:35 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/RHEA-2018:3021


Note You need to log in before you can comment on or make changes to this bug.