-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Return success when registrying unhealthy node. #2239
Conversation
@@ -61,7 +61,11 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE | |||
if err != nil { | |||
return nil, err | |||
} | |||
minion, err := rs.registry.GetMinion(ctx, minion.Name) | |||
minionName := minion.Name | |||
minion, err := rs.registry.GetMinion(ctx, minionName) |
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.
Why does GetMinion error out on the minion being unhealthy? IMO unhealthy should be a bit in the minion's state. ...I realize this would be a large change now that I say it.
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.
Because we can have a health registry on top of that.
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/master/master.go#L266
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.
Yeah, we should remove the healthy registry thingy and just have a controller doing health checks and setting a healthy bit, e.g., minion.State.Healthy = false. Then scheduler needs to pay attention to that...
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.
Corrent. That's part of the larger change I wanna make :)
At initial stage, I plan to have apiserver filter out unhealthy node to keep the interface the same, i.e. scheduler doesn't have to take care of filtering out unhealthy node. Later, we can use something similar to a selector. So scheduler can select healthy node, admin can find and diagonse unhealthy node. We can probabaly add more states later.
I don't like this solution but I'm willing to take it if a real fix is in the works and will take a while. |
LGTM |
Return success when registrying unhealthy node.
Fix #2192