Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1526064

Summary: python-cryptography should depend on python-setuptools
Product: Red Hat Enterprise Linux 7 Reporter: Alfredo Moralejo <amoralej>
Component: python-cryptographyAssignee: Christian Heimes <cheimes>
Status: CLOSED DUPLICATE QA Contact: Kaleem <ksiddiqu>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: apevec, ssigwald
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: python-cryptography-1.7.2-2.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-26 16:47:16 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 Alfredo Moralejo 2017-12-14 17:35:26 UTC
Description of problem:

When running packstack installation in a base Centos7 system, following error appears:

[vadmin@openstackqueen yum.repos.d]$ sudo packstack --allinone
ERROR:root:Failed to load plugin from file ssl_001.py
ERROR:root:Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 923, in loadPlugins
    moduleobj = __import__(moduleToLoad)
  File "/usr/lib/python2.7/site-packages/packstack/plugins/ssl_001.py", line 20, in <module>
    from OpenSSL import crypto
  File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 13, in <module>
    from cryptography.hazmat.primitives.asymmetric import dsa, rsa
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py", line 14, in <module>
    from cryptography.hazmat.backends.interfaces import RSABackend
  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
    import pkg_resources
ImportError: No module named pkg_resources

ERROR:root:Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 988, in main
    loadPlugins()
  File "/usr/lib/python2.7/site-packages/packstack/installer/run_setup.py", line 931, in loadPlugins
    raise Exception("Failed to load plugin from file %s" % item)
Exception: Failed to load plugin from file ssl_001.py


ERROR : Failed to load plugin from file ssl_001.py



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


How reproducible:

allways

Steps to Reproduce:
1. Enable RDO repositories in a RHEL 7.4 system.

cd /etc/yum.repos.d/
wget http://trunk.rdoproject.org/centos7/delorean-deps.repo
wget http://trunk.rdoproject.org/centos7/current-passed-ci/delorean-repo

2. install packstack

yum install -y openstack-packstack

3. run packstack allinone option

packstack --allinone

Actual results:

Installation fails with error:

  File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
    import pkg_resources
ImportError: No module named pkg_resources



Expected results:

packstack command should run fine


Additional info:

File /usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/__init__.py
is importing pkg_resource provided by python-setuptools but it's not included as dependency. I think that's a missing Requires.

Comment 4 Alan Pevec 2018-04-13 23:26:03 UTC
Version-Release number of selected component: python2-cryptography-1.7.2-1.el7_4.1

FWIW pkg_resource was removed since upstream version 1.9
https://github.com/pyca/cryptography/commit/51032351297b9bf7d783b7138ac0c142d8e38918#diff-a2fa29b78aa32458ce597e791c8ac549

Comment 5 Christian Heimes 2019-02-26 16:47:16 UTC
The problem has been resolved in RHEL 7.5 by https://access.redhat.com/errata/RHBA-2018:0720 . python-cryptography now correctly depends on python-setuptools.

*** This bug has been marked as a duplicate of bug 1459947 ***