Bug 1601767

Summary: pbr VersionInfo: ImportError: No module named pkg_resources
Product: Red Hat OpenStack Reporter: Cyril Lopez <cylopez>
Component: python-pbrAssignee: hguemar
Status: CLOSED EOL QA Contact: Shai Revivo <srevivo>
Severity: medium Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: apevec, bfournie, cylopez, dtantsur, hguemar, karlthered, lhh, mburns, srevivo
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-10 17:32:08 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 Cyril Lopez 2018-07-17 08:16:24 UTC
Description of problem:

vbmc command line doesn't work

Version-Release number of selected component (if applicable):
python2-virtualbmc-1.2.0-1.1.el7ost

How reproducible:
/bin/vbmc --help or add or list...


Actual results:
version.py:438:_get_version_from_pkg_resources:ImportError: No module named pkg_resources

Traceback (most recent call last):
  File "/bin/vbmc", line 6, in <module>
    from virtualbmc.cmd.vbmc import main
  File "/usr/lib/python2.7/site-packages/virtualbmc/__init__.py", line 15, in <module>
    __version__ = pbr.version.VersionInfo('virtualbmc').version_string()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 466, in version_string
    return self.semantic_version().brief_string()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 461, in semantic_version
    self._semantic = self._get_version_from_pkg_resources()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 438, in _get_version_from_pkg_resources
    import pkg_resources
ImportError: No module named pkg_resources



Additional info:

Comment 1 Cyril Lopez 2018-07-17 08:17:53 UTC
Workaround : install python-setuptools-0.9.8-7.el7.noarch package.

I thinks here we miss a dependency with python-setuptools

Comment 2 Dmitry Tantsur 2018-07-17 08:44:48 UTC
Seems like it's a pbr bug, since pbr is importing the missing module.

Comment 4 Haïkel Guémar 2018-07-18 15:32:31 UTC
Assigned to my RH account (too lazy to switch accounts /o\)

Comment 5 Dmitry Tantsur 2018-07-18 15:35:38 UTC
Please paste the version of pbr you had when seeing this problem.

Comment 6 Cyril Lopez 2018-07-18 15:51:22 UTC
pbr ?
python2-pbr-3.1.1-2.el7ost.noarch ?

Comment 7 Haïkel Guémar 2018-07-18 16:10:49 UTC
Reproducible with python-pbr-4.1.0-1.fc29, fixed in python-pbr-4.1.0-2.fc29 (rawhide)

Backport is in preparation for RDO.

Comment 8 Fedora Update System 2018-07-18 16:41:39 UTC
python-pbr-3.1.1-8.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-c93eb32ca7

Comment 9 Fedora Update System 2018-07-19 20:20:48 UTC
python-pbr-3.1.1-8.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-c93eb32ca7

Comment 10 Haïkel Guémar 2018-07-20 13:53:43 UTC
It's now in pike/queens/rocky testing repositories.

Comment 15 Christopher Brown 2018-11-09 12:16:30 UTC
Please can we get this fixed, it has been dragging on since OSP 11, each closed for incorrect reasons in the following bz:

1522652
1419720

Here is the patch for RDO:

https://review.rdoproject.org/r/#/c/4961/

which has been rejected saying it needs to get fixed in pbr.

Comment 16 Christopher Brown 2018-11-09 12:27:30 UTC
I've created a new patch:

https://review.rdoproject.org/r/17322

Thanks

Comment 18 Mike Burns 2019-01-21 20:49:31 UTC
The referenced version is fixed in OSP 14 (4.1.0-2)

Comment 20 Lon Hohberger 2023-07-10 17:32:08 UTC
OSP13 support officially ended on 27 June 2023

Comment 21 Red Hat Bugzilla 2023-11-08 04:25:06 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days