Bug 1268926

Summary: ImportError: No module named pkg_resources
Product: Red Hat Enterprise Linux 7 Reporter: Micah Abbott <miabbott>
Component: atomicAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: ajia, sgraf, walters
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-31 23:25:00 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 Micah Abbott 2015-10-05 16:28:06 UTC
The RHEL Atomic Host 7.2 ostree compose from 10/2 has a broken version of the 'atomic' CLI command

# atomic host status
Traceback (most recent call last):
  File "/bin/atomic", line 31, in <module>
    import Atomic
  File "/usr/lib/python2.7/site-packages/Atomic/__init__.py", line 3, in <module>
    from pkg_resources import get_distribution
ImportError: No module named pkg_resources


-bash-4.2# rpm-ostree status
  TIMESTAMP (UTC)         VERSION   ID             OSNAME               REFSPEC                                                        
* 2015-10-02 17:30:31     7.2       fc5eb3f39d     rhel-atomic-host     rhel7.2:rhel-atomic-host/7/x86_64/standard                     
  2015-09-11 18:33:12     7.1.5     8060f80ffd     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     


-bash-4.2# rpm -qi atomic
Name        : atomic
Version     : 1.5
Release     : 2.git191fb53.el7
Architecture: x86_64
Install Date: Fri 02 Oct 2015 05:23:54 PM UTC
Group       : Unspecified
Size        : 277886
License     : LGPLv2+
Signature   : RSA/SHA256, Thu 01 Oct 2015 11:47:15 AM UTC, Key ID 938a80caf21541eb
Source RPM  : atomic-1.5-2.git191fb53.el7.src.rpm
Build Date  : Wed 30 Sep 2015 06:59:13 PM UTC
Build Host  : x86-030.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : https://github.com/projectatomic/atomic
Summary     : Tool for managing ProjectAtomic systems and containers
Description :
The goal of Atomic is to provide a high level, coherent entrypoint to the
system, and fill in gaps.

For Docker, atomic can make it easier to interact with special kinds of
containers, such as super-privileged debugging tools and the like.

The atomic host subcommand wraps rpm-ostree, currently just providing a
friendlier name, but in the future Atomic may provide more unified
management.

Comment 1 Colin Walters 2015-10-05 16:37:25 UTC
Did we get a setuptools runtime dependency too?  That'd be a bit unfortunate.

This is likely a regression from https://github.com/projectatomic/atomic/pull/117
and https://github.com/projectatomic/atomic/pull/130

Comment 3 Colin Walters 2015-10-05 16:54:14 UTC
My commit for this:

https://github.com/projectatomic/atomic/commit/106878815f5a5dd61b0e527c502fb6eeaf0c9c67

was effectively reverted and introduced the pkg_resources dependency.

Comment 7 Alex Jia 2015-10-27 09:21:33 UTC
The bug has been verified on atomic-1.5-4.git7e4365f.el7.x86_64.

[cloud-user@atomic-00 ~]$ atomic host status
  TIMESTAMP (UTC)         VERSION               ID             OSNAME               REFSPEC                                                               
* 2015-10-18 19:00:32     7.2                   2dc68dbd66     rhel-atomic-host     rhel-atomic-host:rhel-atomic-host/7/x86_64/standard   

[cloud-user@atomic-00 ~]$ rpm-ostree status
  TIMESTAMP (UTC)         VERSION               ID             OSNAME               REFSPEC                                                               
* 2015-10-18 19:00:32     7.2                   2dc68dbd66     rhel-atomic-host     rhel-atomic-host:rhel-atomic-host/7/x86_64/standard                   
    
[cloud-user@atomic-00 ~]$ rpm -q docker atomic
docker-1.8.2-8.el7.x86_64
atomic-1.5-4.git7e4365f.el7.x86_64

[cloud-user@atomic-00 ~]$ rpm -qi atomic
Name        : atomic
Version     : 1.5
Release     : 4.git7e4365f.el7
Architecture: x86_64
Install Date: Sun 18 Oct 2015 06:54:22 PM UTC
Group       : Unspecified
Size        : 277756
License     : LGPLv2+
Signature   : (none)
Source RPM  : atomic-1.5-4.git7e4365f.el7.src.rpm
Build Date  : Fri 09 Oct 2015 07:54:32 PM UTC
Build Host  : x86-021.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : https://github.com/projectatomic/atomic
Summary     : Tool for managing ProjectAtomic systems and containers
Description :
The goal of Atomic is to provide a high level, coherent entrypoint to the
system, and fill in gaps.

For Docker, atomic can make it easier to interact with special kinds of
containers, such as super-privileged debugging tools and the like.

The atomic host subcommand wraps rpm-ostree, currently just providing a
friendlier name, but in the future Atomic may provide more unified
management.

Comment 10 errata-xmlrpc 2016-03-31 23:25:00 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-2016-0527.html