Labels and taints are not removed from nodes when removed from MachinePool in OSD/ROSA
Environment
- Red Hat OpenShift Service on AWS (ROSA)
- 4
- Red Hat OpenShift Dedicated (OSD)
* - OpenShift Cluster Manager (OCM) web console
rosaCLI- MachinePool
Issue
- After removing
labels/taintsfrom aMachinePoolvia OCM web console orrosaCLI, thelabels/taintsare not removed from the nodes of thatMachinePool.
Resolution
Red Hat is aware of this issue, and there is an internal task to allow the deletion of labels/taints.
Root Cause
Previous change in the code to manage how the labels and taints are synchronized from the MachinePools to the Nodes is preventing the labels/taints to be removed.
Diagnostic Steps
The following example is using labels, but the same behavior is shown for taints.
-
Create
labels/taintsfrom the OCM web console or viarosaCLI:$ rosa edit machinepool --cluster [cluster_name] --labels="custom-lable=true" [machinepool_name] -
Wait for some time after the
labelis reconciled to theNodes:$ oc get nodes --show-labels [...] worker-0.example.com Ready worker 1d20h v1.25.11+1485cc9 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,host-files=true,kubernetes.io/arch=amd64,kubernetes.io/hostname=worker-0.example.com,kubernetes.io/os=linux,node-role.kubernetes.io/worker=,node.openshift.io/os_id=rhcos,custom-lable=true [...] -
Delete the
labelsfrom the OCM web console or withrosaCLI:$ rosa edit machinepool --cluster [cluster_name] --labels="" [machinepool_name] -
After waiting for a long time, the deleted
labelsare still present:$ oc get nodes --show-labels [...] worker-0.example.com Ready worker 1d20h v1.25.11+1485cc9 beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,host-files=true,kubernetes.io/arch=amd64,kubernetes.io/hostname=worker-0.example.com,kubernetes.io/os=linux,node-role.kubernetes.io/worker=,node.openshift.io/os_id=rhcos,custom-lable=true [...]
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments