-
Notifications
You must be signed in to change notification settings - Fork 38
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
Bug 1823667: UPSTREAM: <carry>: Compare against minSize in deleteNodes() #148
Conversation
@enxebre: An error was encountered adding this pull request to the external tracker bugs for bug 1823667 on the Bugzilla server at https://bugzilla.redhat.com:
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@@ -92,6 +92,7 @@ func (ng *nodegroup) IncreaseSize(delta int) error { | |||
// Implementation required. | |||
func (ng *nodegroup) DeleteNodes(nodes []*corev1.Node) error { | |||
// Step 1: Verify all nodes belong to this node group. | |||
|
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.
Is this new line intentional?
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.
This is resolved, the above code wasn't present when I first reviewed
return fmt.Errorf("unable to delete %d machines in %q, machine replicas are < 0 ", len(nodes), ng.Id()) | ||
} else if replicas-int32(len(nodes)) == 0 && !ng.scalableResource.CanScaleFromZero() { | ||
return fmt.Errorf("unable to delete %d machines in %q, machine replicas are 0", len(nodes), ng.Id()) | ||
if replicas-int32(len(nodes)) <= int32(ng.MinSize()) { |
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.
I think this should be <
rather than <=
shouldn't it?
Eg, if I have 3 replicas and want to remove 2, with min size 1, this should be allowed but 3-2 <= 1
is true
7323be7
to
2d24858
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.
/approve
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.
this lgtm, holding on label for Joel's question
My comment was resolved, LGTM on @elmiko's behalf /lgtm |
/bugzilla refresh |
@enxebre: This pull request references Bugzilla bug 1823667, which is valid. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
New changes are detected. LGTM label has been removed. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: JoelSpeed 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 |
@enxebre: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
When calling deleteNodes() we should fail early if the operation could delete nodes below the nodeGroup minSize().
This is one in a series of PR to mitigate kubernetes#3104
Once we got all of them merged we'll put a PR upstream.