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

health: Disable routing in BPF when per-endpoint routes are enabled #14741

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

pchaigno
Copy link
Member

This commit fixes a datapath configuration discrepancy between the health endpoint and other endpoints. ENABLE_ROUTING should be undefined if per-endpoint routes are enabled; for the health endpoint, the macro is defined regardless of the settings.

Quite surprisingly, I'm not aware of any bug caused by this oversight, although it probably requires one more template and full compilation than necessary when per-endpoint routes are enabled.

This commit fixes a datapath configuration discrepancy between the
health endpoint and other endpoints. ENABLE_ROUTING should be undefined
if per-endpoint routes are enabled [1]; for the health endpoint, the
macro is defined regardless of the settings.

Quite surprisingly, I'm not aware of any bug caused by this oversight,
although it probably requires one more template and full compilation
than necessary when per-endpoint routes are enabled.

1 - https://github.com/cilium/cilium/blob/e463cfe80102486d1a3423b77f9c54afd0be94a2/daemon/cmd/endpoint.go#L309-L327
Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno added sig/loader Impacts the loading of BPF programs into the kernel. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. area/health Relates to the cilium-health component release-note/misc This PR makes changes that have no direct user impact. labels Jan 26, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.10.0 Jan 26, 2021
@pchaigno
Copy link
Member Author

test-me-please

Copy link
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 the fix!

@pchaigno pchaigno marked this pull request as ready for review January 27, 2021 07:40
@pchaigno pchaigno requested a review from a team January 27, 2021 07:40
@pchaigno
Copy link
Member Author

The cilium/health review should be covered by Joe's review, but GitHub didn't count it as such because I marked the PR as ready for reviews only after Joe reviewed. In any case, I think this is now ready to merge.

@pchaigno pchaigno added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 27, 2021
@aanm aanm merged commit dd59d1f into master Jan 28, 2021
@aanm aanm deleted the pr/pchaigno/health-endpoint-require-routing branch January 28, 2021 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/health Relates to the cilium-health component ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. sig/loader Impacts the loading of BPF programs into the kernel.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants