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

[CAPI Azure] Fail to create cluster on AzureUSGovernmentCloud

XMLWordPrintable

    • Critical
    • No
    • Approved
    • False
    • Hide

      None

      Show
      None
    • Release Note Not Required
    • In Progress

      This is a clone of issue OCPBUGS-36196. The following is the description of the original issue:

      Description of problem:

      Launch CAPI based installation on Azure Government Cloud, installer was timeout when waiting for network infrastructure to become ready.
      
      06-26 09:08:41.153  level=info msg=Waiting up to 15m0s (until 9:23PM EDT) for network infrastructure to become ready...
      ...
      06-26 09:09:33.455  level=debug msg=E0625 21:09:31.992170   22172 azurecluster_controller.go:231] "failed to reconcile AzureCluster" err=<
      06-26 09:09:33.455  level=debug msg=	failed to reconcile AzureCluster service group: reconcile error that cannot be recovered occurred: resource is not Ready: The subscription '8fe0c1b4-8b05-4ef7-8129-7cf5680f27e7' could not be found.: PUT https://management.azure.com/subscriptions/8fe0c1b4-8b05-4ef7-8129-7cf5680f27e7/resourceGroups/jima26mag-9bqkl-rg
      06-26 09:09:33.456  level=debug msg=	--------------------------------------------------------------------------------
      06-26 09:09:33.456  level=debug msg=	RESPONSE 404: 404 Not Found
      06-26 09:09:33.456  level=debug msg=	ERROR CODE: SubscriptionNotFound
      06-26 09:09:33.456  level=debug msg=	--------------------------------------------------------------------------------
      06-26 09:09:33.456  level=debug msg=	{
      06-26 09:09:33.456  level=debug msg=	  "error": {
      06-26 09:09:33.456  level=debug msg=	    "code": "SubscriptionNotFound",
      06-26 09:09:33.456  level=debug msg=	    "message": "The subscription '8fe0c1b4-8b05-4ef7-8129-7cf5680f27e7' could not be found."
      06-26 09:09:33.456  level=debug msg=	  }
      06-26 09:09:33.456  level=debug msg=	}
      06-26 09:09:33.456  level=debug msg=	--------------------------------------------------------------------------------
      06-26 09:09:33.456  level=debug msg=	. Object will not be requeued
      06-26 09:09:33.456  level=debug msg= > logger="controllers.AzureClusterReconciler.reconcileNormal" controller="azurecluster" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" AzureCluster="openshift-cluster-api-guests/jima26mag-9bqkl" namespace="openshift-cluster-api-guests" reconcileID="f2ff1040-dfdd-4702-ad4a-96f6367f8774" x-ms-correlation-request-id="d22976f0-e670-4627-b6f3-e308e7f79def" name="jima26mag-9bqkl"
      06-26 09:09:33.457  level=debug msg=I0625 21:09:31.992215   22172 recorder.go:104] "failed to reconcile AzureCluster: failed to reconcile AzureCluster service group: reconcile error that cannot be recovered occurred: resource is not Ready: The subscription '8fe0c1b4-8b05-4ef7-8129-7cf5680f27e7' could not be found.: PUT https://management.azure.com/subscriptions/8fe0c1b4-8b05-4ef7-8129-7cf5680f27e7/resourceGroups/jima26mag-9bqkl-rg\n--------------------------------------------------------------------------------\nRESPONSE 404: 404 Not Found\nERROR CODE: SubscriptionNotFound\n--------------------------------------------------------------------------------\n{\n  \"error\": {\n    \"code\": \"SubscriptionNotFound\",\n    \"message\": \"The subscription '8fe0c1b4-8b05-4ef7-8129-7cf5680f27e7' could not be found.\"\n  }\n}\n--------------------------------------------------------------------------------\n. Object will not be requeued" logger="events" type="Warning" object={"kind":"AzureCluster","namespace":"openshift-cluster-api-guests","name":"jima26mag-9bqkl","uid":"20bc01ee-5fbe-4657-9d0b-7013bd55bf96","apiVersion":"infrastructure.cluster.x-k8s.io/v1beta1","resourceVersion":"1115"} reason="ReconcileError"
      06-26 09:17:40.081  level=debug msg=I0625 21:17:36.066522   22172 helpers.go:516] "returning early from secret reconcile, no update needed" logger="controllers.reconcileAzureSecret" controller="ASOSecret" controllerGroup="infrastructure.cluster.x-k8s.io" controllerKind="AzureCluster" AzureCluster="openshift-cluster-api-guests/jima26mag-9bqkl" namespace="openshift-cluster-api-guests" name="jima26mag-9bqkl" reconcileID="2df7c4ba-0450-42d2-901e-683de399f8d2" x-ms-correlation-request-id="b2bfcbbe-8044-472f-ad00-5c0786ebbe84"
      06-26 09:23:46.611  level=debug msg=Collecting applied cluster api manifests...
      06-26 09:23:46.611  level=error msg=failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: infrastructure is not ready: client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
      06-26 09:23:46.611  level=info msg=Shutting down local Cluster API control plane...
      06-26 09:23:46.612  level=info msg=Stopped controller: Cluster API
      06-26 09:23:46.612  level=warning msg=process cluster-api-provider-azure exited with error: signal: killed
      06-26 09:23:46.612  level=info msg=Stopped controller: azure infrastructure provider
      06-26 09:23:46.612  level=warning msg=process cluster-api-provider-azureaso exited with error: signal: killed
      06-26 09:23:46.612  level=info msg=Stopped controller: azureaso infrastructure provider
      06-26 09:23:46.612  level=info msg=Local Cluster API system has completed operations
      06-26 09:23:46.612  [ERROR] Installation failed with error code '4'. Aborting execution.
      
      From above log, Azure Resource Management API endpoint is not correct, endpoint "management.azure.com" is for Azure Public cloud, the expected one for Azure Government should be "management.usgovcloudapi.net".
      
      

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

          4.17.0-0.nightly-2024-06-23-145410

      How reproducible:

          Always

      Steps to Reproduce:

          1. Install cluster on Azure Government Cloud, capi-based installation 
          2.
          3.
          

      Actual results:

          Installation failed because of the wrong Azure Resource Management API endpoint used.

      Expected results:

          Installation succeeded.

      Additional info:

          

            jhixson_redhat John Hixson
            openshift-crt-jira-prow OpenShift Prow Bot
            Jinyun Ma Jinyun Ma
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: