Bug 1902076

Summary: image registry operator should monitor status of its routes
Product: OpenShift Container Platform Reporter: Oleg Bulatov <obulatov>
Component: Image RegistryAssignee: Ricardo Maraschini <rmarasch>
Status: CLOSED ERRATA QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: aos-bugs, rmarasch, wking
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Lack of route status inclusion during operator status assessment. Consequence: Operator was not degraded even with routes in "degraded" state. Fix: Operator now fetches all configured routes and evaluate their statuses when assessing its own status. Result: If any of the routes are "degraded" the operator reports itself as "degraded" with proper error message.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:34:25 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:

Description Oleg Bulatov 2020-11-26 18:59:46 UTC
Description of problem:

The image registry operator should monitor status of routes. When the registry is  configured to use a host name that is used by another route, the route controller won't admit the registry route.

Version-Release number of selected component (if applicable):


How reproducible:

Always

Steps to Reproduce:
1. create a route with spec.host: "foo.bar" in the namespace default.
2. configure the registry to use the same host name:

  routes:
  - hostname: foo.bar
    name: foo

Actual results:

The operator is healthy (Available, not Progressing, not Degraded) and no alerts are firing, but the new route is not admitted by the route controller.

Expected results:

The image registry operator indicates the problem (either via status or via alert).

Additional info:

Comment 4 Wenjing Zheng 2021-03-02 07:52:29 UTC
Verified on 4.8.0-0.nightly-2021-03-01-143026:
1. oc create route edge foo.bar --service=frontend --port=123
2. oc edit configs.imageregistry:
  routes:
  - hostname: foo-default.apps.wxj-c2s32.govcloudemu.devcluster.openshift.com
    name: foo.bar
3. oc describe co image-registry

Message:               Degraded: route foo (host foo-default.apps.wxj-c2s32.govcloudemu.devcluster.openshift.com, router default) not admitted: a route in another namespace holds foo-bar-default.apps.wxj-c2s32.govcloudemu.devcluster.openshift.com and is older than foo.bar

Comment 7 errata-xmlrpc 2021-07-27 22:34:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438