Bug 2099836 - MachineSet labels are not added to NEW nodes
Summary: MachineSet labels are not added to NEW nodes
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.10
Hardware: x86_64
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Joel Speed
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-21 19:24 UTC by okashi
Modified: 2022-08-08 15:34 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-08 15:34:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
video showing the process and results (1.53 MB, video/mp4)
2022-06-21 19:24 UTC, okashi
no flags Details

Description okashi 2022-06-21 19:24:41 UTC
Created attachment 1891725 [details]
video showing the process and results

Description of problem:
In Azure Red Hat OpenShift (ARO) if I add a label to the machineset `spec.template.metadata.labels` the label appears in any new machines that are created from that machineset.  Are the underlying nodes of those new machines supposed to have that label too? I expect the nodes to have the label, but I am not seeing it.

Version-Release number of selected component (if applicable):
Server Version: 4.10.15
Kubernetes Version: v1.23.5+3afdacb

How reproducible:


Steps to Reproduce:
1. Deploy an ARO cluster
2. Add a label to a machineset under spec.template.metadata.labels
3. Scale the machineset up by at least one
4. Check the labels on the NEW machine (the added label should be there)
5. Check the node labels for the NEW nodes.  The Label is NOT there.

Actual results:
Node label is not on the new node.

Expected results:
Node label is on the new node.

Additional info:

Comment 1 sunzhaohua 2022-07-29 03:42:58 UTC
The label should be set to a machineset under spec.template.spec.metadata.labels
https://docs.openshift.com/container-platform/4.5/machine_management/creating_machinesets/creating-machineset-azure.html#machineset-yaml-azure_creating-machineset-azure

Comment 2 Joel Speed 2022-08-01 15:29:06 UTC
As Zhaohua has said, the labels need to be on the spec.template.spec.metadata rather than just spec.template.metadata. I don't believe there to be a bug in that logic currently as this is covered by our existing testing. Can we double check that this works as expected when adding labels to the spec.template.spec.metadata? If there's no issue here we can close this out

Comment 3 Joel Speed 2022-08-08 15:34:40 UTC
I don't believe this is a bug, if you need any further support feel free to reach out


Note You need to log in before you can comment on or make changes to this bug.