-
Notifications
You must be signed in to change notification settings - Fork 784
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
firewall: don't return error in DEL if prevResult is not found. #390
Conversation
The CNI spec states that for DEL implementations, "when CNI_NETNS and/or prevResult are not provided, the plugin should clean up as many resources as possible (e.g. releasing IPAM allocations) and return a successful response". This change results in the firewall plugin conforming to the spec by not returning an error whenever the del method is not provided a prevResult. Signed-off-by: Erik Sipsma <[email protected]>
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.
LGTM
Since plugins/plugins/meta/firewall/firewall.go Line 146 in 291ab6c
|
@mars1024 you're suggesting to delete those five lines? sgtm. |
yeah, I think those lines look useless. |
Signed-off-by: Erik Sipsma <[email protected]>
Yeah for sure, done! |
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.
/lgtm thanks!
lgtm! |
The CNI spec states that for DEL implementations, "when CNI_NETNS and/or
prevResult are not provided, the plugin should clean up as many resources as
possible (e.g. releasing IPAM allocations) and return a successful response".
This change results in the firewall plugin conforming to the spec by not
returning an error whenever the del method is not provided a prevResult.
Signed-off-by: Erik Sipsma [email protected]