Bug 1419720

Summary: ImportError: No module named pkg_resources when running vbmc. Missing python-setuptools dependency
Product: Red Hat OpenStack Reporter: Dan Yasny <dyasny>
Component: python-pbrAssignee: Matthias Runge <mrunge>
Status: CLOSED ERRATA QA Contact: Shai Revivo <srevivo>
Severity: medium Docs Contact:
Priority: medium    
Version: 11.0 (Ocata)CC: adhingra, apevec, athomas, bfournie, dmacpher, dtantsur, dyasny, ealcaniz, jjoyce, lhh, srevivo
Target Milestone: z4Keywords: Triaged, ZStream
Target Release: 11.0 (Ocata)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-pbr-1.10.0-2.el7ost Doc Type: Bug Fix
Doc Text:
A missing dependency caused vmbc to report a traceback error. This fix adds the dependent package (python-setuptools) and the traceback error no longer appears.
Story Points: ---
Clone Of:
: 1522652 (view as bug list) Environment:
Last Closed: 2018-02-13 16:38:01 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:    
Bug Blocks: 1522652    

Description Dan Yasny 2017-02-06 21:19:02 UTC
Description of problem:
On a clean system with internal OSP11 repos enabled, a fresh install of python-vbmc outputs a python traceback.

Here's the full output:
[root@sealusa5 ~]# yum install python-virtualbmc
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package python-virtualbmc.noarch 0:0.1.1-0.20161216115645.bd3fca1.el7ost will be installed
--> Processing Dependency: python-pyghmi for package: python-virtualbmc-0.1.1-0.20161216115645.bd3fca1.el7ost.noarch
--> Processing Dependency: python-prettytable for package: python-virtualbmc-0.1.1-0.20161216115645.bd3fca1.el7ost.noarch
--> Processing Dependency: python-pbr for package: python-virtualbmc-0.1.1-0.20161216115645.bd3fca1.el7ost.noarch
--> Running transaction check
---> Package python-pbr.noarch 0:1.10.0-1.el7ost will be installed
---> Package python-prettytable.noarch 0:0.7.2-1.el7 will be installed
---> Package python-pyghmi.noarch 0:1.0.12-1.el7ost will be installed
--> Processing Dependency: python-crypto >= 2.6 for package: python-pyghmi-1.0.12-1.el7ost.noarch
--> Running transaction check
---> Package python-crypto.x86_64 0:2.6.1-1.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================================================
 Package                                     Arch                            Version                                                         Repository                                          Size
======================================================================================================================================================================================================
Installing:
 python-virtualbmc                           noarch                          0.1.1-0.20161216115645.bd3fca1.el7ost                           rhelosp-11.0-puddle                                 26 k
Installing for dependencies:
 python-crypto                               x86_64                          2.6.1-1.1.el7                                                   rhelosp-11.0-ceph-2.0-mon                          470 k
 python-pbr                                  noarch                          1.10.0-1.el7ost                                                 rhelosp-11.0-puddle                                175 k
 python-prettytable                          noarch                          0.7.2-1.el7                                                     rhelosp-11.0-puddle                                 36 k
 python-pyghmi                               noarch                          1.0.12-1.el7ost                                                 rhelosp-11.0-puddle                                188 k

Transaction Summary
======================================================================================================================================================================================================
Install  1 Package (+4 Dependent packages)

Total download size: 895 k
Installed size: 3.9 M
Is this ok [y/d/N]: y
Downloading packages:
(1/5): python-prettytable-0.7.2-1.el7.noarch.rpm                                                                                                                               |  36 kB  00:00:00     
(2/5): python-pbr-1.10.0-1.el7ost.noarch.rpm                                                                                                                                   | 175 kB  00:00:00     
(3/5): python-virtualbmc-0.1.1-0.20161216115645.bd3fca1.el7ost.noarch.rpm                                                                                                      |  26 kB  00:00:00     
(4/5): python-pyghmi-1.0.12-1.el7ost.noarch.rpm                                                                                                                                | 188 kB  00:00:00     
(5/5): python-crypto-2.6.1-1.1.el7.x86_64.rpm                                                                                                                                  | 470 kB  00:00:00     
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                 1.5 MB/s | 895 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python-pbr-1.10.0-1.el7ost.noarch                                                                                                                                                  1/5 
  Installing : python-crypto-2.6.1-1.1.el7.x86_64                                                                                                                                                 2/5 
  Installing : python-pyghmi-1.0.12-1.el7ost.noarch                                                                                                                                               3/5 
  Installing : python-prettytable-0.7.2-1.el7.noarch                                                                                                                                              4/5 
  Installing : python-virtualbmc-0.1.1-0.20161216115645.bd3fca1.el7ost.noarch                                                                                                                     5/5 
  Verifying  : python-prettytable-0.7.2-1.el7.noarch                                                                                                                                              1/5 
  Verifying  : python-virtualbmc-0.1.1-0.20161216115645.bd3fca1.el7ost.noarch                                                                                                                     2/5 
  Verifying  : python-crypto-2.6.1-1.1.el7.x86_64                                                                                                                                                 3/5 
  Verifying  : python-pyghmi-1.0.12-1.el7ost.noarch                                                                                                                                               4/5 
  Verifying  : python-pbr-1.10.0-1.el7ost.noarch                                                                                                                                                  5/5 

Installed:
  python-virtualbmc.noarch 0:0.1.1-0.20161216115645.bd3fca1.el7ost                                                                                                                                    

Dependency Installed:
  python-crypto.x86_64 0:2.6.1-1.1.el7            python-pbr.noarch 0:1.10.0-1.el7ost            python-prettytable.noarch 0:0.7.2-1.el7            python-pyghmi.noarch 0:1.0.12-1.el7ost           

Complete!
[root@sealusa5 ~]# vbmc
Traceback (most recent call last):
  File "/usr/bin/vbmc", line 6, in <module>
    from virtualbmc.cmd.vbmc import main
  File "/usr/lib/python2.7/site-packages/virtualbmc/__init__.py", line 13, in <module>
    import pbr.version
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 25, in <module>
    import pkg_resources
ImportError: No module named pkg_resources


Version-Release number of selected component (if applicable):
versions mentioned in the output above

How reproducible:
always

Steps to Reproduce:
1. install RHEL 7.3
2. enable rhos-release puddles for OSP11
3. yum install python-virtualbmc

Actual results:
see above

Expected results:
vbmc should work satisfying all results via yum

Additional info:

vbmc works if I also yum install python-setuptools

Comment 1 Lucas Alvares Gomes 2017-02-08 10:35:36 UTC
Oh thanks for reporting this Dan!

I will include the pyhton-setuptools as runtime dependency in the spec.

Comment 2 Lucas Alvares Gomes 2017-02-08 10:39:28 UTC
Here's the patch fixing it: https://review.rdoproject.org/r/#/c/4961/

Comment 3 Dmitry Tantsur 2017-10-20 11:35:43 UTC
Moving to pbr per comments on the patch.

Comment 10 errata-xmlrpc 2018-02-13 16:38:01 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/RHBA-2018:0311