Bug 1251392 - Ansible docker module fails after installing docker-python from RHEL7
Ansible docker module fails after installing docker-python from RHEL7
Status: CLOSED ERRATA
Product: Fedora EPEL
Classification: Fedora
Component: ansible (Show other bugs)
epel7
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-07 04:26 EDT by Jarle Bjørgeengen
Modified: 2015-11-01 12:24 EST (History)
7 users (show)

See Also:
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-01 11:22:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jarle Bjørgeengen 2015-08-07 04:26:04 EDT
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 18:45:04 EDT
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 04:28:46 EDT
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 14:42:26 EDT
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-03 23:53:04 EDT
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-03 23:54:11 EDT
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-03 23:55:20 EDT
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-03 23:56:14 EDT
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-03 23:57:06 EDT
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 19:18:49 EDT
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 19:20:38 EDT
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 19:22:40 EDT
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 01:19:39 EDT
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 01:19:42 EDT
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 11:32:08 EDT
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 11:32:08 EDT
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 11:32:15 EDT
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 11:32:22 EDT
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 11:32:29 EDT
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 13:51:06 EDT
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 17:21:50 EDT
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 17:25:30 EDT
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 15:19:29 EDT
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 19:50:51 EDT
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-17 21:31:44 EDT
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-17 23:50:45 EDT
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 14:31:48 EDT
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 12:08:11 EDT
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 12:08:47 EDT
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 08:48:33 EDT
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 08:50:30 EDT
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 15:00:52 EDT
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 15:00:54 EDT
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 14:49:51 EDT
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 14:50:05 EDT
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 11:22:35 EST
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 12:23:51 EST
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.