add "registry" flag to "tools/build.py"

Bug #1505056 reported by Kuo-tung Kao (jelly)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Wishlist
Kuo-tung Kao (jelly)

Bug Description

The meaning of the namesapce in build.py is different from kolla-ansible.

For example, if user build images using `build.py -n 172.22.2.81:4000/abcd`, it means that set `docker_registry` to `172.22.2.81:4000` and set `docker_namespace` to `abcd` in `/etc/kolla/globals.yml`.

If user build image using `build.py -n 172.22.2.81:4000`, kolla-ansible can't pull these images. The image name generated from build.py using `build.py -n 172.22.2.81:4000` looks like 172.22.2.81:4000/data.

But the image name kolla-ansible pull looks like 172.22.2.81:4000//data.

If we have registry flag used for assigning docker registry host, user use the flag when user want to change the host which the images is pushed.

With registry flag,
build image using `tools/build.py --registry 172.22.2.81:4000`
the image name looks like `172.22.2.81:4000/kollaglue/data`
When user use kolla-ansible,
user set `docker_registry` to `172.22.2.81:4000` in `/etc/kolla/globals.yml`.

build image using `tools/build.py -n abcd`
the image name looks like `abcd/data`
When user use kolla-ansible,
user set `docker_namespace:` to `abcd` in `/etc/kolla/globals.yml`.

build image using `tools/build.py -n abcd --registry 172.22.2.81:4000`
the image name looks like `abcd/data`
When user use kolla-ansible,
user set `docker_namespace:` to `abcd` in `/etc/kolla/globals.yml`.
user set `docker_registry` to `172.22.2.81:4000` in `/etc/kolla/globals.yml`.

With the feature, it will reduce user confusing and mistaking.

Changed in kolla:
assignee: nobody → jelly (coding1314)
Changed in kolla:
assignee: jelly (coding1314) → nobody
Revision history for this message
Kuo-tung Kao (jelly) (coding1314) wrote :

Another way to avoid confusing about namespace between build.py and kolla-ansible is that remove "docker_registry" in globals.yml. https://github.com/openstack/kolla/blob/master/etc/kolla/globals.yml#L36 the root of the problem is docker. but it's hard to change docker.

Steven Dake (sdake)
Changed in kolla:
status: New → Triaged
milestone: none → liberty-rc3
Steven Dake (sdake)
Changed in kolla:
milestone: liberty-rc3 → mitaka-1
Changed in kolla:
assignee: nobody → jelly (coding1314)
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/234629

Changed in kolla:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.openstack.org/234629
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=52b72538114fdf3de5b71ce399bb0992d2748d75
Submitter: Jenkins
Branch: master

commit 52b72538114fdf3de5b71ce399bb0992d2748d75
Author: Kuo-tung Kao <email address hidden>
Date: Wed Oct 14 16:19:45 2015 +0800

    add "registry" flag to "tools/build.py"

    With registry flag,
    build image using `tools/build.py --registry 172.22.2.81:4000`
    the image name looks like `172.22.2.81:4000/kollaglue/data`
    When user use kolla-ansible,
    user set `docker_registry` to `172.22.2.81:4000` in `/etc/kolla/globals.yml`.

    Build image using `tools/build.py -n abcd`
    the image name looks like `abcd/data`
    When user use kolla-ansible,
    user set `docker_namespace:` to `abcd` in `/etc/kolla/globals.yml`.

    build image using `tools/build.py -n abcd --registry 172.22.2.81:4000`
    the image name looks like `abcd/data`
    When user use kolla-ansible,
    user set `docker_namespace:` to `abcd` in `/etc/kolla/globals.yml`.
    user set `docker_registry` to `172.22.2.81:4000` in `/etc/kolla/globals.yml`.

    With the feature, it will reduce user confusing and mistaking.

    Change-Id: I18ac7a3ccec032888e35f5e9a79fc190760cc8a0
    Closes-Bug: #1505056

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

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/236938

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

Reviewed: https://review.openstack.org/236938
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=6e69e4673a7595b3ed135360eb50ca617ab83fd7
Submitter: Jenkins
Branch: stable/liberty

commit 6e69e4673a7595b3ed135360eb50ca617ab83fd7
Author: Kuo-tung Kao <email address hidden>
Date: Wed Oct 14 16:19:45 2015 +0800

    add "registry" flag to "tools/build.py"

    With registry flag,
    build image using `tools/build.py --registry 172.22.2.81:4000`
    the image name looks like `172.22.2.81:4000/kollaglue/data`
    When user use kolla-ansible,
    user set `docker_registry` to `172.22.2.81:4000` in `/etc/kolla/globals.yml`.

    Build image using `tools/build.py -n abcd`
    the image name looks like `abcd/data`
    When user use kolla-ansible,
    user set `docker_namespace:` to `abcd` in `/etc/kolla/globals.yml`.

    build image using `tools/build.py -n abcd --registry 172.22.2.81:4000`
    the image name looks like `abcd/data`
    When user use kolla-ansible,
    user set `docker_namespace:` to `abcd` in `/etc/kolla/globals.yml`.
    user set `docker_registry` to `172.22.2.81:4000` in `/etc/kolla/globals.yml`.

    With the feature, it will reduce user confusing and mistaking.

    Change-Id: I18ac7a3ccec032888e35f5e9a79fc190760cc8a0
    Closes-Bug: #1505056
    (cherry picked from commit 52b72538114fdf3de5b71ce399bb0992d2748d75)

tags: added: in-stable-liberty
Sam Yaple (s8m)
Changed in kolla:
status: Fix Committed → Fix Released
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.