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

Multus should exit zero on DEL when cache file is missing and pod cannot be found. #586

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

dougbtv
Copy link
Member

@dougbtv dougbtv commented Nov 24, 2020

Otherwise, this can cause a pod to not be fully deleted, its sandbox may remain as the DEL continues to be retried due to exiting non-zero every time.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1900835

@dougbtv dougbtv added the bug label Nov 24, 2020
@dougbtv dougbtv self-assigned this Nov 24, 2020
@coveralls
Copy link

coveralls commented Nov 24, 2020

Pull Request Test Coverage Report for Build 381988023

  • 0 of 3 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.1%) to 70.812%

Changes Missing Coverage Covered Lines Changed/Added Lines %
multus/multus.go 0 3 0.0%
Files with Coverage Reduction New Missed Lines %
multus/multus.go 2 68.0%
Totals Coverage Status
Change from base Build 372597014: -0.1%
Covered Lines: 1082
Relevant Lines: 1528

💛 - Coveralls

return cmdErr(k8sArgs, "error reading the delegates: %v", err)
// The options to continue with a delete have been exhausted (cachefile + API query didn't work)
// We cannot exit with an error as this may cause a sandbox to never get deleted.
logging.Errorf("Multus: failed to get the cached delegates file: %v, cannot properly delete", err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about just return after Errorf()? otherwise return delPlugins(...) is invoked and it may also return error...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thanks for that, agreed. Have an update 👍

…not be found.

Otherwise, this can cause a pod to not be fully deleted, its sandbox may remain as the DEL continues to be retried due to exiting non-zero every time.

See: https://bugzilla.redhat.com/show_bug.cgi?id=1900835
Copy link
Member

@s1061123 s1061123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@s1061123 s1061123 merged commit cfa0d64 into k8snetworkplumbingwg:master Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants