Zun

adopt docker-py 2.0 api

Registered by Shunli Zhou

As docker-py 2.0 has changed the client.Client to client.DockerClient, and lots of the function call has changed.

This BP propose to adopt the docker-py 2.0 api in zun.

Refer to:
https://bugs.launchpad.net/zun/+bug/1693425
https://github.com/docker/docker-py/commit/f5ac10c469fca252e69ae780749f4ec6fe369789
http://www.nervgeek.com/mr9esx/docker-py-2-0-%E6%96%B0%E5%BB%BA%E5%AE%B9%E5%99%A8%E5%8F%82%E6%95%B0%E7%AC%94%E8%AE%B0
https://github.com/docker/docker-py/blob/master/docs/change-log.md

UPDATE:
* Upgrade to docker 2.0 (DONE)
* Change to client.DockerClient (TBD)

Blueprint information

Status:
Complete
Approver:
hongbin
Priority:
Not
Drafter:
Shunli Zhou
Direction:
Needs approval
Assignee:
None
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
hongbin

Related branches

Sprints

Whiteboard

Seems all docker related openstack projects uses the docker-py client, which latest version is 1.10.6. So there is no need to change to 'docker' client which support 2.0 API.

Alternatives is we keep this BP low priority to tracker the 2.0 API progress.

[shu-mutou]
I found that Magnum uses docker>=2.0.0 as follow: https://github.com/openstack/magnum/blob/master/requirements.txt#L16
So if we try to start devstack with Magnum and Zun, installed docker-py==1.10.6 is overwritten by docker==2.3.0 for now. Due to above, I got error to load docker.client.Client when start devstack.
Seeing following commit for Magnum, it seems not bad to bump up to 2.x.x.
https://github.com/openstack/magnum/commit/1e0785c32089229a65f0a3d469f899440d7af2a9
https://docker-py.readthedocs.io/en/stable/api.html

[hongbin]
I see. I will increase the priority of the BP and find sometimes to work on it.

[hongbin]
We bump the requirements to docker>=2.0.0 already, and has migrated from client.Client to client.APIClient. An optional follow-up is to migrate from client.APIClient to client.DockerClient .

Gerrit topic: https://review.openstack.org/#q,topic:bp/adopt-docker-py-2,n,z

Addressed by: https://review.openstack.org/475526
    [WIP] Upgrade from docker-py to docker

Addressed by: https://review.openstack.org/482403
    Fix another upgrade from docker-py to docker place

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.