Lack the function of docker login before pushing to registry

Bug #1642856 reported by wangwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Triaged
Wishlist
Unassigned

Bug Description

When using kolla-ansible project, I found that the function of docker login is called before pulling from the registry. We can configure the following items in global.yml used to login the registry:

...
docker_common_options:
    auth_email: "{{ docker_registry_email }}"
    auth_password: "{{ docker_registry_password }}"
    auth_registry: "{{ docker_registry }}"
    auth_username: "{{ docker_registry_username }}"
    environment:
      KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
    restart_policy: "{{ docker_restart_policy }}"
    restart_retries: "{{ docker_restart_policy_retry }}"
...

then docker login in kolla-ansible/ansible/library/kolla_docker.py
    ...
    def pull_image(self):
        if self.params.get('auth_username'):
            self.dc.login(
                username=self.params.get('auth_username'),
                password=self.params.get('auth_password'),
                registry=self.params.get('auth_registry'),
                email=self.params.get('auth_email')
            )
    ...

But when the build and push to the registry, I found that there is no such code and configuration. So I have to manually execute docker login command.

Because my company's registry is need username/password to login and to distinguish the read/write permissions. Use a read only access account when pull, and use an account with read and write access when push. I hope kolla can provide this function.

wangwei (wangwei-david)
Changed in kolla:
assignee: nobody → wangwei (wangwei-david)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.openstack.org/399426

Changed in kolla:
status: New → In Progress
wangwei (wangwei-david)
summary: - Lack the function of docker login before pushing registry
+ Lack the function of docker login before pushing to registry
wangwei (wangwei-david)
description: updated
Duong Ha-Quang (duonghq)
Changed in kolla:
importance: Undecided → Medium
milestone: none → ocata-3
Changed in kolla:
milestone: ocata-3 → ocata-rc1
Changed in kolla:
milestone: ocata-rc1 → pike-1
Changed in kolla:
milestone: pike-2 → pike-3
Changed in kolla:
milestone: pike-3 → pike-rc1
Changed in kolla:
milestone: pike-rc1 → queens-1
Changed in kolla:
milestone: queens-2 → queens-3
Changed in kolla:
milestone: queens-3 → queens-rc1
Changed in kolla:
milestone: queens-rc1 → queens-rc2
Changed in kolla:
milestone: queens-rc2 → rocky-1
Changed in kolla:
milestone: rocky-2 → rocky-3
Changed in kolla:
importance: Medium → Wishlist
Mark Goddard (mgoddard)
Changed in kolla:
milestone: rocky-3 → none
assignee: wangwei (wangwei-david) → nobody
status: In Progress → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on kolla (master)

Change abandoned by "Michal Nasiadka <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/kolla/+/399426
Reason: no updates for long time

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.