Bug 1195860

Summary: virt-install rpm missing dependency on pygobject3-base
Product: Red Hat Enterprise Linux 7 Reporter: Cole Robinson <crobinso>
Component: virt-managerAssignee: Giuseppe Scrivano <gscrivan>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.1CC: gscrivan, juzhou, mzhan, tzheng, xiaodwan
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: virt-manager-1.2.0-1-el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1195794 Environment:
Last Closed: 2015-11-19 05:24:15 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:
Bug Depends On: 1195794    
Bug Blocks:    

Description Cole Robinson 2015-02-24 17:38:58 UTC
This was filed against fedora, it may be relevant for RHEL7.1 though so we should confirm.

+++ This bug was initially created as a clone of Bug #1195794 +++

Description of problem:

[root@pkvmci824 ~]# rpm -qf `which virt-install`
virt-install-1.1.0-4.git310f6527.fc21.noarch
[root@pkvmci824 ~]# virt-install --connect qemu:///system -r 4096 --accelerate -n f21-base --disk f21-base.qcow2,format=qcow2,size=8,bus=virtio,cache=writeback --cdrom /root/Fedora-Server-DVD-ppc64-21.iso --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type=linux --os-variant=fedora21
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-install", line 29, in <module>
    import virtinst
  File "/usr/share/virt-manager/virtinst/__init__.py", line 85, in <module>
    from virtinst.distroinstaller import DistroInstaller
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 28, in <module>
    from . import osdict
  File "/usr/share/virt-manager/virtinst/osdict.py", line 26, in <module>
    from gi.repository import Libosinfo as libosinfo
ImportError: No module named gi.repository
[root@pkvmci824 ~]# yum install -y pygobject3-base.ppc64
[root@pkvmci824 ~]# virt-install --connect qemu:///system -r 4096 --accelerate -n f21-base --disk f21-base.qcow2,format=qcow2,size=8,bus=virtio,cache=writeback --cdrom /root/Fedora-Server-DVD-ppc64-21.iso --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type=linux --os-variant=fedora21

SUCCESS!

--- Additional comment from Cole Robinson on 2015-02-24 11:24:42 EST ---

Thanks for the report, fixed upstream now:

commit 72324a857591e23c9d8998366e2eef337a9fd4e9
Author: Cole Robinson <crobinso>
Date:   Tue Feb 24 11:23:46 2015 -0500

    spec: Add pygobject3-base dep for virt-install (bz 1195794)

Comment 1 Giuseppe Scrivano 2015-02-24 18:16:43 UTC
same problem on RHEL.

This patch fixes it:

diff --git a/virt-manager.spec b/virt-manager.spec
index cafa538..ecd7115 100644
--- a/virt-manager.spec
+++ b/virt-manager.spec
@@ -117,6 +117,8 @@ Requires: libxml2-python
 Requires: python-urlgrabber
 Requires: python-ipaddr
 Requires: libosinfo >= 0.2.11
+# Required for gobject-introspection infrastructure
+Requires: pygobject3-base

Comment 3 Xiaodai Wang 2015-06-23 06:45:03 UTC
I can reproduce this bug with package:
virt-install-1.1.0-13.el7.noarch.rpm  
virt-manager-1.1.0-13.el7.noarch.rpm  
virt-manager-common-1.1.0-13.el7.noarch.rpm

Steps:
1. Remove pygobject3-base package.
# rpm -qa pygobject3*
pygobject3-base-3.8.2-6.el7.x86_64
pygobject3-3.8.2-6.el7.x86_64
# rpm -e --nodeps pygobject3-base-3.8.2-6.el7.x86_64
2. Install below packages successfully without report dependecy error.
virt-install-1.1.0-13.el7.noarch.rpm  
virt-manager-1.1.0-13.el7.noarch.rpm  
virt-manager-common-1.1.0-13.el7.noarch.rpm
3. install a guest with virt-install command.
# virt-install --name bugtest --memory 1024 --disk none -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL-7.1-20150219.1/compose/Server/x86_64/os
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-install", line 29, in <module>
    import virtinst
  File "/usr/share/virt-manager/virtinst/__init__.py", line 85, in <module>
    from virtinst.distroinstaller import DistroInstaller
  File "/usr/share/virt-manager/virtinst/distroinstaller.py", line 28, in <module>
    from . import osdict
  File "/usr/share/virt-manager/virtinst/osdict.py", line 25, in <module>
    from gi.repository import Libosinfo as libosinfo
ImportError: No module named gi.repository


Then try to verify with latest build:
virt-install-1.2.1-2.el7.noarch.rpm  
virt-manager-1.2.1-2.el7.noarch.rpm  
virt-manager-common-1.2.1-2.el7.noarch.rpm

Steps:
1. Install virt-manager with latest version without pygobject3-base installed, a dependency error reports.
rpm -ivh virt-manager-common-1.2.1-2.el7.noarch.rpm
error: Failed dependencies:
	pygobject3-base is needed by virt-manager-common-1.2.1-2.el7.noarch
2. Install pygobject3-base package and install the latest virt-manager.
# rpm -ivh virt-manager-common-1.2.1-2.el7.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:virt-manager-common-1.2.1-2.el7  ################################# [100%]
# rpm -ivh virt-manager-1.2.1-2.el7.noarch.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:virt-manager-1.2.1-2.el7         ################################# [100%]
# rpm -ivh virt-install-1.2.1-2.el7.noarch.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:virt-install-1.2.1-2.el7         ################################# [100%]
3. Install a guest in virt-install command successfully.
# virt-install --name bugtest --memory 1024 --disk none -l http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL-7.1-20150219.1/compose/Server/x86_64/os
WARNING  Unable to connect to graphical console: virt-viewer not installed. Please install the 'virt-viewer' package.
WARNING  No console to launch for the guest, defaulting to --wait -1

Starting install...
Retrieving file vmlinuz...                                                                                                                                                              | 9.6 MB  00:00:00 !!! 
Retrieving file initrd.img...                                                                                                                                                           |  70 MB  00:00:00 !!! 
Creating domain...                                                                                                                                                                      |    0 B  00:00:00     
Domain installation still in progress. Waiting for installation to complete.


According to the result above in the latest version of virt-manager, move this bug from ON_QA to VERIFIED.

Comment 5 errata-xmlrpc 2015-11-19 05:24:15 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/RHBA-2015-2206.html