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

[ Azure ]not able to deploy machine with publicIp:true

    XMLWordPrintable

Details

    • No
    • CLOUD Sprint 232
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      * The previous resolution of link:https://issues.redhat.com/browse/OCPBUGS-5546[OCPBUGS-5546] removed the `clusterName` assignment of `MachineConfig.Name` in the machine configuration object. As a result, the value of the parameter was an empty string and, when combined with the value of `machineName` to create an IP address name, created an invalid value. This caused machines to fail during provisioning. With this release, the value for `clusterName` is obtained from the infrastructure object so that it creates a valid IP address name.
      (link:https://issues.redhat.com/browse/OCPBUGS-7696[*OCPBUGS-7696*])
      Show
      * The previous resolution of link: https://issues.redhat.com/browse/OCPBUGS-5546 [ OCPBUGS-5546 ] removed the `clusterName` assignment of `MachineConfig.Name` in the machine configuration object. As a result, the value of the parameter was an empty string and, when combined with the value of `machineName` to create an IP address name, created an invalid value. This caused machines to fail during provisioning. With this release, the value for `clusterName` is obtained from the infrastructure object so that it creates a valid IP address name. (link: https://issues.redhat.com/browse/OCPBUGS-7696 [* OCPBUGS-7696 *])
    • Bug Fix
    • Done

    Description

      Description of problem:

      not able to deploy machine with publicIp:true for Azure disconnected cluster 

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

      Cluster version is 4.13.0-0.nightly-2023-02-16-120330

      How reproducible:

      Always

      Steps to Reproduce:

      1.Create a machineset with publicIp true
      
      apiVersion: machine.openshift.io/v1beta1
      kind: MachineSet
      metadata:
        annotations:
          machine.openshift.io/GPU: "0"
          machine.openshift.io/memoryMb: "16384"
          machine.openshift.io/vCPU: "4"
        creationTimestamp: "2023-02-17T09:54:35Z"
        generation: 1
        labels:
          machine.openshift.io/cluster-api-cluster: huliu-az17a-vk8wq
          machine.openshift.io/cluster-api-machine-role: worker
          machine.openshift.io/cluster-api-machine-type: worker
        name: machineset-36489
        namespace: openshift-machine-api
        resourceVersion: "227215"
        uid: e9213148-0bdf-48f1-84be-1e1a36af43c1
      spec:
        replicas: 1
        selector:
          matchLabels:
            machine.openshift.io/cluster-api-cluster: huliu-az17a-vk8wq
            machine.openshift.io/cluster-api-machineset: machineset-36489
        template:
          metadata:
            labels:
              machine.openshift.io/cluster-api-cluster: huliu-az17a-vk8wq
              machine.openshift.io/cluster-api-machine-role: worker
              machine.openshift.io/cluster-api-machine-type: worker
              machine.openshift.io/cluster-api-machineset: machineset-36489
          spec:
            lifecycleHooks: {}
            metadata: {}
            providerSpec:
              value:
                acceleratedNetworking: true
                apiVersion: machine.openshift.io/v1beta1
                credentialsSecret:
                  name: azure-cloud-credentials
                  namespace: openshift-machine-api
                diagnostics: {}
                image:
                  offer: ""
                  publisher: ""
                  resourceID: /resourceGroups/huliu-az17a-vk8wq-rg/providers/Microsoft.Compute/galleries/gallery_huliu_az17a_vk8wq/images/huliu-az17a-vk8wq-gen2/versions/latest
                  sku: ""
                  version: ""
                kind: AzureMachineProviderSpec
                location: westus
                managedIdentity: huliu-az17a-vk8wq-identity
                metadata:
                  creationTimestamp: null
                networkResourceGroup: huliu-az17a-vk8wq-rg
                osDisk:
                  diskSettings: {}
                  diskSizeGB: 128
                  managedDisk:
                    storageAccountType: Premium_LRS
                  osType: Linux
                publicIP: true
                publicLoadBalancer: huliu-az17a-vk8wq
                resourceGroup: huliu-az17a-vk8wq-rg
                subnet: huliu-az17a-vk8wq-worker-subnet
                userDataSecret:
                  name: worker-user-data
                vmSize: Standard_D4s_v3
                vnet: huliu-az17a-vk8wq-vnet
                zone: ""
      status:
        fullyLabeledReplicas: 1
        observedGeneration: 1
        replicas: 1
      
      
      Machine in failed status with below error :
       Error Message:           failed to reconcile machine "machineset-36489-hhjfc": network.PublicIPAddressesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidDomainNameLabel" Message="The domain name label -machineset-36489-hhjfc is invalid. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$." Details=[]
      

       

      Actual results:

      Machine should be created successfully as publicZone exists in the cluster DNS 
      oc edit dns cluster
      
      apiVersion: config.openshift.io/v1
      kind: DNS
      metadata:
        creationTimestamp: "2023-02-17T02:26:41Z"
        generation: 1
        name: cluster
        resourceVersion: "529"
        uid: a299c3d8-e8ed-4266-b842-7585d5c0632d
      spec:
        baseDomain: huliu-az17a.qe.azure.devcluster.openshift.com
        privateZone:
          id: /subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/huliu-az17a-vk8wq-rg/providers/Microsoft.Network/privateDnsZones/huliu-az17a.qe.azure.devcluster.openshift.com
        publicZone:
          id: /subscriptions/53b8f551-f0fc-4bea-8cba-6d1fefd54c8a/resourceGroups/os4-common/providers/Microsoft.Network/dnszones/qe.azure.devcluster.openshift.com
      status: {}
      

      Expected results:

      machine should be running successfully 

      Additional info:

      Must Gather https://drive.google.com/file/d/1cPkFrTh7veO1Ph24GmVAyrs6mI3dmWYR/view?usp=sharing

      Attachments

        Issue Links

          Activity

            People

              ddonati@redhat.com Damiano Donati
              rh-ee-miyadav Milind Yadav
              Milind Yadav Milind Yadav
              Jeana Routh Jeana Routh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: