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

RegistrySources configuration errors should be bubbled up to HostedCluster

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Normal
    • None
    • 4.15.z
    • HyperShift
    • No
    • Hypershift Sprint 252, Hypershift Sprint 253
    • 2
    • False
    • Hide

      None

      Show
      None

    Description

      Description of problem:

          After OCPBUGS-13726, Hypershift honors ImageConfig provided by the user in the HostedCluster.
      Providing both allowedRegistries and blockedRegistries is forbidden https://github.com/openshift/api/blob/1e963d8dc4663f4f004f44fd58459381a771bdb5/config/v1/types_image.go#L126
      If we do that in HyperShift, it will block any NodePool creation but no error is visible in the HostedCluster, so it is not easy to identify the error.
      The error should instead be visible in the existing HC condition ValidHostedControlPlaneConfiguration

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

          4.15.6

      How reproducible:

          Always

      Steps to Reproduce:

          1. Create HC
          2. oc patch hc -n $HC_NS $HC_NAME -p '{"spec":{"configuration":{"image":{"registrySources":{"allowedRegistries":["docker.io"], "blockedRegistries":["test.io"]}}}}}' --type=merge
           3. New node pools not coming up and condition visible in the NP 
          

       

        - lastTransitionTime: "2024-04-11T12:49:32Z"
          message: 'Failed to generate payload: error getting ignition payload: failed to
            execute machine-config-controller: machine-config-controller process failed:
            exit status 255'
          observedGeneration: 1
          reason: InvalidConfig
          status: ""
          type: ValidGeneratedPayload

       

      Actual results:

          HC condition successful
      
      
        - lastTransitionTime: "2024-04-11T08:59:01Z"
          message: Configuration passes validation
          observedGeneration: 4
          reason: AsExpected
          status: "True"
          type: ValidHostedControlPlaneConfiguration

      Expected results:

          Above HC condition to be failed

      Additional info:

          

      Attachments

        Activity

          People

            rh-ee-mraee Mulham Raee
            rh-ee-adecorte Andrea Decorte
            Jie Zhao Jie Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: