-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Assume volume is detached if node doesn't exist #29485
Assume volume is detached if node doesn't exist #29485
Conversation
@@ -869,7 +869,7 @@ func (c *Cloud) InstanceID(name string) (string, error) { | |||
} | |||
inst, err := c.getInstanceByNodeName(name) | |||
if err != nil { | |||
return "", err | |||
return "", fmt.Errorf("getInstanceByNodeName failed for %q with %v", name, err) |
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.
Yes, we have to be really careful with when we return InstanceNotFound. According to the comments on cloudprovider.Instances, we must return InstanceNotFound, but actually that's wrong and it only applies to ExternalID (AFAICT), and you didn't wrap it there. I'll put in a separate PR to fix the comments.
To (try to) be clear: But what you're done here is right, though it would be wrong if the docs were right. At least I think so!
LGTM |
Doc fix for the contract: #29490 |
fa2e107
to
89fd358
Compare
Thanks @justinsb |
GCE e2e build/test passed for commit 89fd358. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 89fd358. |
Automatic merge from submit-queue |
nodeName, | ||
err) | ||
return nil |
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.
should this be continuing (as per the comment), rather than returning from the whole func?
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.
The behavior is correct. Perhaps the comment can be clarified. "Move on" in this case means abandon trying to update the status of a node (since it no longer exists).
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, wasn't sure if it was intending to also short-circuit and not update any of the other remaining nodes, or if a bad nodeName could permanently block ever getting to update those nodes' status
…ck-of-#24385-kubernetes#29485-upstream-release-1.3 Automated cherry pick of kubernetes#24385 kubernetes#29485 upstream release 1.3
Fixes #29358