Bug 1251392 - Ansible docker module fails after installing docker-python from RHEL7
Summary: Ansible docker module fails after installing docker-python from RHEL7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: ansible
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-07 08:26 UTC by Jarle Bjørgeengen
Modified: 2015-11-01 17:24 UTC (History)
7 users (show)

Fixed In Version: 1.9.3-2.fc23 ansible-1.9.4-1.el6 ansible-1.9.4-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-01 16:22:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1252422 0 unspecified CLOSED docker.py in new package docker-python does not work with client certificate authentication 2021-02-22 00:41:40 UTC

Internal Links: 1252422

Description Jarle Bjørgeengen 2015-08-07 08:26:04 UTC
Description of problem:

After introduction of docker-python into RHEL7 and retiring python-docker-py from EPEL the ansible docker module fails with:


    [root@mime docker-ansible]# ansible-playbook /etc/docker-ansible/graphite.playbook --extra-vars "state=started"
     
    PLAY [localhost] **************************************************************
     
    GATHERING FACTS ***************************************************************
    ok: [localhost]
     
    TASK: [Graphite gunicorn] *****************************************************
    failed: [localhost] => {"failed": true, "parsed": false}
    Traceback (most recent call last):
      File "/root/.ansible/tmp/ansible-tmp-1438932912.25-255506252707906/docker", line 3132, in <module>
        main()
      File "/root/.ansible/tmp/ansible-tmp-1438932912.25-255506252707906/docker", line 1464, in main
        check_dependencies(module)
      File "/root/.ansible/tmp/ansible-tmp-1438932912.25-255506252707906/docker", line 482, in check_dependencies
        versioninfo = get_docker_py_versioninfo()
      File "/root/.ansible/tmp/ansible-tmp-1438932912.25-255506252707906/docker", line 458, in get_docker_py_versioninfo
        version.append(int(digit))
    ValueError: invalid literal for int() with base 10: '0-de'
     
     
    FATAL: all hosts have already failed -- aborting
     
    PLAY RECAP ********************************************************************
               to retry, use: --limit @/root/graphite.playbook.retry
     
    localhost                  : ok=1    changed=0    unreachable=0    failed=1  
     
    [root@mime docker-ansible]#


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


How reproducible:
Consistent

Steps to Reproduce:
1. Replace python-docker-py from EPEL with docker-python
2. Run an ansible playbook that uses the docker module


Actual results:
Ansible module fails with type mismatch as it expects integer values from get_docker_py_versioninfo but get strings too since the version of docker-python shipped with RHEL7 (from pythons perspective) is 1.4.0-dev

Expected results:
An ansible docker module that can handle apperance of strings the docker-python 

Additional info:

Comment 1 David Summers 2015-08-12 22:45:04 UTC
I ran into this same situation.

I tried modifying /usr/lib/python2.7/site-packages/docker/version.py to take out the "-dev" and got past this error (and on to the next one).

Is there a work-around in ansible for this?   Seems this is a show-stopper unless there is some easy way to work around it.

Comment 2 Jarle Bjørgeengen 2015-08-13 08:28:46 UTC
You can work around it by replacing docker-python with this in the playbook.

  tasks:
   - name: Installed packages
     yum: name={{item}} state=present
     with_items:
      - docker
      - python-pip
   - name: Absent packages
     yum: name={{item}} state=absent
     with_items:
      - docker-python
      - python-docker-py

   - name: Python modules
     pip: name=docker-py version=1.2.3

Pinning to version 1.2.3 apparently also avoid some other issues with docker.py in recent versions.

Comment 3 Kevin Fenzi 2015-08-17 18:42:26 UTC
This is (I think) fixed in 1.9.3, which just had a rc1 come out last week. 

Hopefully the final 1.9.3 will be out tomorrow and I can push that out.

Comment 4 Fedora Update System 2015-09-04 03:53:04 UTC
ansible-1.9.3-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15047

Comment 5 Fedora Update System 2015-09-04 03:54:11 UTC
ansible-1.9.3-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15048

Comment 6 Fedora Update System 2015-09-04 03:55:20 UTC
ansible-1.9.3-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15049

Comment 7 Fedora Update System 2015-09-04 03:56:14 UTC
ansible-1.9.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7924

Comment 8 Fedora Update System 2015-09-04 03:57:06 UTC
ansible-1.9.3-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7925

Comment 9 Fedora Update System 2015-09-04 23:18:49 UTC
ansible-1.9.3-1.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15049

Comment 10 Fedora Update System 2015-09-04 23:20:38 UTC
ansible-1.9.3-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15048

Comment 11 Fedora Update System 2015-09-04 23:22:40 UTC
ansible-1.9.3-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15047

Comment 12 Fedora Update System 2015-09-05 05:19:39 UTC
ansible-1.9.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7924

Comment 13 Fedora Update System 2015-09-05 05:19:42 UTC
ansible-1.9.3-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7925

Comment 14 Fedora Update System 2015-09-08 15:32:08 UTC
ansible-1.9.3-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7997

Comment 15 Fedora Update System 2015-09-08 15:32:08 UTC
ansible-1.9.3-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15368

Comment 16 Fedora Update System 2015-09-08 15:32:15 UTC
ansible-1.9.3-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15369

Comment 17 Fedora Update System 2015-09-08 15:32:22 UTC
ansible-1.9.3-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7998

Comment 18 Fedora Update System 2015-09-08 15:32:29 UTC
ansible-1.9.3-2.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15370

Comment 19 Fedora Update System 2015-09-08 17:51:06 UTC
ansible-1.9.3-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15368

Comment 20 Fedora Update System 2015-09-08 21:21:50 UTC
ansible-1.9.3-2.fc21 has been pushed to the Fedora 21 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15370

Comment 21 Fedora Update System 2015-09-08 21:25:30 UTC
ansible-1.9.3-2.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15369

Comment 22 Fedora Update System 2015-09-09 19:19:29 UTC
ansible-1.9.3-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7998

Comment 23 Fedora Update System 2015-09-09 23:50:51 UTC
ansible-1.9.3-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update ansible'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-7997

Comment 24 Fedora Update System 2015-09-18 01:31:44 UTC
ansible-1.9.3-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2015-09-18 03:50:45 UTC
ansible-1.9.3-2.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2015-09-18 18:31:48 UTC
ansible-1.9.3-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2015-10-05 16:08:11 UTC
ansible-1.9.3-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-ba9b7739ee

Comment 28 Fedora Update System 2015-10-05 16:08:47 UTC
ansible-1.9.3-3.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-fd299a6f9f

Comment 29 Fedora Update System 2015-10-07 12:48:33 UTC
ansible-1.9.3-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update ansible'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-ba9b7739ee

Comment 30 Fedora Update System 2015-10-07 12:50:30 UTC
ansible-1.9.3-3.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update ansible'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-fd299a6f9f

Comment 31 Fedora Update System 2015-10-10 19:00:52 UTC
ansible-1.9.4-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-0d49710dc2

Comment 32 Fedora Update System 2015-10-10 19:00:54 UTC
ansible-1.9.4-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-1ba9b07c1e

Comment 33 Fedora Update System 2015-10-12 18:49:51 UTC
ansible-1.9.4-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update ansible'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-1ba9b07c1e

Comment 34 Fedora Update System 2015-10-12 18:50:05 UTC
ansible-1.9.4-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'yum --enablerepo=epel-testing update ansible'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-0d49710dc2

Comment 35 Fedora Update System 2015-11-01 16:22:35 UTC
ansible-1.9.4-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 36 Fedora Update System 2015-11-01 17:23:51 UTC
ansible-1.9.4-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


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