Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1612350

Summary: [3.7] Router pod image upgrade fails when disconnected registry url doesn't match openshift3/ose-
Product: OpenShift Container Platform Reporter: Chad Scribner <cscribne>
Component: NetworkingAssignee: Ivan Chavero <ichavero>
Networking sub component: router QA Contact: zhaozhanqi <zzhao>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: high    
Priority: high CC: andrew.boik, aos-bugs, bleanhar, cscribne, dominik.mierzejewski, drew.boik, erich, hongli, ichavero, weliang, zzhao
Version: 3.7.0   
Target Milestone: ---   
Target Release: 3.7.z   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1618525 (view as bug list) Environment:
Last Closed: 2018-09-04 13:27:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1618525    

Description Chad Scribner 2018-08-03 18:00:33 UTC
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

Comment 28 Ivan Chavero 2018-08-13 22:03:16 UTC
This problem has been solved and will be in the next release of the installer. Is a backport required?

Comment 36 Weibin Liang 2018-08-22 15:59:17 UTC
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 42 Red 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