Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-76641

UnmanagedRoutes alert is firing for managed Routes

    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • Rejected
    • NI&D Sprint 284
    • 1
    • None
    • None
    • Hide
      Before this fix, the alert UnmanagedRoutes incorrectly fires for a correctly managed ingress resource owning a route, if another ingress resource with the same name but on another namespace is unmanaged, despite of this second ingress resource owning a route resource or not. In this scenario, there should not be any alert, since the first ingress owns a route and it is correctly managed, and the second one is not managed, but also it does not own a route resource.

      After the fix, controller correctly identifies those ingress resources with conflicting names, so now an alert should only fire if an ingress owns a route, it is not managed, despite of ingress with duplicated names.
      Show
      Before this fix, the alert UnmanagedRoutes incorrectly fires for a correctly managed ingress resource owning a route, if another ingress resource with the same name but on another namespace is unmanaged, despite of this second ingress resource owning a route resource or not. In this scenario, there should not be any alert, since the first ingress owns a route and it is correctly managed, and the second one is not managed, but also it does not own a route resource. After the fix, controller correctly identifies those ingress resources with conflicting names, so now an alert should only fire if an ingress owns a route, it is not managed, despite of ingress with duplicated names.
    • None
    • None
    • None
    • None

      This is a clone of issue OCPBUGS-63449. The following is the description of the original issue:

      Description of problem:

      A customer is using Ingresses in their OpenShift Container Platform 4.17 cluster. They are relying on the "Ingress-to-Route" functionality of OpenShift Container Platform to create their Route objects.

      The customer is now seeing multiple "UnmanagedRoutes" alerts in their cluster, for example the following:

        - activeAt: "2025-10-15T09:53:22.786962619Z"
          annotations:
            description: This alert fires when there is a Route owned by an unmanaged Ingress.
            message: Route example-namespace/example-web-modeler-gxspk is owned by
              an unmanaged Ingress.
            summary: Route owned by an Ingress no longer managed
          labels:
            alertname: UnmanagedRoutes
            container: route-controller-manager
            endpoint: https
            host: webmodeler-example-namespace.cluster.foobar.com
            instance: 10.125.10.249:8443
            job: route-controller-manager
            name: example-web-modeler-gxspk
            namespace: example-namespace
            pod: route-controller-manager-7454dbc847-42vdd
            service: route-controller-manager
            severity: warning
          state: firing
          value: "1e+00"

      Examining the Route and Ingress shows that:

      • The Route has a valid Ingress as Owner
      • Ingress "example-web-modeler" is in same namespace
      • `ingressClassName: openshift-default` is set
      • Spec `controller: openshift.io/ingress-to-route` is set on the "openshift-default" IngressClass

      We believe this is a Bug in the metrics code that determines if an Ingress is managed or unmanaged: https://github.com/openshift/route-controller-manager/blob/release-4.17/pkg/route/ingress/metrics.go#L84

      This issue may only appear if there are both managed and unmanaged Ingresses in the same namespace.

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

      OpenShift Container Platform 4.17.28

      How reproducible:

      Always on customer cluster

      Steps to Reproduce:

      1. On an OpenShift Container Platform 4.17.28 cluster, create the namespace that the customer uses
      2. Apply the Ingress and Route manifests from the customer Support Case
      3. Observe the alerts firing on OpenShift Container Platform

      Actual results:

      Despite the Ingress being configured correctly, we see the "UnmanagedRoutes" alert

      Expected results:

      When all Ingresses are managed, no alert is firing

      • Additional info:*
      • "must-gather" and "inspect" files are available in the attached Support Case
      • Ingress and IngressClass YAML are also provided

              jomorais Joao Morais
              rhn-support-skrenger Simon Krenger
              None
              None
              Hongan Li Hongan Li
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: