-
Notifications
You must be signed in to change notification settings - Fork 753
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
Not returning error when unassign called on pod without IP #740
Conversation
if err == datastore.ErrUnknownPod { | ||
err = 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.
I guess you were basing this change on tests done on v1.5.3 or earlier? This kind of change was the main cause of issues in v1.5.4. It looks innocent, but had other effects because of the cleanup that got triggered in the CNI binary. See #641 for some details.
Also, #688 should fix this issue to stop returning an error to Kubelet when we try to delete a pod that failed to get an IP. That change should be in the v1.6.0-rc4 release.
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.
Thanks @mogren. That makes sense.
@mogren actually, I dont think this has been fixed yet in the cni, I just saw these logs on the cni agent, after a node reboot, leading to all pods on that node going into an Error status:
|
@uruddarraju You are right, I just saw it as well. The issue is that gRPC wraps the error, so the check will have to be something like: if strings.Contains(err.Error(), datastore.ErrUnknownPod.Error()) { |
#739
As described in the above issues, the current code for UnassignIP returns an error on ipamD when UnassignIP is called on pods that dont have an IP assigned yet. This fix makes this idempotent and does not return an error when a pod without Ip goes through UnassignIP flow
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.