Bug 877901

Summary: qemu-img and qemu-kvm conflict with qemu-img-rhev and qemu-kvm-rhev
Product: Red Hat Enterprise Linux 6 Reporter: Ohad Basan <obasan>
Component: qemu-kvmAssignee: Michal Novotny <minovotn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.4CC: acathrow, areis, bsarathy, danken, dyasny, eedri, flang, ilvovsky, juzhang, mgoldboi, mkenneth, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.342.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 07:44:51 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 Ohad Basan 2012-11-19 08:23:41 UTC
Description of problem:
In a system with qemu-kvm-rhev and qemu-img-rhev installed
trying to yum install qemu-img and qemu-kvm throws a conflict error.

Transaction Check Error:
  file /usr/bin/qemu-img from install of qemu-img-2:0.12.1.2-2.334.el6.x86_64 conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
  file /usr/bin/qemu-io from install of qemu-img-2:0.12.1.2-2.334.el6.x86_64 conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64


Version-Release number of selected component (if applicable):
6.4

How reproducible:
always

Steps to Reproduce:
1.install qemu-kvm-rhev and qemu-img rhev
2.yum install qemu-img and qemu-kvm
3.
  
Actual results:
system tries to install and throws an error

Transaction Check Error:
  file /usr/bin/qemu-img from install of qemu-img-2:0.12.1.2-2.334.el6.x86_64 conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
  file /usr/bin/qemu-io from install of qemu-img-2:0.12.1.2-2.334.el6.x86_64 conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64


Expected results:
yum shouldn't install the packages. should gracefully quit instead.

Additional info:

Comment 1 Michal Novotny 2012-11-27 13:45:32 UTC
(In reply to comment #0)
> Description of problem:
> In a system with qemu-kvm-rhev and qemu-img-rhev installed
> trying to yum install qemu-img and qemu-kvm throws a conflict error.
> 
> Transaction Check Error:
>   file /usr/bin/qemu-img from install of
> qemu-img-2:0.12.1.2-2.334.el6.x86_64 conflicts with file from package
> qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
>   file /usr/bin/qemu-io from install of qemu-img-2:0.12.1.2-2.334.el6.x86_64
> conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
> 
> 
> Version-Release number of selected component (if applicable):
> 6.4
> 
> How reproducible:
> always
> 
> Steps to Reproduce:
> 1.install qemu-kvm-rhev and qemu-img rhev
> 2.yum install qemu-img and qemu-kvm
> 3.
>   
> Actual results:
> system tries to install and throws an error
> 
> Transaction Check Error:
>   file /usr/bin/qemu-img from install of
> qemu-img-2:0.12.1.2-2.334.el6.x86_64 conflicts with file from package
> qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
>   file /usr/bin/qemu-io from install of qemu-img-2:0.12.1.2-2.334.el6.x86_64
> conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
> 
> 
> Expected results:
> yum shouldn't install the packages. should gracefully quit instead.
> 
> Additional info:

I don't know how yum works internally considering when it fails and when not but how should it quit?

I tried to add conflict with qemu-kvm and it fails/quits with:

# yum install qemu-kvm
Loaded plugins: product-id, refresh-packagekit, rhnplugin, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package qemu-kvm.x86_64 2:0.12.1.2-2.295.el6_3.2 will be installed
--> Processing Dependency: qemu-img = 2:0.12.1.2-2.295.el6_3.2 for package: 2:qemu-kvm-0.12.1.2-2.295.el6_3.2.x86_64
--> Running transaction check
---> Package qemu-img.x86_64 2:0.12.1.2-2.295.el6_3.2 will be installed
--> Processing Conflict: 2:qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64 conflicts qemu-kvm
--> Finished Dependency Resolution
Error: qemu-kvm-rhev conflicts with qemu-kvm
 You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
2:qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64 has installed conflicts qemu-kvm: 2:qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64
#

Isn't this error even worse? How should it fail?

Michal

Comment 2 Ademar Reis 2012-12-04 16:43:33 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Description of problem:
> > In a system with qemu-kvm-rhev and qemu-img-rhev installed
> > trying to yum install qemu-img and qemu-kvm throws a conflict error.
> > 
> > Transaction Check Error:
> >   file /usr/bin/qemu-img from install of
> > qemu-img-2:0.12.1.2-2.334.el6.x86_64 conflicts with file from package
> > qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
> >   file /usr/bin/qemu-io from install of qemu-img-2:0.12.1.2-2.334.el6.x86_64
> > conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
> > 
> > 
> > Version-Release number of selected component (if applicable):
> > 6.4
> > 
> > How reproducible:
> > always
> > 
> > Steps to Reproduce:
> > 1.install qemu-kvm-rhev and qemu-img rhev
> > 2.yum install qemu-img and qemu-kvm
> > 3.
> >   
> > Actual results:
> > system tries to install and throws an error
> > 
> > Transaction Check Error:
> >   file /usr/bin/qemu-img from install of
> > qemu-img-2:0.12.1.2-2.334.el6.x86_64 conflicts with file from package
> > qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
> >   file /usr/bin/qemu-io from install of qemu-img-2:0.12.1.2-2.334.el6.x86_64
> > conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.334.el6.x86_64
> > 
> > 
> > Expected results:
> > yum shouldn't install the packages. should gracefully quit instead.
> > 
> > Additional info:
> 
> I don't know how yum works internally considering when it fails and when not
> but how should it quit?
> 
> I tried to add conflict with qemu-kvm and it fails/quits with:
> 
> # yum install qemu-kvm
> Loaded plugins: product-id, refresh-packagekit, rhnplugin, security,
> subscription-manager
> Updating certificate-based repositories.
> Unable to read consumer identity
> Setting up Install Process
> Resolving Dependencies
> --> Running transaction check
> ---> Package qemu-kvm.x86_64 2:0.12.1.2-2.295.el6_3.2 will be installed
> --> Processing Dependency: qemu-img = 2:0.12.1.2-2.295.el6_3.2 for package:
> 2:qemu-kvm-0.12.1.2-2.295.el6_3.2.x86_64
> --> Running transaction check
> ---> Package qemu-img.x86_64 2:0.12.1.2-2.295.el6_3.2 will be installed
> --> Processing Conflict: 2:qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64
> conflicts qemu-kvm
> --> Finished Dependency Resolution
> Error: qemu-kvm-rhev conflicts with qemu-kvm
>  You could try using --skip-broken to work around the problem
> ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
> 2:qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64 has installed conflicts
> qemu-kvm: 2:qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64
> #
> 
> Isn't this error even worse? How should it fail?

There's something wrong with your installation, that's what 'yum check' warns at the end:

> 2:qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64 has installed conflicts
> qemu-kvm: 2:qemu-kvm-rhev-0.12.1.2-2.295.el6_3.8.x86_64

Other than that, the behavior is correct: at the dependency resolution phase, yum detects that there's a conflict and exits with an error, suggesting the user can use --skip-broken to work around the problem. It's better than failing at the *install* phase because of a file conflict.

Comment 6 langfang 2012-12-18 05:48:50 UTC
Reproduce this bug as follow version:
Host:
#uname -r
2.6.32-279.9.1.el6.x86_64
# rpm -qa |grep qemu-kvm-rhev
qemu-kvm-rhev-tools-0.12.1.2-2.295.el6_3.2.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.2.x86_64
qemu-kvm-rhev-debuginfo-0.12.1.2-2.295.el6_3.2.x86_64

Steps to reproduce:
1.#yum install qemu-kvm qemu-img


Results:
[root@localhost ~]# yum install qemu-kvm qemu-img
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package qemu-img.x86_64 2:0.12.1.2-2.295.el6 will be installed
---> Package qemu-kvm.x86_64 2:0.12.1.2-2.295.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================
 Package          Arch           Version                         Repository             Size
=============================================================================================
Installing:
 qemu-img         x86_64         2:0.12.1.2-2.295.el6            RHEL-Server-6         415 k
 qemu-kvm         x86_64         2:0.12.1.2-2.295.el6            RHEL-Server-6         1.2 M

Transaction Summary
=============================================================================================
Install       2 Package(s)

Total download size: 1.7 M
Installed size: 4.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): qemu-img-0.12.1.2-2.295.el6.x86_64.rpm                         | 415 kB     00:00     
(2/2): qemu-kvm-0.12.1.2-2.295.el6.x86_64.rpm                         | 1.2 MB     00:00     
---------------------------------------------------------------------------------------------
Total                                                         35 MB/s | 1.7 MB     00:00     
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
  file /usr/bin/qemu-img from install of qemu-img-2:0.12.1.2-2.295.el6.x86_64 conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.295.el6_3.2.x86_64
  file /usr/bin/qemu-io from install of qemu-img-2:0.12.1.2-2.295.el6.x86_64 conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.295.el6_3.2.x86_64
  file /usr/share/man/man1/qemu-img.1.gz from install of qemu-img-2:0.12.1.2-2.295.el6.x86_64 conflicts with file from package qemu-img-rhev-2:0.12.1.2-2.295.el6_3.2.x86_64
  file /usr/libexec/qemu-kvm from install of qemu-kvm-2:0.12.1.2-2.295.el6.x86_64 conflicts with file from package qemu-kvm-rhev-2:0.12.1.2-2.295.el6_3.2.x86_64
  file /usr/share/man/man1/qemu-kvm.1.gz from install of qemu-kvm-2:0.12.1.2-2.295.el6.x86_64 conflicts with file from package qemu-kvm-rhev-2:0.12.1.2-2.295.el6_3.2.x86_64

