Skip to content

cilium: rename aws/eni/routing to pkg/datapath/linux/routing#11452

Merged
aanm merged 1 commit intocilium:masterfrom
DataDog:shared-eni-routing
May 15, 2020
Merged

cilium: rename aws/eni/routing to pkg/datapath/linux/routing#11452
aanm merged 1 commit intocilium:masterfrom
DataDog:shared-eni-routing

Conversation

@bpineau
Copy link
Copy Markdown
Contributor

@bpineau bpineau commented May 10, 2020

Per discussion in #11268 : the routing rules we use here are in
no way specific to AWS ENI; they are for also used to setup
Azure IPAM routes.

While at it, also garbage collect routes on endpoint deletion
when running Azure IPAM mode.

Signed-off-by: Benjamin Pineau benjamin.pineau@datadoghq.com

Also garbage collect Azure IPAM routes on endpoint removal

@bpineau bpineau requested review from a team May 10, 2020 21:57
@bpineau bpineau requested a review from a team as a code owner May 10, 2020 21:57
@bpineau bpineau requested a review from a team May 10, 2020 21:57
@maintainer-s-little-helper
Copy link
Copy Markdown

Please set the appropriate release note label.

@coveralls
Copy link
Copy Markdown

coveralls commented May 10, 2020

Coverage Status

Coverage increased (+0.02%) to 37.035% when pulling f8f1f0d on DataDog:shared-eni-routing into 969600f on cilium:master.

Copy link
Copy Markdown
Member

@christarazi christarazi left a comment

Choose a reason for hiding this comment

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

Thanks for following up! A few small comments to address for me. Also #11328 is pending, but should be merged soon which I'd like to get in before this one.

Comment thread daemon/cmd/daemon.go Outdated
Comment on lines 146 to 147
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should update this comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
// are setting the Src because interfacesingress rules don't have
// are setting the Src because ingress rules don't have

Nit

Comment thread pkg/endpoint/endpoint.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
}).Debug("Deleting endpoint interface rules")
}).Debug("Deleting endpoint routing rules")

I like "routing" better here as "interface rules" isn't very informative

Comment thread pkg/endpoint/endpoint.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
errs = append(errs, fmt.Errorf("unable to delete endpoint interface rules: %s", err))
errs = append(errs, fmt.Errorf("unable to delete endpoint routing rules: %s", err))

@christarazi christarazi added integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc. kind/cleanup This includes no functional changes. dont-merge/blocked Another PR must be merged before this one. conflicts-with-pr and removed dont-merge/blocked Another PR must be merged before this one. labels May 10, 2020
@christarazi
Copy link
Copy Markdown
Member

Added backport label as I'd like to backport this to 1.7 since it'll be a branch we support for a while and this PR has changed code which was recently backported, so it'll be good to keep the divergence to a minimum.

@maintainer-s-little-helper
Copy link
Copy Markdown

Please set the appropriate release note label.

@aanm aanm added the release-note/misc This PR makes changes that have no direct user impact. label May 11, 2020
@tklauser tklauser added dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. and removed conflicts-with-pr labels May 11, 2020
@tklauser
Copy link
Copy Markdown
Member

This needs a rebase now that #11328 is merged.

Copy link
Copy Markdown
Member

@christarazi christarazi left a comment

Choose a reason for hiding this comment

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

Awesome!

Copy link
Copy Markdown
Member

@joestringer joestringer left a comment

Choose a reason for hiding this comment

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

Thanks for following up on this.

Per discussion in #11268 : the routing rules we use here are in
no way specific to AWS ENI; they are for also used to setup
Azure IPAM routes.

While at it, also garbage collect routes on endpoint deletion
when running Azure IPAM mode.

I was surprised that the PR named "rename ..." made functional changes, same with the commit naming. Please consider using the biggest change as the title for the PR and commit to make it more clear for anyone searching through the PRs or commits later.

In a similar vein, in future please consider splitting functional changes into a separate commit from the refactoring changes. If we end up wanting to trace back and git-bisect the tree, it's easier to understand what changed when commits are smaller and when the changes are incremental with either functional or cosmetic changes. As is, when I glance through git log, I would have a tendency to skip over this commit because it sounds like it doesn't make any functional changes. Commits like this break this assumption which can be painful when attempting to find the cause of an issue later on via git logs.

The changes themselves look fine. Given that you'll need to do a rebase anyway, do you mind fixing up the commit title?

@bpineau bpineau force-pushed the shared-eni-routing branch from 65fb484 to 26c406a Compare May 13, 2020 06:55
@bpineau bpineau requested a review from a team as a code owner May 13, 2020 06:55
@bpineau
Copy link
Copy Markdown
Contributor Author

bpineau commented May 13, 2020

@joestringer duly noted. I rebased and updated commit title as suggested.

@christarazi
Copy link
Copy Markdown
Member

test-me-please

@christarazi christarazi removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label May 14, 2020
@gandro
Copy link
Copy Markdown
Member

gandro commented May 14, 2020

retest-runtime

@gandro
Copy link
Copy Markdown
Member

gandro commented May 14, 2020

retest-net-next

@christarazi christarazi added the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label May 14, 2020
Also garbage collect routes on endpoint deletion when running
Azure IPAM mode (the same way we do on AWS instances).

And rename aws/eni/routing to pkg/datapath/linux/routing:
per discussion in cilium#11268 : the routing rules we use here are in
no way specific to AWS ENI; they are for also used to setup
Azure IPAM routes.

Signed-off-by: Benjamin Pineau <benjamin.pineau@datadoghq.com>
@bpineau bpineau force-pushed the shared-eni-routing branch from 26c406a to f8f1f0d Compare May 14, 2020 18:25
@joestringer joestringer removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label May 14, 2020
@joestringer
Copy link
Copy Markdown
Member

test-me-please

@aanm aanm merged commit fac1802 into cilium:master May 15, 2020
christarazi added a commit that referenced this pull request May 15, 2020
Due to the refactor from #11452, the device name was renamed from
"enirouting-test" to "linuxrouting-test" which is 17 characters long,
exceeding the max device name size (`IFNAMSIZ`) of 16. [1]

This commit renames the device name to be under 16 characters.

Fixes #11547
Fixes #11452

[1]:
https://elixir.bootlin.com/linux/v5.6/source/include/uapi/linux/if.h#L33

Signed-off-by: Chris Tarazi <chris@isovalent.com>
joestringer pushed a commit that referenced this pull request May 15, 2020
Due to the refactor from #11452, the device name was renamed from
"enirouting-test" to "linuxrouting-test" which is 17 characters long,
exceeding the max device name size (`IFNAMSIZ`) of 16. [1]

This commit renames the device name to be under 16 characters.

Fixes #11547
Fixes #11452

[1]:
https://elixir.bootlin.com/linux/v5.6/source/include/uapi/linux/if.h#L33

Signed-off-by: Chris Tarazi <chris@isovalent.com>
jrajahalme pushed a commit that referenced this pull request May 20, 2020
[ upstream commit 2141eca ]

Due to the refactor from #11452, the device name was renamed from
"enirouting-test" to "linuxrouting-test" which is 17 characters long,
exceeding the max device name size (`IFNAMSIZ`) of 16. [1]

This commit renames the device name to be under 16 characters.

Fixes #11547
Fixes #11452

[1]:
https://elixir.bootlin.com/linux/v5.6/source/include/uapi/linux/if.h#L33

Signed-off-by: Chris Tarazi <chris@isovalent.com>
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
aanm pushed a commit that referenced this pull request May 25, 2020
[ upstream commit 2141eca ]

Due to the refactor from #11452, the device name was renamed from
"enirouting-test" to "linuxrouting-test" which is 17 characters long,
exceeding the max device name size (`IFNAMSIZ`) of 16. [1]

This commit renames the device name to be under 16 characters.

Fixes #11547
Fixes #11452

[1]:
https://elixir.bootlin.com/linux/v5.6/source/include/uapi/linux/if.h#L33

Signed-off-by: Chris Tarazi <chris@isovalent.com>
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
jrajahalme pushed a commit that referenced this pull request May 28, 2020
[ upstream commit 2141eca ]

Due to the refactor from #11452, the device name was renamed from
"enirouting-test" to "linuxrouting-test" which is 17 characters long,
exceeding the max device name size (`IFNAMSIZ`) of 16. [1]

This commit renames the device name to be under 16 characters.

Fixes #11547
Fixes #11452

[1]:
https://elixir.bootlin.com/linux/v5.6/source/include/uapi/linux/if.h#L33

Signed-off-by: Chris Tarazi <chris@isovalent.com>
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
christarazi added a commit that referenced this pull request May 28, 2020
[ upstream commit 2141eca ]

Due to the refactor from #11452, the device name was renamed from
"enirouting-test" to "linuxrouting-test" which is 17 characters long,
exceeding the max device name size (`IFNAMSIZ`) of 16. [1]

This commit renames the device name to be under 16 characters.

Fixes #11547
Fixes #11452

[1]:
https://elixir.bootlin.com/linux/v5.6/source/include/uapi/linux/if.h#L33

Signed-off-by: Chris Tarazi <chris@isovalent.com>
Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration/cloud Related to integration with cloud environments such as AKS, EKS, GKE, etc. kind/cleanup This includes no functional changes. release-note/misc This PR makes changes that have no direct user impact.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants