Bug 1419720 - ImportError: No module named pkg_resources when running vbmc. Missing python-setuptools dependency
Summary: ImportError: No module named pkg_resources when running vbmc. Missing python-...
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-pbr
Version: 11.0 (Ocata)
Hardware: x86_64
OS: Linux
Target Milestone: z4
: 11.0 (Ocata)
Assignee: Matthias Runge
QA Contact: Shai Revivo
Depends On:
Blocks: 1522652
TreeView+ depends on / blocked
Reported: 2017-02-06 21:19 UTC by Dan Yasny
Modified: 2018-02-13 16:38 UTC (History)
11 users (show)

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.
Clone Of:
: 1522652 (view as bug list)
Last Closed: 2018-02-13 16:38:01 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0311 0 normal SHIPPED_LIVE Red Hat OpenStack Platform 11 Bug Fix and Enhancement Advisory 2018-02-14 00:05:57 UTC

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
 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 

  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           

[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:

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.


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