Skip to content

tolerate invalid cni caches for deletion#1072

Merged
squeed merged 1 commit intocontainernetworking:mainfrom
henry118:invalidcache
Mar 12, 2024
Merged

tolerate invalid cni caches for deletion#1072
squeed merged 1 commit intocontainernetworking:mainfrom
henry118:invalidcache

Conversation

@henry118
Copy link
Copy Markdown
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

Signed-off-by: Henry Wang <henwang@amazon.com>
@coveralls
Copy link
Copy Markdown

Coverage Status

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

@henry118
Copy link
Copy Markdown
Member Author

@squeed @s1061123 PTAL

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