-
Notifications
You must be signed in to change notification settings - Fork 260
Throw CNI error - On CNI DEL call, if communication with CNS cannot be established. #683
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #683 +/- ##
==========================================
- Coverage 38.63% 38.56% -0.07%
==========================================
Files 78 79 +1
Lines 10430 10446 +16
==========================================
- Hits 4030 4029 -1
- Misses 5909 5925 +16
- Partials 491 492 +1 |
|
Ideally we shouldn't need to go to CNS to get the network name for the endpoint that is already created. Regardless of the CNS state we should be able to delete the endpoint in CNI. |
ramiro-gamarra
left a comment
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.
couple comments
|
looks good to me but lets wait for the pipeline issue to get resolved so that this gets validated with e2e tests |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
CNI is some cases is unable to talk to CNS. This can happen, CNS crashing or race between start/CNI getting invoked.
Currently if this communication errrs out on DEL calls, CNI will silently ignore the error. Container runtime assumes everything went fine and deletes the container. But the HNS endpoints are still there on the host result into them being orphaned. If a container with similar configuration is placed on the host , then ADD call will fail with object already exists error.
Please note, CNI DEL are supposed to be idempotent, and should generally handle the resource not found/exist error elegantely without any error.