docker-py 2.1.0 looks broken with docker 1.13.1 which breaks Kolla stable/ocata
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla |
Won't Fix
|
Critical
|
Jeffrey Zhang |
Bug Description
All-in-one deployment fails kolla-ansible prechecks/deploy with Docker 1.13.1 and docker-py 2.1.0. Client connection string for docker-py not populated by the current code. Rolling back to docker 1.12.3 does not fix the issue. This is on a Gentoo system. This appears to work on Ubuntu Xenial.
TASK [elasticsearch : Get container facts] *******
task path: /usr/share/
Using module file /usr/share/
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo ~/.ansible/
<localhost> PUT /tmp/tmpLq2z3_ TO /root/.
<localhost> EXEC /bin/sh -c 'chmod u+x /root/.
<localhost> EXEC /bin/sh -c '/usr/bin/python /root/.
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_
main()
File "/tmp/ansible_
client = docker.
AttributeError: 'module' object has no attribute 'Client'
fatal: [localhost]: FAILED! => {
"changed": false,
"failed": true,
"invocation": {
},
"module_
"module_
"msg": "MODULE FAILURE"
}
Defective code (ansible/
import docker
def main():
argument_spec = dict(
)
module = AnsibleModule(
results = dict(changed=False, _containers=[])
client = docker.
containers = client.containers()
names = module.
if names and not isinstance(names, list):
names = [names]
for container in containers:
for container_name in container['Names']:
# remove '/' prefix character
if names and container_name not in names:
module.
description: | updated |
Changed in kolla: | |
milestone: | ocata-rc2 → 4.0.1 |
Changed in kolla: | |
milestone: | 4.0.1 → 4.0.2 |
Changed in kolla: | |
milestone: | 4.0.2 → 4.0.3 |
Changed in kolla: | |
milestone: | 4.0.3 → 4.0.4 |
The issue here is docker-py version is not backwards compatible and replaced docker.Client to docker.APIclient.
https:/ /github. com/docker/ docker- py/releases/ tag/2.0. 0
This is a breaking change to supported distros (ubuntu, centos, rhel,debian, oracle linux) since they does not have docker-py => 2.0.0 and in pip repositories
Could not find a version that satisfies the requirement docker-py==2.1.0 (from versions: 0.0.4, 0.0.5, 0.0.6, 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.2.0, 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.6.0, 0.7.0, 0.7.1, 0.7.2, 1.0.0, 1.1.0, 1.2.1, 1.2.2, 1.2.3rc1, 1.2.3, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.6.0, 1.7.0rc1, 1.7.0rc2, 1.7.0rc3, 1.7.0, 1.7.1, 1.7.2, 1.8.0rc2, 1.8.0rc4, 1.8.0rc5, 1.8.0, 1.8.1, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0, 1.10.1, 1.10.2, 1.10.3, 1.10.4, 1.10.5, 1.10.6)
No matching distribution found for docker-py==2.1.0
This is a change that we'll have to do in the future but not now as it will break supported distributions.