-
Notifications
You must be signed in to change notification settings - Fork 122
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
Optimise pod handling in machine updates #202
Conversation
c73c4ee
to
f1c3324
Compare
f1c3324
to
1606ca0
Compare
Shouldn't we handle the rollback scenario? Basically, remove the taints from the machines, in case the update is paused and rolled back. |
I thought that it would be okay to ignore this as even if it rolls back, these nodes would only have prefer-no-schedule, which still means pods will be scheduled here if its the last option. Also, I haven't seen usages for rollbacks much. I do agree that ideally, this should be there, but I am not sure if it's required here. I have no hard reservations though. |
c8ff41b
to
a09b8e2
Compare
So what is the conclusion here then, are we really not handling the rollback? PS: Seems like rollback scene had been taken care, just that didn't reflect here in conversation. |
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.
halfway through the review.
It would be nice to brief the algorithm a little in PR-description or let's discuss it offline sometime in office.
// removeTaintNodesBackingMachineSets removes taints from all nodes backing the machineSets | ||
func (dc *controller) removeTaintNodesBackingMachineSets(machineSet *v1alpha1.MachineSet) error { | ||
|
||
if machineSet.Annotations[PreferNoSchedule] == "" { |
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.
What happens if, due to any reason, PNS is not there as a key in the map, just curious? Will that causes Runtime error?
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.
Fixed this issue. Refer this commit for all changes - 81cc655
Yes, rollback has been taken care off. |
c0de780
to
36f3309
Compare
1. Renamed PreferNoSchedule to PreferNoScheduleKey 2. Fixed map key check
36f3309
to
81cc655
Compare
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.
looks good, thanks.
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #120
Special notes for your reviewer:
Release note: