Uploaded image for project: 'OpenShift SDN'
  1. OpenShift SDN
  2. SDN-3459

A long HCP namespace results in a broken CNO for a HostedCluster

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • None
    • None
    • None
    • False
    • None
    • False
    • Hide

      Install HyperShift

      Create a namespace with a long name: ocm-sbarouti-1udb1sokmb7u85e8re10m8jfvrq09o12
      Create a hostedcluster inside that namespace with a name like: sbarouti402

      Wait for the HostedCluster to come up.
      Actual: The CNO never comes up with an error creating the route
      Expected: The CNO comes up successfully.

      Show
      Install HyperShift Create a namespace with a long name: ocm-sbarouti-1udb1sokmb7u85e8re10m8jfvrq09o12 Create a hostedcluster inside that namespace with a name like: sbarouti402 Wait for the HostedCluster to come up. Actual: The CNO never comes up with an error creating the route Expected: The CNO comes up successfully.
    • ---
    • SDN Sprint 224
    • 0
    • 0

      In HyperShift, the CNO creates a route for the OVNSdb endpoint. However, if the name of the Hosted Control Plane namespace is long, creation of the route fails with an error like:

      Error while updating operator configuration: could not apply (route.openshift.io/v1, Kind=Route) ocm-sbarouti-1udb1sokmb7u85e8re10m8jfvrq09o12-sbarouti402/ovnkube-sbdb: failed to apply / update (route.openshift.io/v1, Kind=Route) ocm-sbarouti-1udb1sokmb7u85e8re10m8jfvrq09o12-sbarouti402/ovnkube-sbdb: Route.route.openshift.io "ovnkube-sbdb" is invalid: spec.host: Invalid value: "ovnkube-sbdb-ocm-sbarouti-1udb1sokmb7u85e8re10m8jfvrq09o12-sbarouti402.apps.hshifti01ue1.z3pt.p1.openshiftapps.com": must be no more than 63 characters

      In the rest of the HyperShift control plane, we apply shortening of the host name to any routes we create to avoid this issue. See https://github.com/openshift/hypershift/blob/b242dee02b25905f1892ca83cd2293194f19d150/control-plane-operator/controllers/hostedcontrolplane/ignitionserver/ignitionserver.go#L73

              pdiak@redhat.com Patryk Diak
              cewong@redhat.com Cesar Wong
              He Liu He Liu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: