Bug 1958088 - Deleted Ingress Controller still used as Location Status
Summary: Deleted Ingress Controller still used as Location Status
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Dev Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 4.9.0
Assignee: Jaivardhan Kumar
QA Contact: Gajanan More
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-07 07:23 UTC by Alexander Niebuhr
Modified: 2021-12-17 15:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-25 15:29:40 UTC
Target Upstream Version:
Embargoed:
cvogt: needinfo-


Attachments (Terms of Use)

Description Alexander Niebuhr 2021-05-07 07:23:54 UTC
We have defined routes at the time we had 3 Ingresscontrollers - (default, frix, repguide-ch, therefore it generated 3 Mappings seen in the status of the yaml. The UI showed the correct Location in Topology graph and Location UI field under Administration -> Network -> Routes.
we then deleted one ingresscontroller (the status object of it still exists), after that we change the host of the route, the mapping is just updated on the two existing ones, not the one we deleted (expected behavior)
However it seems that the UI in Topology and the Location UI field under Administration -> Network -> Routes, does not show the current (latest by timestamp) set Host, rather it shows the latest index of the ingress array in status object. This is wrong, since it links to an old host.

Fix suggestion: Either remove the status of the deleted Ingresscontroller in the yaml, or use the latest by date status to show links and urls in UI

code reference before bug:
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: dev-web-admin
  namespace: repguide
  uid: a7e1a188-57ac-4a30-8ded-b67ef28ec1c6
  resourceVersion: '66526020'
  creationTimestamp: '2021-01-19T11:08:18Z'
spec:
  host: dev-web-admin-repguide.projects.okd.frixlab.de
  to:
    kind: Service
    name: dev-web-admin
    weight: 256
  port:
    targetPort: 8080-tcp
  wildcardPolicy: None
status:
  ingress:
    - host: dev-web-admin-repguide.projects.okd.frixlab.de
      routerName: default
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: '2021-05-06T07:15:34Z'
      wildcardPolicy: None
      routerCanonicalHostname: apps.okd.frixlab.de
    - host: dev-web-admin-repguide.projects.okd.frixlab.de
      routerName: frix
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: '2021-05-06T07:15:35Z'
      wildcardPolicy: None
      routerCanonicalHostname: projects.okd.frixlab.de
    - host: dev-web-admin-repguide.projects.okd.frixlab.de
      routerName: repguide-ch
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: '2021-05-06T07:04:51Z'
      wildcardPolicy: None
      routerCanonicalHostname: test.ch.okd.frixlab.de

code reference after bug:
---
kind: Route
apiVersion: route.openshift.io/v1
metadata:
  name: dev-web-admin
  namespace: repguide
  uid: a7e1a188-57ac-4a30-8ded-b67ef28ec1c6
  resourceVersion: '66526020'
  creationTimestamp: '2021-01-19T11:08:18Z'
spec:
  host: dev-admin-repguide.projects.okd.frixlab.de
  to:
    kind: Service
    name: dev-web-admin
    weight: 256
  port:
    targetPort: 8080-tcp
  wildcardPolicy: None
status:
  ingress:
    - host: dev-admin-repguide.projects.okd.frixlab.de
      routerName: default
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: '2021-05-07T07:15:34Z'
      wildcardPolicy: None
      routerCanonicalHostname: apps.okd.frixlab.de
    - host: dev-admin-repguide.projects.okd.frixlab.de
      routerName: frix
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: '2021-05-07T07:15:35Z'
      wildcardPolicy: None
      routerCanonicalHostname: projects.okd.frixlab.de
    - host: dev-web-admin-repguide.projects.okd.frixlab.de
      routerName: repguide-ch
      conditions:
        - type: Admitted
          status: 'True'
          lastTransitionTime: '2021-05-07T07:04:51Z'
      wildcardPolicy: None
      routerCanonicalHostname: test.ch.okd.frixlab.de

Comment 1 Miciah Dashiel Butler Masters 2021-05-10 13:52:39 UTC
Looks like you want the https://github.com/openshift/router/blob/master/images/router/clear-route-status.sh script to clear out old status entries.  This script currently has a problem that prevents it from working properly, which is being tracked as bug 1944851, so I am closing this report (bug 1958088) as a duplicate of that one (bug 1944851).  Please review bug 1944851 and tell me if I have closed this report in error.

*** This bug has been marked as a duplicate of bug 1944851 ***

Comment 2 Alexander Niebuhr 2021-05-11 13:41:26 UTC
actually the functional part of this issue is described in https://bugzilla.redhat.com/show_bug.cgi?id=1944851 as you said,
however that the UI does not use the latest updated status to show the current route instead it uses the latest entry of an array seems to be another bug, which should be fixed.

I would suggest to reopen, maybe reassign this bug to the correct team!

Comment 3 Miciah Dashiel Butler Masters 2021-05-11 14:04:38 UTC
Re-opening per comment 2, and re-assigning to the "Management Console" team.  

I'm unfamiliar with "Topology graph", but there is no reason that is obvious to me why it should show only one host name; usually the route's status.ingress[*].host values are all the same, but if they differ, I see no reason not to show all the different host names.

Comment 4 Alexander Niebuhr 2021-05-12 05:58:03 UTC
I do think it should only show the host names which are valid. Or maybe the one which is defined in spec, not in status?

Comment 6 Jaivardhan Kumar 2021-06-25 14:52:29 UTC
I think we only want to present valid admitted hostnames as links. Otherwise, the link will be broken. so https://bugzilla.redhat.com/show_bug.cgi?id=1944851 needs to fix the status and in UI we need to get a generic fix for both admin console/dev console and show all admitted hostnames as links here is the ticket track https://issues.redhat.com/browse/ODC-6072. I think we can close this ticket

cc @spadgett / @cvogt

Comment 8 Samuel Padgett 2021-06-25 15:29:40 UTC
> however that the UI does not use the latest updated status to show the current route instead it uses the latest entry of an array seems to be another bug, which should be fixed.

Hi, Alexander. We don't simply show the last item in the array. We made an intentional decision to find the oldest admitted hostname from the route status and display that (regardless of where it is in the array).

I don't know that it's really better to show the newest admitted hostname. That's not necessarily more valid than the oldest admitted hostname. Couldn't the most recent hostname have the deleted ingress controller?

The real problem is that's we're arbitrarily picking a single URL to show instead of finding a way to show all of them to the user. RFE https://issues.redhat.com/browse/ODC-6072 has been opened to investigate a better approach.

Closing since the current behavior is working as designed, and we have a JIRA issue open to look at improving the UX in the future. The route status not being cleaned up is tracked by bug 1944851.

Comment 9 Alexander Niebuhr 2021-06-25 17:36:13 UTC
yeah sure, the main point is that you guys are aware and have tracking.
I actually think it would be the better decision to show the newest admitted hostname instead the oldest, since the probability for that being still online is much higher.

Any way, you guys should make sure no outdated route is shown, either by showing all admitted routes or by fixing the status clean up.

Thanks :)


Note You need to log in before you can comment on or make changes to this bug.