Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'module' object has no attribute 'DEFAULT_DOCKER_API_VERSION' #40

Closed
jimmydivvy opened this issue May 5, 2015 · 7 comments
Closed

'module' object has no attribute 'DEFAULT_DOCKER_API_VERSION' #40

jimmydivvy opened this issue May 5, 2015 · 7 comments

Comments

@jimmydivvy
Copy link

Version 1.2 of Docker-Py has broken the Ansible docker plugin. They've committed a fix, but it hasn't been released in a stable version.

In the meantime, docker.ubuntu can resolve by forcing pip to install version 1.1 of Docker.py instead of using the latest.

(See discussion: ansible/ansible#10879)

@hatsch
Copy link
Contributor

hatsch commented May 5, 2015

we also ran into this issue and until an ansible update is out, it renders this otherwise very useful role useless.
i'd suggest to make the versions of the pip packages using variables. so one could at least pin them to a working version.
if you like the idea, i can prepare a patch.

@angstwad
Copy link
Owner

angstwad commented May 5, 2015

Honestly, I'd like to see something that by default installs the latest docker-py, but allows for optional pinning to prevent this type of issue in the future.

This issue is technically fixed in the devel branch on this issue: ansible/ansible-modules-core#1227 so we shouldn't go crazy trying to fix it in this role.

@hatsch
Copy link
Contributor

hatsch commented May 5, 2015

true, but the defaults for the role could be 'latest' so without interaction everything stays as it is now, but pinning to a specific version becomes an option available.

i know this is fixed in devel, but we run a "stable" version and i'd like to keep that :)
as docker and ansible are both fast moving projects, an incompatibility like that could happen anytime again.

@angstwad
Copy link
Owner

angstwad commented May 5, 2015

Sure. And I agree, that's what I'd like to see -- by default, install the latest docker-py; allow optional pinning by overriding a default variable.

If you can provide a patch that does this, I'll happily accept it.

@angstwad
Copy link
Owner

angstwad commented May 5, 2015

This was resolved in PR #41

@angstwad angstwad closed this as completed May 5, 2015
@hatsch
Copy link
Contributor

hatsch commented May 5, 2015

thanks for merging!

@PavelVanecek
Copy link

I have discovered this issue and as a complete beginner it was hard to find out what is wrong. So for the future generations coming to see this issue:

The fix is to override the docker_py version in your playbook, like this:

---

- hosts: playground
  roles:
    - role: angstwad.docker_ubuntu
      pip_version_docker_py: 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants