[Starlingx-discuss] [Containers] Worker nodes pulling from external registry instead from the internal

Cordoba Malibran, Erich erich.cordoba.malibran at intel.com
Thu Aug 15 23:08:08 UTC 2019


Hi. 

I'm working on this bug: 
https://bugs.launchpad.net/starlingx/+bug/1817958 and I have a proposal
that I would like to discuss.

In this bug, if an external docker registry is being used, all worker
nodes will retrieve containers from the external registry instead of
using the registry.local. This happens because the download_an_image[0]
function has the following logic. 


If container has registry.local, then
    Try to download
    If not found in registry.local, then
        Try to download from public/private registry.
        Push image to registry.local
Else
    Try to download from public/private registry.


Here there are two bugs: 

1. If the container doesn't has the registry.local prefix, then the
image won't be push into the local registry. This can be easily fix by
adding the client.push call.
2. Worker nodes will still try to download from external registry even
if the image was pushed to the local registry. This is because the
images won't have the registry.local prefix.


So, to fix this I would like to propose the following: 

1. Ensure that all images should have the registry.local prefix,
regardless if a private is defined or not. I'm not sure yet how to do
this and I will appreciate some help point me to the right direction. 
2. Change the logic in download_an_image to do this: 

Try to download image:
If not found then:
    Remove registry.local prefix
    Try to download from public/private registry
    Retag and push to local registry.

By this way all nodes will try registry.local first and then
public/private if not found.

What do you think about this fix?

Thank you in advance. 

-Erich

- [0] https://opendev.org/starlingx/config/src/branch/master/sysinv/sysinv/sysinv/sysinv/conductor/kube_app.py#L2592





More information about the Starlingx-discuss mailing list