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

Azure: installation failed when controlPlane.platform is empty in install-config

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 4.17, 4.18
    • None
    • Critical
    • None
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * When installing a cluster on {azure-full}, the installation will fail if no `install-config.yaml` file is provided. If an `install-config.yaml` file is provided, and `controlPlane.platform` is present but `controlPlane.platform.azure` is not provided, the installation will fail. (link:https://issues.redhat.com/browse/OCPBUGS-42296[*OCPBUGS-42296*])
      +
      See xref:../installing/installing_azure/ipi/installing-azure-customizations.adoc#installation-azure-config-yaml_installing-azure-customizations[Sample customized install-config.yaml file for Azure] for a sample configuration file, or set a non-null parameter as in the following example:
      +
      [source,yaml]
      ----
      controlPlane:
        platform:
          azure: {}
      ----
      Show
      * When installing a cluster on {azure-full}, the installation will fail if no `install-config.yaml` file is provided. If an `install-config.yaml` file is provided, and `controlPlane.platform` is present but `controlPlane.platform.azure` is not provided, the installation will fail. (link: https://issues.redhat.com/browse/OCPBUGS-42296 [* OCPBUGS-42296 *]) + See xref:../installing/installing_azure/ipi/installing-azure-customizations.adoc#installation-azure-config-yaml_installing-azure-customizations[Sample customized install-config.yaml file for Azure] for a sample configuration file, or set a non-null parameter as in the following example: + [source,yaml] ---- controlPlane:   platform:     azure: {} ----
    • Known Issue
    • In Progress

      Description of problem:

          Install cluster without any customized configuration in install-config, installer got panic error as below:
      ===============
      $ ./openshift-install create cluster --dir ipi
      ? SSH Public Key /home/fedora/.ssh/openshift-qe.pub
      ? Platform azure
      INFO Credentials loaded from file "/home/fedora/.azure/osServicePrincipal.json" 
      ? Region eastus2
      ? Base Domain qe.azure.devcluster.openshift.com
      ? Cluster Name jima23test
      ? Pull Secret [? for help] *******************************************************************************************************************************************************************************************************************
      INFO Adding clusters...                           
      INFO Creating infrastructure resources...         
      INFO Started local control plane with envtest     
      INFO Stored kubeconfig for envtest in: /home/fedora/temp/4.17.0-rc.5/ipi/.clusterapi_output/envtest.kubeconfig 
      INFO Running process: Cluster API with args [-v=2 --diagnostics-address=0 --health-addr=127.0.0.1:45649 --webhook-port=40649 --webhook-cert-dir=/tmp/envtest-serving-certs-4134012097 --kubeconfig=/home/fedora/temp/4.17.0-rc.5/ipi/.clusterapi_output/envtest.kubeconfig] 
      INFO Running process: azure infrastructure provider with args [-v=2 --health-addr=127.0.0.1:43491 --webhook-port=46335 --webhook-cert-dir=/tmp/envtest-serving-certs-2107787232 --feature-gates=MachinePool=false --kubeconfig=/home/fedora/temp/4.17.0-rc.5/ipi/.clusterapi_output/envtest.kubeconfig] 
      INFO Running process: azureaso infrastructure provider with args [-v=0 -metrics-addr=0 -health-addr=127.0.0.1:46225 -webhook-port=36945 -webhook-cert-dir=/tmp/envtest-serving-certs-2609990120 -crd-pattern= -crd-management=none] 
      INFO Creating infra manifests...                  
      INFO Created manifest *v1.Namespace, namespace= name=openshift-cluster-api-guests 
      INFO Created manifest *v1.Namespace, namespace= name=capz-system 
      INFO Created manifest *v1.Secret, namespace=openshift-cluster-api-guests name=jima23test-mv8m8-azure-client-secret 
      INFO Created manifest *v1beta1.AzureClusterIdentity, namespace=openshift-cluster-api-guests name=jima23test-mv8m8 
      INFO Created manifest *v1beta1.Cluster, namespace=openshift-cluster-api-guests name=jima23test-mv8m8 
      INFO Created manifest *v1beta1.AzureCluster, namespace=openshift-cluster-api-guests name=jima23test-mv8m8 
      INFO Done creating infra manifests                
      INFO Creating kubeconfig entry for capi cluster jima23test-mv8m8 
      INFO Waiting up to 15m0s (until 7:57AM UTC) for network infrastructure to become ready... 
      INFO Network infrastructure is ready              
      INFO GalleryImage.ID=/subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/jima23test-mv8m8-rg/providers/Microsoft.Compute/galleries/gallery_jima23test_mv8m8/images/jima23test-mv8m8 
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x410260c]goroutine 1 [running]:
      github.com/openshift/installer/pkg/infrastructure/azure.getControlPlaneSecurityType({{0x21cefc60, 0xc000d81ef0}, 0xc001ea2c00, {0xc0014d1290, 0x10}})
          /go/src/github.com/openshift/installer/pkg/infrastructure/azure/azure.go:900 +0x2c
      
      
      The issue always happens when controlPlane.platform is empty in install-config
      ==============
      controlPlane:
        architecture: amd64
        hyperthreading: Enabled
        name: master
        platform: {}

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

         4.17.0-rc.3/4.17.0-rc.5 

      How reproducible:

          Always when controlPlane.platform is empty in install-config

      Steps to Reproduce:

          1. Directly create cluster in interactive mode
          2. 
          3.
          

      Actual results:

          Installer failed and got panic error    

      Expected results:

          Installation succeeded

      Additional info:

          The issue was introduced in https://github.com/openshift/installer/pull/8990 when fixing bug https://issues.redhat.com//browse/OCPBUGS-41300, and fixed in https://github.com/openshift/installer/pull/9007.
      PR#9007 has already been merged and included in nightly build 4.17.0-0.nightly-2024-09-14-102625, but not in rc.3/rc.5, and rc.3/rc.5 only contains PR#8990

            sdasu@redhat.com Sandhya Dasu
            jinyunma Jinyun Ma
            Gaoyun Pei Gaoyun Pei
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: