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

[GCP CAPI] trying to create cluster which violates resourceLocations constraint cannot show the exact error and abort as soon

XMLWordPrintable

    • Important
    • Yes
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

          trying to create cluster which violates resourceLocations constraint cannot show the exact error and abort as soon

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

          4.17.0-0.nightly-multi-2024-08-26-170521

      How reproducible:

          Always

      Steps to Reproduce:

      1. auth to the GCP project which has resourceLocations constraint (see [1])
      2. "create install-config" and then optionally insert interested settings (see [2])
      3. "create cluster" (see [3])
      

      Actual results:

      It keeps waiting for network infrastructure become ready, without showing the exact error message. 
      
      For example, the logs in ".openshift_install.log" file do tell what is wrong.
      
      time="2024-08-27T17:53:01+08:00" level=debug msg="E0827 17:53:01.635380 2475589 reconcile.go:155] \"Error creating a cloudnat router\" err=\"googleapi: Error 412: Location REGION:southamerica-east1 violates constraint constraints/gcp.resourceLocations on the resource projects/openshift-qe-regional/regions/southamerica-east1/routers/jiwei-0827a-98m6c-network-router., conditionNotMet\" controller=\"gcpcluster\" controllerGroup=\"infrastructure.cluster.x-k8s.io\" controllerKind=\"GCPCluster\" GCPCluster=\"openshift-cluster-api-guests/jiwei-0827a-98m6c\" namespace=\"openshift-cluster-api-guests\" reconcileID=\"6a96df7b-3194-4c3e-9767-7640fc7a74ce\" name=\"jiwei-0827a-98m6c-network-router\""
      ...output omitted...
      time="2024-08-27T18:04:34+08:00" level=debug msg="E0827 18:04:34.475150 2475589 controller.go:329] \"Reconciler error\" err=\"googleapi: Error 412: Location REGION:southamerica-east1 violates constraint constraints/gcp.resourceLocations on the resource projects/openshift-qe-regional/regions/southamerica-east1/routers/jiwei-0827a-98m6c-network-router., conditionNotMet\" controller=\"gcpcluster\" controllerGroup=\"infrastructure.cluster.x-k8s.io\" controllerKind=\"GCPCluster\" GCPCluster=\"openshift-cluster-api-guests/jiwei-0827a-98m6c\" namespace=\"openshift-cluster-api-guests\" name=\"jiwei-0827a-98m6c\" reconcileID=\"e14f44fc-cc79-4bac-8a9d-14d0aac1aa95\""

      Expected results:

          The installer should quit by showing the exact error message as soon. 

      Additional info:

          The GCP project "openshift-qe-regional" has location constraints (see below), and we could only deploying OCP cluster in us-locations. 
      
      $ gcloud --project openshift-qe-regional resource-manager org-policies describe constraints/gcp.resourceLocations
      constraint: constraints/gcp.resourceLocations
      etag: COnh5K0GEOCI_2o=
      listPolicy:
        allowedValues:
        - in:us-locations
      updateTime: '2024-01-30T17:24:57.224380Z'
      $ 

              Unassigned Unassigned
              rhn-support-jiwei Jianli Wei
              Jianli Wei Jianli Wei
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: