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

fix host to self without ctlb #8189

Merged

Conversation

tomastigera
Copy link
Contributor

@tomastigera tomastigera commented Nov 7, 2023

Description

refs #4509

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

ebpf: fixed host access to self and a service that redirects to self without CTLB

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@marvin-tigera marvin-tigera added this to the Calico v3.27.0 milestone Nov 7, 2023
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Nov 7, 2023
@tomastigera tomastigera marked this pull request as ready for review November 8, 2023 23:42
@tomastigera tomastigera requested a review from a team as a code owner November 8, 2023 23:42
@tomastigera tomastigera added docs-completed Docs PR has been merged for this change docs-not-required Docs not required for this change and removed docs-pr-required Change is not yet documented docs-completed Docs PR has been merged for this change labels Nov 8, 2023
lo program is meant for intercept services if there is no CTLB, but n
this case, there is CTLB for TCP enabled. So sort-circuite that and
allow.
We policy in other places and we would hit an invalid state if we did it
here.
It makes no sense to enable ctlb and also host nat.

It may make no sense to disable both, but that would conform with the
original behaviour of BPFConnectTimeLoadBalancingEnabled=true/false. So
we just emit a warning as this may be used as a big red button.
do not override FELIX_BPFHostNetworkedNATWithoutCTLB if set explicitly.
@@ -718,8 +718,8 @@ func NewIntDataplaneDriver(config Config) *InternalDataplane {

if config.BPFConnTimeLB == string(apiv3.BPFConnectTimeLBDisabled) &&
config.BPFHostNetworkedNAT == string(apiv3.BPFHostNetworkedNATDisabled) {
log.Warn("Access to services from host networked process wont work, forcing hostnetworked NAT to Enabled")
config.BPFHostNetworkedNAT = string(apiv3.BPFHostNetworkedNATEnabled)
log.Warn("Host-networked access to services from host networked process won't properly " +
Copy link
Member

Choose a reason for hiding this comment

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

won't work properly? If both are disabled, we are going to warn and leave it as it is?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, this is a full rollback to the original behaviour and might be desired by the user if things regress

@tomastigera tomastigera merged commit d49f903 into projectcalico:master Nov 9, 2023
1 of 2 checks passed
@tomastigera tomastigera deleted the tomas-bpf-fix-host-nat branch November 9, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-not-required Docs not required for this change release-note-required Change has user-facing impact (no matter how small)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants