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

[vSphere] network.devices, template and workspace will be cleared when deleting the controlplanemachineset, updating these fields will not trigger an update

XMLWordPrintable

    • Moderate
    • Yes
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, the installation program populated the `network.devices`, `template` and `workspace` fields in the `spec.template.spec.providerSpec.value` section of the {vmw-full} control plane machine set custom resource (CR).
      These fields should be set in the {vmw-short} failure domain, and the installation program populating them caused unintended behaviors.
      Updating these fields did not trigger an update to the control plane machines, and these fields were cleared when the control plane machine set was deleted.
      With this release, the installation program is updated to no longer populate values that are included in the failure domain configuration.
      If these values are not defined in a failure domain configuration, for instance on a cluster that is updated to {product-title} {product-version} from an earlier version, the values defined by the installation program are used.
      (link:https://issues.redhat.com/browse/OCPBUGS-44047[*OCPBUGS-44047*])
      Show
      * Previously, the installation program populated the `network.devices`, `template` and `workspace` fields in the `spec.template.spec.providerSpec.value` section of the {vmw-full} control plane machine set custom resource (CR). These fields should be set in the {vmw-short} failure domain, and the installation program populating them caused unintended behaviors. Updating these fields did not trigger an update to the control plane machines, and these fields were cleared when the control plane machine set was deleted. With this release, the installation program is updated to no longer populate values that are included in the failure domain configuration. If these values are not defined in a failure domain configuration, for instance on a cluster that is updated to {product-title} {product-version} from an earlier version, the values defined by the installation program are used. (link: https://issues.redhat.com/browse/OCPBUGS-44047 [* OCPBUGS-44047 *])
    • Bug Fix
    • Done

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

      There were remaining issues from the original issue. A new bug has been opened to address this. This is a clone of issue OCPBUGS-32947. The following is the description of the original issue:

      Description of problem:

          [vSphere] network.devices, template and workspace will be cleared when deleting the controlplanemachineset, updating these fields will not trigger an update

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

          4.16.0-0.nightly-2024-04-23-032717

      How reproducible:

          Always

      Steps to Reproduce:

          1.Install a vSphere 4.16 cluster, we use automated template: ipi-on-vsphere/versioned-installer
      liuhuali@Lius-MacBook-Pro huali-test % oc get clusterversion
      NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
      version   4.16.0-0.nightly-2024-04-23-032717   True        False         24m     Cluster version is 4.16.0-0.nightly-2024-04-23-032717     
      
          2.Check the controlplanemachineset, you can see network.devices, template and workspace have value.
      liuhuali@Lius-MacBook-Pro huali-test % oc get controlplanemachineset     
      NAME      DESIRED   CURRENT   READY   UPDATED   UNAVAILABLE   STATE    AGE
      cluster   3         3         3       3                       Active   51m
      liuhuali@Lius-MacBook-Pro huali-test % oc get controlplanemachineset cluster -oyaml
      apiVersion: machine.openshift.io/v1
      kind: ControlPlaneMachineSet
      metadata:
        creationTimestamp: "2024-04-25T02:52:11Z"
        finalizers:
        - controlplanemachineset.machine.openshift.io
        generation: 1
        labels:
          machine.openshift.io/cluster-api-cluster: huliu-vs425c-f5tfl
        name: cluster
        namespace: openshift-machine-api
        resourceVersion: "18273"
        uid: f340d9b4-cf57-4122-b4d4-0f45f20e4d79
      spec:
        replicas: 3
        selector:
          matchLabels:
            machine.openshift.io/cluster-api-cluster: huliu-vs425c-f5tfl
            machine.openshift.io/cluster-api-machine-role: master
            machine.openshift.io/cluster-api-machine-type: master
        state: Active
        strategy:
          type: RollingUpdate
        template:
          machineType: machines_v1beta1_machine_openshift_io
          machines_v1beta1_machine_openshift_io:
            failureDomains:
              platform: VSphere
              vsphere:
              - name: generated-failure-domain
            metadata:
              labels:
                machine.openshift.io/cluster-api-cluster: huliu-vs425c-f5tfl
                machine.openshift.io/cluster-api-machine-role: master
                machine.openshift.io/cluster-api-machine-type: master
            spec:
              lifecycleHooks: {}
              metadata: {}
              providerSpec:
                value:
                  apiVersion: machine.openshift.io/v1beta1
                  credentialsSecret:
                    name: vsphere-cloud-credentials
                  diskGiB: 120
                  kind: VSphereMachineProviderSpec
                  memoryMiB: 16384
                  metadata:
                    creationTimestamp: null
                  network:
                    devices:
                    - networkName: devqe-segment-221
                  numCPUs: 4
                  numCoresPerSocket: 4
                  snapshot: ""
                  template: huliu-vs425c-f5tfl-rhcos-generated-region-generated-zone
                  userDataSecret:
                    name: master-user-data
                  workspace:
                    datacenter: DEVQEdatacenter
                    datastore: /DEVQEdatacenter/datastore/vsanDatastore
                    folder: /DEVQEdatacenter/vm/huliu-vs425c-f5tfl
                    resourcePool: /DEVQEdatacenter/host/DEVQEcluster/Resources
                    server: vcenter.devqe.ibmc.devcluster.openshift.com
      status:
        conditions:
        - lastTransitionTime: "2024-04-25T02:59:37Z"
          message: ""
          observedGeneration: 1
          reason: AsExpected
          status: "False"
          type: Error
        - lastTransitionTime: "2024-04-25T03:03:45Z"
          message: ""
          observedGeneration: 1
          reason: AllReplicasAvailable
          status: "True"
          type: Available
        - lastTransitionTime: "2024-04-25T03:03:45Z"
          message: ""
          observedGeneration: 1
          reason: AsExpected
          status: "False"
          type: Degraded
        - lastTransitionTime: "2024-04-25T03:01:04Z"
          message: ""
          observedGeneration: 1
          reason: AllReplicasUpdated
          status: "False"
          type: Progressing
        observedGeneration: 1
        readyReplicas: 3
        replicas: 3
        updatedReplicas: 3     
      
          3.Delete the controlplanemachineset, it will recreate a new one, but those three fields that had values ​​before are now cleared.
      
      liuhuali@Lius-MacBook-Pro huali-test % oc delete controlplanemachineset cluster
      controlplanemachineset.machine.openshift.io "cluster" deleted
      liuhuali@Lius-MacBook-Pro huali-test % oc get controlplanemachineset
      NAME      DESIRED   CURRENT   READY   UPDATED   UNAVAILABLE   STATE      AGE
      cluster   3         3         3       3                       Inactive   6s
      liuhuali@Lius-MacBook-Pro huali-test % oc get controlplanemachineset cluster -oyaml
      apiVersion: machine.openshift.io/v1
      kind: ControlPlaneMachineSet
      metadata:
        creationTimestamp: "2024-04-25T03:45:51Z"
        finalizers:
        - controlplanemachineset.machine.openshift.io
        generation: 1
        name: cluster
        namespace: openshift-machine-api
        resourceVersion: "46172"
        uid: 45d966c9-ec95-42e1-b8b0-c4945ea58566
      spec:
        replicas: 3
        selector:
          matchLabels:
            machine.openshift.io/cluster-api-cluster: huliu-vs425c-f5tfl
            machine.openshift.io/cluster-api-machine-role: master
            machine.openshift.io/cluster-api-machine-type: master
        state: Inactive
        strategy:
          type: RollingUpdate
        template:
          machineType: machines_v1beta1_machine_openshift_io
          machines_v1beta1_machine_openshift_io:
            failureDomains:
              platform: VSphere
              vsphere:
              - name: generated-failure-domain
            metadata:
              labels:
                machine.openshift.io/cluster-api-cluster: huliu-vs425c-f5tfl
                machine.openshift.io/cluster-api-machine-role: master
                machine.openshift.io/cluster-api-machine-type: master
            spec:
              lifecycleHooks: {}
              metadata: {}
              providerSpec:
                value:
                  apiVersion: machine.openshift.io/v1beta1
                  credentialsSecret:
                    name: vsphere-cloud-credentials
                  diskGiB: 120
                  kind: VSphereMachineProviderSpec
                  memoryMiB: 16384
                  metadata:
                    creationTimestamp: null
                  network:
                    devices: null
                  numCPUs: 4
                  numCoresPerSocket: 4
                  snapshot: ""
                  template: ""
                  userDataSecret:
                    name: master-user-data
                  workspace: {}
      status:
        conditions:
        - lastTransitionTime: "2024-04-25T03:45:51Z"
          message: ""
          observedGeneration: 1
          reason: AsExpected
          status: "False"
          type: Error
        - lastTransitionTime: "2024-04-25T03:45:51Z"
          message: ""
          observedGeneration: 1
          reason: AllReplicasAvailable
          status: "True"
          type: Available
        - lastTransitionTime: "2024-04-25T03:45:51Z"
          message: ""
          observedGeneration: 1
          reason: AsExpected
          status: "False"
          type: Degraded
        - lastTransitionTime: "2024-04-25T03:45:51Z"
          message: ""
          observedGeneration: 1
          reason: AllReplicasUpdated
          status: "False"
          type: Progressing
        observedGeneration: 1
        readyReplicas: 3
        replicas: 3
        updatedReplicas: 3     
      
          4.I active the controlplanemachineset and it does not trigger an update,  I continue to add these field values ​​back and it does not trigger an update, I continue to edit these fields to add a second network device and it still does not trigger an update. 
      
      
                  network:
                    devices:
                    - networkName: devqe-segment-221
                    - networkName: devqe-segment-222
      
      
      By the way, I can create worker machines with other network device or two network devices.
      huliu-vs425c-f5tfl-worker-0a-ldbkh    Running                          81m
      huliu-vs425c-f5tfl-worker-0aa-r8q4d   Running                          70m

      Actual results:

          network.devices, template and workspace will be cleared when deleting the controlplanemachineset, updating these fields will not trigger an update

      Expected results:

          The fields value should not be changed when deleting the controlplanemachineset, 
          Updating these fields should trigger an update, or if these fields should not be modified, then it should not take effect when modifying the controlplanemachineset, as such an inconsistency seems confusing.

      Additional info:

          Must gather:  https://drive.google.com/file/d/1mHR31m8gaNohVMSFqYovkkY__t8-E30s/view?usp=sharing 

              rhn-support-rvanderp Richard Vanderpool
              openshift-crt-jira-prow OpenShift Prow Bot
              Huali Liu Huali Liu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: