redhat-cop / openshift-toolkit

A collection of code samples to help you get started with OpenShift
Apache License 2.0
234 stars 150 forks source link

docker-registry-sync tools don't sync hosted components images (ocp v3.6 / v3.7) #34

Closed jihed closed 1 year ago

jihed commented 6 years ago

Hello,

The docker-registry-sync.py was not able to pull the host_components images listed on the docker_tags.json.

This is happen when, I tried to sync a disconnected registry for openshift-version=3.6 and 3.7 with registry.access.redhat.com.

Kindest Regards,

PS: I tested with openshift-version=3.5 and it works fine.

mmckinst commented 6 years ago

You never pasted the error message but if its like the ones below this is caused by the so called 'non v tags' . It appears there was inconsistensy how things were tagged in the registry, sometimes they'd be tagged as 3.1.4and other times as v3.1.4. OCP 3.7 seems to use a v all the time but the code expects it to not have a 'v' in it.

To fix this you can change the below line from retrieve_non_v_tags_from_redhat_list to retrieve_v_tags_from_redhat_list

https://github.com/redhat-cop/openshift-toolkit/blob/2e34c1dae58db5f71863c791b0e48e1aec1fc61d/disconnected_registry/docker-registry-sync.py#L166

I'd submit a PR but I think it will break things for older versions of openshift.

requests.packages.urllib3.connectionpool: INFO     Resetting dropped connection: registry.access.redhat.com
requests.packages.urllib3.connectionpool: INFO     Starting new HTTPS connection (2): registry.access.redhat.com
root        : ERROR    Unable to properly parse the version for image: openshift3/logging-elasticsearch
root        : ERROR    Are you sure that the version exists in the RedHat registry?
bbeaudoin commented 6 years ago

Mostly the hosted components imply no_v_tags, this is no longer true for recent releases. Submitted a new docker_tags.json with a small modification so rhel7/etcd isn't checked against the version as required for containerized installations.

garethahealy commented 4 years ago

is this still an issue? or can be closed?