Application: cannot override a single image with a custom registry

Bug #1859881 reported by Angie Wang on 2020-01-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Medium
Angie Wang

Bug Description

Brief Description
-----------------
There is a logic in sysinv to always prepend docker registry to the image reference if the registry of the image is not in any of the known registries. This is a limitation for users to override a single image with a custom registry.

The following logic in sysinv/conductor/kube_app.py should be removed as it's not necessary and the orignal purpose of it was handled at other place :
    # If the image is not from any of the known registries
    # (ie..k8s.gcr.io, gcr.io, quay.io, docker.io. docker.elastic.co)
    # or no registry name specified in image tag, use user specified
    # docker registry as default
    registry = self.registries_info[
        constants.SERVICE_PARAM_SECTION_DOCKER_DOCKER_REGISTRY]['registry_replaced']
    registry_auth = self.registries_info[
        constants.SERVICE_PARAM_SECTION_DOCKER_DOCKER_REGISTRY]['registry_auth']
    registry_name = pub_img_tag[:pub_img_tag.find('/')]

    if registry:
        LOG.info("Registry %s not recognized or docker.io repository
                 "detected. Pulling from public/private registry"
                 % registry_name)
        return registry + '/' + pub_img_tag, registry_auth

Severity
--------
Major

Steps to Reproduce
------------------
- system application-upload stx-openstack.tgz
- system helm-override-update stx-openstack nova openstack --set images.tags.nova_api=mycustomregistry.com/stx-nova:latest
- system application-apply stx-openstack

Expected Behavior
------------------
Image mycustomregistry.com/stx-nova:latest can be downloaded successfully.

Actual Behavior
----------------
The system is trying to download docker.io/mycustomregistry.com/stx-nova:latest

Ghada Khalil (gkhalil) wrote :

stx.4.0 / medium priority - allows better flexibility for custom registries

tags: added: stx.4.0 stx.containers
tags: added: stx.config
Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Angie Wang (angiewang)

Fix proposed to branch: master
Review: https://review.opendev.org/709859

Changed in starlingx:
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers