-
Notifications
You must be signed in to change notification settings - Fork 4k
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 error if aws fail to find nodegroup for node #2247
Conversation
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: krzysztof-jastrzebski The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -108,7 +108,7 @@ func (aws *awsCloudProvider) NodeGroupForNode(node *apiv1.Node) (cloudprovider.N | |||
asg := aws.awsManager.GetAsgForInstance(*ref) | |||
|
|||
if asg == nil { | |||
return nil, nil | |||
return nil, fmt.Errorf("cannot find ASG for node %v", ref.Name) |
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.
We return an error here, but this method gets called looking for Kubernetes nodes that aren't part of a discovered ASG (in my case, my master machines are part of an ASG, but not an ASG that the cluster autoscaler discovers or touches).
In core.getNodeInfosForGroups
, we call on this method, and any errors that come back out now cause that function to fail earlier than it used to. It was written to accommodate the nil return here, without an accompanying error.
See #2345 for what may be a consequence of this change (with initial commentary from @losipiuk).
See #2357 for reverting this patch against the 1.16 and later versions. |
Resolve #2161
When CA scales down node, node is still in cache. aws manager return
nil, nil
for node doesn't belong to existing node group.@jaypipes