-
Notifications
You must be signed in to change notification settings - Fork 9
Add playbook to set SMT on worker nodes #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kishen-v The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
|
||
| - name: Restart kubelet to update the node's capacity at the cluster level | ||
| shell: systemctl restart kubelet | ||
| when: node_type == "worker" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be we can remove node_type once we set the hosts properly in the calling yaml file with hosts type set!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mkumatag, I've made the changes generic to allow an option to set the SMT for a node regardless of its kind.
|
|
||
| - name: Restart kubelet to update the node's capacity at the cluster level | ||
| shell: systemctl restart kubelet | ||
| when: inventory_hostname in groups[item.key] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
item usually will be applicable when loop in place, not sure what is behaviour here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @mkumatag, the when: inventory_hostname in groups[item.key] condition was added to prevent the command from running against all hosts, as the playbook has it defined..
Without this check, the last SMT value to be applied across was being set across all nodes, regardless of the previously set configuration..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update: Removed the looping as there are related files for masters/workers under group_vars.. The individual SMT levels are set in the respective files.
| - role: reboot-sequentially | ||
| - reboot-sequentially | ||
|
|
||
| - name: Set desired SMT levels on nodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Necessary to set the SMT levels while patching, as the previous SMT configurations do not persist on a node restart.
This PR introduces an ansible role to set SMT while setting up the build cluster.
The relevant documentation surrounding this topic will be submitted to k8s.io/infra, along the steps involved while setting up the build cluster as a follow-up task.