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

ControlPlaneMachineSet resets capacityReservationId to blank when updated in an Inactive state

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • CLOUD Sprint 274
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

          When a ControlPlaneMachineSet (CPMS) is in an Inactive state, any attempt to modify it, specifically to add or update the controlplanemachineset.spec.template.machines_v1beta1_machine_openshift_io.spec.providerSpec.value., results in the creation of a new CPMS. However, in this newly created CPMS, the capacityReservationId field is reset to a blank string ("") instead of retaining the value that was just applied. This prevents administrators from associating control plane machines with an AWS Capacity Reservation if the CPMS is in an Inactive state.
      

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

         4.19.2, AWS, IPI

      How reproducible:

          100%

      Steps to Reproduce:

      1. Delete the existing ControlPlaneMachineSet:
      $ oc delete controlplanemachinesets.machine.openshift.io cluster
      controlplanemachineset.machine.openshift.io "cluster" deleted
      
      This action forces the cluster to automatically recreate the resource.
      
      2. Wait for the ControlPlaneMachineSet to be recreated:
      After a few moments, the CPMS object is recreated, but it enters an Inactive state.
      $ oc get controlplanemachineset
      NAME      DESIRED   CURRENT   READY   UPDATED   UNAVAILABLE   STATE      AGE
      cluster   3         3         3       1                     Inactive   4m
       
      3. Edit the Inactive ControlPlaneMachineSet:
      Modify the cluster CPMS to add a value for capacityReservationId:
      $ oc edit controlplanemachineset cluster
            spec:
              lifecycleHooks: {}
              metadata: {}
              providerSpec:
                value:
                  capacityReservationId: "cr-06f0dfdbd1de87694"
      ...
      ...
      
      controlplanemachineset.machine.openshift.io/cluster edited
      
      4. Upon saving the changes, observe that a new CPMS resource is immediately created. 
      
      $ oc get controlplanemachineset
      NAME      DESIRED   CURRENT   READY   UPDATED   UNAVAILABLE   STATE      AGE
      cluster   3         3         3       1                       Inactive   2s
      
      5. Verify the capacityReservationId:
      $ oc get controlplanemachineset cluster  -o yaml | grep capacity -i
                  capacityReservationId: ""

       

      Actual results:

          The capacityReservationId field in the new ControlPlaneMachineSet is blank, ignoring the value that was applied during the edit.          capacityReservationId: ""

      Expected results:

          The capacityReservationId field in the ControlPlaneMachineSet should be populated with the value provided during the oc edit operation. The configuration change should be successfully applied and retained.          capacityReservationId: "your-reservation-id" 

      Additional info:

          

              ddonati@redhat.com Damiano Donati
              rhn-support-dpateriy Divyam Pateriya
              None
              None
              Zhaohua Sun Zhaohua Sun
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: