Push imaging failed with unexpected keyword argument 'insecure_registry'

Bug #1746703 reported by Jianghua Wang
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Undecided
Jianghua Wang
Ocata
Fix Released
Undecided
Unassigned
Pike
Fix Released
Undecided
Unassigned
Queens
Fix Released
Undecided
Jianghua Wang

Bug Description

ERROR:kolla.common.utils.rabbitmq:Unknown error when pushing
Traceback (most recent call last):
  File "/root/deployment/kolla/kolla/image/build.py", line 313, in run
    self.push_image(image)
  File "/root/deployment/kolla/kolla/image/build.py", line 333, in push_image
    insecure_registry=True):
TypeError: push() got an unexpected keyword argument 'insecure_registry'

Revision history for this message
Jianghua Wang (wjh-fresh) wrote :

I think the problem is that:
The parameter of 'insecure_registry' has been removed by: https://github.com/docker/docker-py/commit/b180b8770a265e33099bd6da76c3e556a1028491

But kolla is still using 'insecure_registry'
https://github.com/openstack/kolla/blob/master/kolla/image/build.py#L333

Revision history for this message
Jianghua Wang (wjh-fresh) wrote :

The new release (docker 3.0.0) was released some hours before:
https://pypi.python.org/pypi/docker

[root@localhost deployment]# pip show docker
Name: docker
Version: 3.0.0
Summary: A Python library for the Docker Engine API.
Home-page: https://github.com/docker/docker-py
Author: Joffrey F
Author-email: <email address hidden>

Revision history for this message
Jianghua Wang (wjh-fresh) wrote :

I've proposed the fix but I don't know why the "Closes-Bug" in the patch why didn't trigger the status update at here. So pasted the patch link manually:
https://review.openstack.org/#/c/539891/

Changed in kolla:
assignee: nobody → Jianghua Wang (wjh-fresh)
status: New → In Progress
Revision history for this message
Daniel (dastor) wrote :

I just ran into the same Problem, but your fix breaks my and possibly other existing setups,
i have proposed a fix for docker >= 3.0: https://review.openstack.org/#/c/540364/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/539891
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=ad80bfd0693f61df5bf46a4ba2dbb0a87d3fe6f9
Submitter: Zuul
Branch: master

commit ad80bfd0693f61df5bf46a4ba2dbb0a87d3fe6f9
Author: Jianghua Wang <email address hidden>
Date: Thu Feb 1 10:19:40 2018 +0000

    Remove the unsupported 'insecure_registry' for >=docker 3.0.0

    The argument of 'insecure_registry' for image push has been removed
    by this commit (in docker 3.0.0):
    https://github.com/docker/docker-py/commit/b180b8770a265e33099bd6da76c3e556a1028491

    Actually this argument was marked as deprecated and unfunctional
    before this removing.

    This commit is to remove this parameter at invoking the push() function
    when docker version >= 3.0.0.

    Change-Id: Ifa7d304d08a4073dcb1dff751d5a443c112cd377
    Closes-Bug: #1746703

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/541248

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/541249

Revision history for this message
Timothy Carr (shadowphax) wrote :

Until fix has been committed, pip install docker==2.7.0 which will ensure that "kolla-build --push --registry <ip_addr:port>" works

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (stable/pike)

Reviewed: https://review.openstack.org/541248
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=c7c5edea674d7bd1a03c24cf69f952ce89c758db
Submitter: Zuul
Branch: stable/pike

commit c7c5edea674d7bd1a03c24cf69f952ce89c758db
Author: Jianghua Wang <email address hidden>
Date: Thu Feb 1 10:19:40 2018 +0000

    Remove the unsupported 'insecure_registry' for >=docker 3.0.0

    The argument of 'insecure_registry' for image push has been removed
    by this commit (in docker 3.0.0):
    https://github.com/docker/docker-py/commit/b180b8770a265e33099bd6da76c3e556a1028491

    Actually this argument was marked as deprecated and unfunctional
    before this removing.

    This commit is to remove this parameter at invoking the push() function
    when docker version >= 3.0.0.

    Change-Id: Ifa7d304d08a4073dcb1dff751d5a443c112cd377
    Closes-Bug: #1746703
    (cherry picked from commit ad80bfd0693f61df5bf46a4ba2dbb0a87d3fe6f9)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (stable/ocata)

Reviewed: https://review.openstack.org/541249
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=72c86a56a086df4959e31813aa972614fc44e6e5
Submitter: Zuul
Branch: stable/ocata

commit 72c86a56a086df4959e31813aa972614fc44e6e5
Author: Jianghua Wang <email address hidden>
Date: Thu Feb 1 10:19:40 2018 +0000

    Remove the unsupported 'insecure_registry' for >=docker 3.0.0

    The argument of 'insecure_registry' for image push has been removed
    by this commit (in docker 3.0.0):
    https://github.com/docker/docker-py/commit/b180b8770a265e33099bd6da76c3e556a1028491

    Actually this argument was marked as deprecated and unfunctional
    before this removing.

    This commit is to remove this parameter at invoking the push() function
    when docker version >= 3.0.0.

    Change-Id: Ifa7d304d08a4073dcb1dff751d5a443c112cd377
    Closes-Bug: #1746703
    (cherry picked from commit ad80bfd0693f61df5bf46a4ba2dbb0a87d3fe6f9)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 6.0.0.0rc1

This issue was fixed in the openstack/kolla 6.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 5.0.2

This issue was fixed in the openstack/kolla 5.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 4.0.4

This issue was fixed in the openstack/kolla 4.0.4 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.