Bug 1292776

Summary: ImportError: cannot import name NotFound
Product: Red Hat Enterprise Linux 7 Reporter: Alex Jia <ajia>
Component: atomicAssignee: Lokesh Mandvekar <lsm5>
Status: CLOSED ERRATA QA Contact: atomic-bugs <atomic-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 7.4CC: bbaude, dwalsh, lsm5, walters
Target Milestone: rcKeywords: Extras, TestBlocker
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: atomic-1.8-4.git958d939.el7_2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-31 23:25:36 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 Alex Jia 2015-12-18 10:21:16 UTC
Description of problem:
We added an Atomic/verify.py module in atomic(a3d025c), this module will import NotFound from docker.errors, but in fact, the NotFound doesn't exist in current docker upstream(effdb3b).

Version-Release number of selected component (if applicable):
[root@dell-per630-02 atomic]# rpm -q docker
docker-1.9.1-9.el7.x86_64

[root@dell-per630-02 atomic]# git rev-parse HEAD
a3d025cc1a0222be516970a9bdab207be5074b20

How reproducible:
always

Steps to Reproduce:
1. git clone atomic docker source codes from github
2. ./atomic

Actual results:

[root@dell-per630-02 docker]# git rev-parse HEAD
effdb3b7635a832be1db9704a0264096c25130f1

[root@dell-per630-02 atomic]# git rev-parse HEAD
a3d025cc1a0222be516970a9bdab207be5074b20

[root@dell-per630-02 atomic]# ./atomic
Traceback (most recent call last):
  File "./atomic", line 34, in <module>
    from Atomic.verify import Verify
  File "/home/ajia/Workspace/atomic/Atomic/verify.py", line 4, in <module>
    from docker.errors import NotFound
ImportError: cannot import name NotFound

Expected results:
fix it.

Additional info:

Comment 2 Daniel Walsh 2015-12-18 13:36:58 UTC
I think you need an updated version of python-docker-py

python
Python 2.7.10 (default, Oct 15 2015, 20:40:13) 
[GCC 5.1.1 20150618 (Red Hat 5.1.1-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from docker.errors import NotFound
>>> 

rpm -q python-docker-py
python-docker-py-1.6.0-1.fc24.noarch

Comment 3 Alex Jia 2015-12-21 03:06:57 UTC
(In reply to Alex Jia from comment #0)
> Version-Release number of selected component (if applicable):
> [root@dell-per630-02 atomic]# rpm -q docker
> docker-1.9.1-9.el7.x86_64

# rpm -q python-docker-py
python-docker-py-1.4.0-118.el7.noarch

Comment 4 Daniel Walsh 2015-12-21 14:27:08 UTC
So the atomic command spec file has to be changed to require python-docker-py-1.6.0-1 or greater.

Comment 5 Alex Jia 2016-01-06 03:52:44 UTC
(In reply to Daniel Walsh from comment #4)
> So the atomic command spec file has to be changed to require
> python-docker-py-1.6.0-1 or greater.

There is no any change in spec file of the atomic-1.8-2.gita35ae18.el7.x86_64.

[root@dell-per630-02 rpmbuild]# rpm -q atomic
atomic-1.8-2.gita35ae18.el7.x86_64

[root@dell-per630-02 rpmbuild]# grep "python-docker-py >" SPECS/atomic.spec 
- Resolves: rhbz#1278145 - depend on python-docker-py >= 1.4.0-118

Comment 6 Alex Jia 2016-01-06 06:17:09 UTC
Daniel, the component should be atomic not python-docker-py I think.

Comment 7 Daniel Walsh 2016-01-06 13:57:40 UTC
Lokesh can you fix this in the atomic-1.8 build for rhel7?

Comment 8 Colin Walters 2016-01-06 16:37:07 UTC
This affects the internal Atomic Host autobrew tree.  See https://mojo.redhat.com/docs/DOC-967002

Comment 9 Colin Walters 2016-01-06 16:37:23 UTC
# rpm -q python-docker-py
python-docker-py-1.4.0-118.el7.noarch
#

Comment 10 Brent Baude 2016-01-06 17:11:26 UTC
We need a python-docker-py-1.6x in RHEL and also the atomic spec needs to dep it.  We discussed this informally prior to the Christmas break.

Comment 11 Lokesh Mandvekar 2016-01-06 18:16:09 UTC
Dan, iirc, you had a commit on your branch of docker-py for atomic to work well, but it wasn't upstreamed last time I checked. Should I be using your master branch or upstream's for docker-py 1.6.0?

Comment 12 Lokesh Mandvekar 2016-01-07 03:19:02 UTC
I meant RE: William's remote inspect binding commit here: https://github.com/rhatdan/docker-py/commits/master

Comment 13 Alex Jia 2016-01-07 03:44:29 UTC
Because the bug will block futher atomic test, please fix it asap.

Comment 15 Daniel Walsh 2016-01-07 14:55:53 UTC
Yes I believe we need to carry the patch.

Comment 16 Alex Jia 2016-01-15 08:56:22 UTC
I gave a try for python-docker-py-1.6.0-1.el7.noarch, the atomic-1.8-2.gita35ae18.el7.x86_64 works well, and we also need atomic depends on python-docker-py >= 1.6.0-1 in SPEC file of next atomic version.

Comment 17 Lokesh Mandvekar 2016-01-19 18:54:28 UTC
will be fixed in ${Fixed In Version} once built. This will be added to the 7.2.2 advisory

Comment 19 Alex Jia 2016-01-20 10:37:18 UTC
# rpm -qRp atomic-1.8-4.git958d939.el7.x86_64.rpm | grep python-docker-py
python-docker-py >= 1.6.0-1

Comment 20 Alex Jia 2016-02-01 05:08:29 UTC
Per comment 19, moving the bug to VERIFIED status.

Comment 21 Alex Jia 2016-02-01 07:15:36 UTC
*** Bug 1296390 has been marked as a duplicate of this bug. ***

Comment 23 errata-xmlrpc 2016-03-31 23:25:36 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