Skip to content
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

tolerate invalid cni caches for deletion #1072

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

henry118
Copy link
Member

@henry118 henry118 commented Mar 7, 2024

Fixes: #1055
Closes: #1066

In DelNetworkList function, ignore the errors returned by getCachedResult and continue to invoke plugins for deletion as best effort. Also updated the test case to adapt this new behavior.

Cached results are deleted from disk in the following two cases:

  1. getCachedResult returns an error; OR
  2. getCachedResult succeeds and no errors are returned from plugins

Cached results are not deleted if (I think this will allow clients to retry the deletion)

  1. getCachedResult succeeds AND
  2. Plugin fails

@coveralls
Copy link

Coverage Status

coverage: 69.963% (+0.01%) from 69.951%
when pulling 2d04079 on henry118:invalidcache
into 845a737 on containernetworking:main.

@henry118
Copy link
Member Author

@squeed @s1061123 PTAL

@squeed squeed merged commit 563cf56 into containernetworking:main Mar 12, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to destroy the network because of empty cached cni result.
3 participants