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
Fix node labeling. Issue #305 #416
Conversation
Can one of the admins verify this patch? |
Thanks Diego. @sdodson or I will try this out and work with you to get it merged! |
@@ -16,3 +16,10 @@ | |||
command: > | |||
{{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=true | |||
with_items: openshift_scheduleable_nodes | |||
|
|||
- name: Tag schedulable 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.
Perhaps 'Label nodes' instead, also why are we only labeling schedulable 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.
Ok, I'll change the title.
I haven't thought about that, i'll tag all nodes.
If we remove the labels it fails to unset them, this is probably not a very common pattern but I'm sure someone will do it and expect it to work. We may need to iterate over the current labels removing them. from
Current error
|
Agreed! |
@sdodson would you mind taking a look? it's supposed to work even the labels are empty. |
@sdodson @spinolacastro overall the change looks good. The big question I have is on the behavior that we expect... Do we really want openshift-ansible updating node labels after initial installation? We need to keep in mind that changing node labels will not re-deploy applications that are already deployed based on the previous labels. We should probably either document this edge case (including how to evacuate and re-schedule pods that are deployed on the nodes that have had their labels changed), or we should lock down node labeling to only handle the case of initial node installation/configuration. I'm not overly tied to either outcome, we just need to make sure that user expectations are properly set for the chosen method. |
@detiber I wouldn't expect ansible to be responsible for triggering items to be rescheduled on labeling changes. I'd say we document that you'll need to handle rescheduling on your own. Unrelated I could see the need for an adhoc playbook that re-balances clusters. |
@sdodson 👍 on both accounts. I mainly wanted to highlight that users could expect that relabeling the nodes would lead to workloads being rescheduled based on node labels, which would not happen. |
@spinolacastro Can you add a note to roles/openshift_node/README.md mentioning that re-labeling nodes doesn't trigger re-scheduling? I guess evacuating the node and letting the scheduler sort it out. Also mention that removing a label from a node isn't currently implemented.
Then squash things and I think this is good enough to merge with the documented caveats. |
Ok, i'll write some notes. |
Yep, looks good to me, merging |
@sdodson @spinolacastro running into an issue since this was merged...
the internal node name does not necessarily match up with the inventory_hostname... working on a fix currently. |
@sdodson @spinolacastro @wshearn currently testing this fix: #467 |
No description provided.