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

Misleading error message to highlight "HostAlreadyClaimed"

    XMLWordPrintable

Details

    • Moderate
    • No
    • 3
    • Sprint 240, Sprint 241, Sprint 242, Sprint 243
    • 4
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, there was an error that caused a route to be rejected due to a duplicate host claim. When this occurred, the system would mistakenly select the first route it encountered, which was not always the conflicting route. With this update, all routes for the conflicting host are first retrieved and then sorted based on their submission time. This allows the system to accurately determine and select the newest conflicting route. (link:https://issues.redhat.com/browse/OCPBUGS-16707[*OCPBUGS-16707*])
      Show
      * Previously, there was an error that caused a route to be rejected due to a duplicate host claim. When this occurred, the system would mistakenly select the first route it encountered, which was not always the conflicting route. With this update, all routes for the conflicting host are first retrieved and then sorted based on their submission time. This allows the system to accurately determine and select the newest conflicting route. (link: https://issues.redhat.com/browse/OCPBUGS-16707 [* OCPBUGS-16707 *])
    • Bug Fix
    • Done

    Description

      Description of problem:

      When we encounter the HostAlreadyClaimed issue, the error message is pointing to the wrong route name.

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

      OCP v4.12.z

      How reproducible:

      Frequently

      Steps to Reproduce:

      - Created three routes with the similar hosts, one without the path and other eith the paths defined.
      
      # oc get routes
      NAME     HOST/PORT                                                                       PATH    SERVICES        PORT   TERMINATION   WILDCARD
      route1   httpd-example-path-based-routes.apps.firstcluster.lab.upshift.rdu2.redhat.com           httpd-example   web    edge          None
      route2   httpd-example-path-based-routes.apps.firstcluster.lab.upshift.rdu2.redhat.com   /path   httpd-example   web    edge          None
      route3   HostAlreadyClaimed                                                              /path   httpd-example   web    edge          None   <---------------
      
      
      - Got 'HostAlreadyClaimed' error for the third route 'route3' which is expected because the path and the hostname of 'route2' & route3' are the same.
      
      - In the route description, we could see that the first route that is 'route1' is reported to be the older route for the host but we expect it should report 'route2' because the hostname and paths are similar for the route2 and route3. 
      
      # oc describe route route3
      Name:            route3
      Namespace:        path-based-routes
      Created:        14 seconds ago
      Labels:            app=httpd-example
                  template=httpd-example
      Annotations:        <none>
      Requested Host:        httpd-example-path-based-routes.apps.firstcluster.lab.upshift.rdu2.redhat.com
                  rejected by router default:  (host router-default.apps.firstcluster.lab.upshift.rdu2.redhat.com)HostAlreadyClaimed (14 seconds ago)
                    route route1 already exposes httpd-example-path-based-routes.apps.firstcluster.lab.upshift.rdu2.redhat.com and is older   <----------------
      Path:            /path
      TLS Termination:    edge
      Insecure Policy:    <none>
      Endpoint Port:        web
      
      Service:    httpd-example
      Weight:        100 (100%)
      Endpoints:    10.1.2.3:8080 
      
      - However, deleting the 'route2' resolves the issue.

      Actual results:

      Error messages for 'HostAlreadyClainmed' issue should consider the route name to be reported on the basis of Hostname and paths.

      Expected results:

      Only hostname is taken into consideration where route's path should be checked as well and then the appropiate route name should be reported in the error.

       

      Attachments

        Activity

          People

            amcdermo@redhat.com ANDREW MCDERMOTT
            rhn-support-swasthan Swadeep Asthana
            Shudi Li Shudi Li
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: