Description of problem:
When upgrading patch releases of OpenShift 3.7, the router pod image doesn't upgrade unless the registry that its being pulled from matches openshift3/ose-*
Version-Release number of selected component (if applicable):
OpenShift 3.7 (upgrading from 3.7.44 to 3.7.54)
How reproducible:
Always
Steps to Reproduce:
1. Create a disconnected registry with a non-matching name (e.g. registry.example.com/somedir/)
2. Reposync the router image (e.g. registry.example.com/somedir/ose-haproxy-router:3.7.54)
3. Run the upgrade playbook
4. Apps should be unreachable at this point. Confirm that the router failed to upgrade by checking the deploymentconfig for the router.
Actual results:
Components get upgraded but the router image remains on the 3.7.44 version; pods are unreachable.
Expected results:
The upgrade will match whatever image is in the oreg_url
Additional info:
/filter_plugins/oo_filters.py
def oo_pods_match_component(pods, deployment_type, component):
""" Filters a list of Pods and returns the ones matching the deployment_type and component
"""
if not isinstance(pods, list):
raise errors.AnsibleFilterError("failed expects to filter on a list")
if not isinstance(deployment_type, string_types):
raise errors.AnsibleFilterError("failed expects deployment_type to be a string")
if not isinstance(component, string_types):
raise errors.AnsibleFilterError("failed expects component to be a string")
image_prefix = 'openshift/origin-'
if deployment_type == 'openshift-enterprise':
image_prefix = 'openshift3/ose-'
matching_pods = []
image_regex = image_prefix + component + r'.*'
for pod in pods:
for container in pod['spec']['containers']:
if re.search(image_regex, container['image']):
matching_pods.append(pod)
break # stop here, don't add a pod more than once
return matching_pods
Run below verification steps, and upgrading passed.
1.Install openshift v3.7.44
2.After installation, update router yaml file to have wrong image path such as: example.openshift.com:443/openshift3/ose-haproxy-router:v3.7.44
3. Upgrade openshift cluster by running openshift-ansible v3.7.62 which include fixed https://github.com/openshift/openshift-ansible/pull/9612
4. After upgrading router is in running state and image path change to:
registry.reg-aws.openshift.com:443/openshift3/ose-haproxy-router:v3.7.62
Comment 42Red Hat Bugzilla
2023-09-15 01:27:31 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days
Description of problem: When upgrading patch releases of OpenShift 3.7, the router pod image doesn't upgrade unless the registry that its being pulled from matches openshift3/ose-* Version-Release number of selected component (if applicable): OpenShift 3.7 (upgrading from 3.7.44 to 3.7.54) How reproducible: Always Steps to Reproduce: 1. Create a disconnected registry with a non-matching name (e.g. registry.example.com/somedir/) 2. Reposync the router image (e.g. registry.example.com/somedir/ose-haproxy-router:3.7.54) 3. Run the upgrade playbook 4. Apps should be unreachable at this point. Confirm that the router failed to upgrade by checking the deploymentconfig for the router. Actual results: Components get upgraded but the router image remains on the 3.7.44 version; pods are unreachable. Expected results: The upgrade will match whatever image is in the oreg_url Additional info: /filter_plugins/oo_filters.py def oo_pods_match_component(pods, deployment_type, component): """ Filters a list of Pods and returns the ones matching the deployment_type and component """ if not isinstance(pods, list): raise errors.AnsibleFilterError("failed expects to filter on a list") if not isinstance(deployment_type, string_types): raise errors.AnsibleFilterError("failed expects deployment_type to be a string") if not isinstance(component, string_types): raise errors.AnsibleFilterError("failed expects component to be a string") image_prefix = 'openshift/origin-' if deployment_type == 'openshift-enterprise': image_prefix = 'openshift3/ose-' matching_pods = [] image_regex = image_prefix + component + r'.*' for pod in pods: for container in pod['spec']['containers']: if re.search(image_regex, container['image']): matching_pods.append(pod) break # stop here, don't add a pod more than once return matching_pods