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

Some cleanups related to #234 #244

Merged
merged 1 commit into from
Mar 12, 2019
Merged

Some cleanups related to #234 #244

merged 1 commit into from
Mar 12, 2019

Conversation

mogren
Copy link
Contributor

@mogren mogren commented Nov 27, 2018

Two small bug fixes in the error handling when deleting rules, otherwise no functional changes.

Follow up to #234

Description of changes:

  • The biggest change is in network.go where I extended the link creation loop to add the last chain link instead of creating it explicitly. I also save the names of the chains instead of rebuilding them.
  • Two if-statments checked the wrong err to verify the result of netLink.RuleDel.
  • Removed unused methods ipamdActionsInprogressSet and isDuplicateRuleAdd .

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@liwenwu-amazon
Copy link
Contributor

LGTM. Can you add some unit-tests for the multiple CIDRs changes? Or add a issue (technical debts) for it?

@mogren
Copy link
Contributor Author

mogren commented Dec 16, 2018

I'll add some tests, thanks for taking a look!

@mogren
Copy link
Contributor Author

mogren commented Jan 30, 2019

@nak3 Anything obvious I've missed? 🙂

@nak3
Copy link
Contributor

nak3 commented Jan 31, 2019

LGTM. Great 👍

for _, rule := range srcRuleList {
if n.netLink.RuleDel(&rule); err != nil && !containsNoSuchRule(err) {
if err := n.netLink.RuleDel(&rule); err != nil && !containsNoSuchRule(err) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is really nice catch 👍

Two small bugfixes in the error handling when deleting rules,
otherwise no functional changes.
@mogren mogren self-assigned this Mar 8, 2019
@mogren mogren added this to the v1.4 milestone Mar 8, 2019
@mogren mogren removed the request for review from mattlandis March 8, 2019 20:59
@mogren mogren merged commit 1213619 into aws:master Mar 12, 2019
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.

4 participants