Error Summary
-------------

Verify this bug as follow version:

Host:
# uname -r
2.6.32-348.el6.x86_64
# rpm -qa |grep qemu-kvm-rhev
qemu-kvm-rhev-debuginfo-0.12.1.2-2.346.el6.x86_64
qemu-kvm-rhev-tools-0.12.1.2-2.346.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64


The steps as same as reproduce

Results:
[root@amd-2427-32-2 qemu-kvm-rhev346]# yum install qemu-kvm qemu-img
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package qemu-img.x86_64 2:0.12.1.2-2.344.el6 will be installed
---> Package qemu-kvm.x86_64 2:0.12.1.2-2.344.el6 will be installed
--> Processing Conflict: 2:qemu-img-rhev-0.12.1.2-2.346.el6.x86_64 conflicts qemu-img
--> Processing Conflict: 2:qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64 conflicts qemu-kvm
--> Processing Conflict: 2:qemu-kvm-0.12.1.2-2.344.el6.x86_64 conflicts qemu-kvm-rhev
--> Finished Dependency Resolution
Error: qemu-kvm conflicts with 2:qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64
Error: qemu-kvm-rhev conflicts with 2:qemu-kvm-0.12.1.2-2.344.el6.x86_64
Error: qemu-img-rhev conflicts with 2:qemu-img-0.12.1.2-2.344.el6.x86_64
 You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
2:qemu-img-rhev-0.12.1.2-2.346.el6.x86_64 has installed conflicts qemu-img: 2:qemu-img-rhev-0.12.1.2-2.346.el6.x86_64
2:qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64 has installed conflicts qemu-kvm: 2:qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64
[root@amd-2427-32-2 qemu-kvm-rhev346]# 

According to above test ,yum can detects that there's a conflict and exits with an error, suggesting the user can use --skip-broken to work around the problem.
So this bug has been fixed.

Comment 7 langfang 2012-12-18 10:21:07 UTC
>Addtional info comment6
A guest(installed qemu-kvm-rhev package)--> install qemu-kvm packages--->hit conflicts error--->check the results,not install qemu-kvm package.

[root@amd-2427-32-2 ~]# rpm -qa |grep qemu
gpxe-roms-qemu-0.9.7-6.9.el6.noarch
qemu-kvm-rhev-debuginfo-0.12.1.2-2.346.el6.x86_64
qemu-img-rhev-0.12.1.2-2.346.el6.x86_64
qemu-kvm-rhev-tools-0.12.1.2-2.346.el6.x86_64
qemu-guest-agent-0.12.1.2-2.344.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64


Test this bug with another senario:Guest(installed qemu-kvm package)-->install qemu-kvm-rhev package-->sucessfully installed.

Test version:
Host:
# uname -r
2.6.32-348.el6.x86_64
#rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.346.el6.x86_64

Results:

[root@localhost yum.repos.d]# yum install qemu-img-rhev
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package qemu-img.x86_64 2:0.12.1.2-2.346.el6 will be obsoleted
---> Package qemu-img-rhev.x86_64 2:0.12.1.2-2.346.el6 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================
 Package                                           Arch                                       Version                                                  Repository                                         Size
===============================================================================================================================================================================================================
Installing:
 qemu-img-rhev                                     x86_64                                     2:0.12.1.2-2.346.el6                                     RHEL-Server-6                                     462 k
     replacing  qemu-img.x86_64 2:0.12.1.2-2.346.el6

Transaction Summary
===============================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 462 k
Is this ok [y/N]: y
Downloading Packages:
qemu-img-rhev-0.12.1.2-2.346.el6.x86_64.rpm                                                                                                                                             | 462 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : 2:qemu-img-rhev-0.12.1.2-2.346.el6.x86_64                                                                                                                                                   1/2 
  Erasing    : 2:qemu-img-0.12.1.2-2.346.el6.x86_64                                                                                                                                                        2/2 
  Verifying  : 2:qemu-img-rhev-0.12.1.2-2.346.el6.x86_64                                                                                                                                                   1/2 
  Verifying  : 2:qemu-img-0.12.1.2-2.346.el6.x86_64                                                                                                                                                        2/2 

Installed:
  qemu-img-rhev.x86_64 2:0.12.1.2-2.346.el6                                                                                                                                                                    

Replaced:
  qemu-img.x86_64 2:0.12.1.2-2.346.el6                                                                                                                                                                         

Complete!



[root@localhost yum.repos.d]# yum install qemu-kvm-rhev
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package qemu-kvm.x86_64 2:0.12.1.2-2.346.el6 will be obsoleted
---> Package qemu-kvm-rhev.x86_64 2:0.12.1.2-2.346.el6 will be obsoleting
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================================================================================================================================================
 Package                                           Arch                                       Version                                                  Repository                                         Size
===============================================================================================================================================================================================================
Installing:
 qemu-kvm-rhev                                     x86_64                                     2:0.12.1.2-2.346.el6                                     RHEL-Server-6                                     1.3 M
     replacing  qemu-kvm.x86_64 2:0.12.1.2-2.346.el6

Transaction Summary
===============================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64.rpm                                                                                                                                             | 1.3 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 2:qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64                                                                                                                                                   1/2 
  Erasing    : 2:qemu-kvm-0.12.1.2-2.346.el6.x86_64                                                                                                                                                        2/2 
  Verifying  : 2:qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64                                                                                                                                                   1/2 
  Verifying  : 2:qemu-kvm-0.12.1.2-2.346.el6.x86_64                                                                                                                                                        2/2 

Installed:
  qemu-kvm-rhev.x86_64 2:0.12.1.2-2.346.el6                                                                                                                                                                    

Replaced:
  qemu-kvm.x86_64 2:0.12.1.2-2.346.el6                                                                                                                                                                         

Complete!


Additional info:
1)Test on as follow version get same results:
# uname -r
2.6.32-279.9.1.el6.x86_64
#rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.295.el6_3.2.x86_64

Install version:
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.2.x86_64 
emu-img-rhev.x86_64 2:0.12.1.2-2.295.el6_3.2

2)After install qemu-kvm-img/qemu-kvm-rhev sucessfully,check the the packages.
[root@localhost yum.repos.d]# rpm -qa |grep qemu
gpxe-roms-qemu-0.9.7-6.9.el6.noarch
qemu-kvm-debuginfo-0.12.1.2-2.346.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.346.el6.x86_64
qemu-img-rhev-0.12.1.2-2.346.el6.x86_64
qemu-guest-agent-0.12.1.2-2.344.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.346.el6.x86_64

[root@localhost yum.repos.d]# rpm -qa |grep qemu
qemu-guest-agent-0.12.1.2-2.295.el6_3.2.x86_64
gpxe-roms-qemu-0.9.7-6.9.el6.noarch
qemu-kvm-tools-0.12.1.2-2.295.el6_3.2.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6_3.2.x86_64
qemu-kvm-debuginfo-0.12.1.2-2.295.el6_3.2.x86_64
qemu-img-rhev-0.12.1.2-2.295.el6_3.2.x86_64

Comment 8 langfang 2012-12-25 07:50:00 UTC
Summarize all the test results:


Senario 1)
A guest(installed qemu-kvm-rhev package)--> install(use YUM) qemu-kvm packages--->hit conflicts error--->check the results,not install qemu-kvm package.(Detail info please see comment6)

Senario 2)
A guest(installed qemu-kvm package)-->install(use YUM) qemu-kvm-rhev packages-->sucessfully installed.(Detail info please see comment7)

Senario 3)

A guest(installed qemu-kvm347 version)-->rpm upgrade qemu-kvm-rhev348 version(rpm -Uvh ..)--->Conflict error

Senario 4)

A guest(installed qemu-kvm347 version)-->rpm downgrade qemu-kvm-rhev346 version(rpm -Uvh --oldpackage ..)--->Conflict error

Senario 5)

A guest(installed qemu-kvm-rhev347 version)-->rpm upgrade qemu-kvm348 version(rpm -Uvh  ..)--->Conflict error

Senario 6)

A guest(installed qemu-kvm-rhev347 version)-->rpm downgrade qemu-kvm346 version(rpm -Uvh --oldpackage ..)--->Conflict error


Senario 7)

A guest (have installed qemu-kvm or qemu-kvm-rhev packages)--->rpm -ivh ... --force --nodeps --->can be install qemu-kvm-rhev and qemu-kvm packages successfully.

Comment 10 errata-xmlrpc 2013-02-21 07:44:51 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-2013-0527.html