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

donotrack policy requires disabling conntrack invalid check #2609

Closed
tungdam opened this issue May 11, 2019 · 2 comments
Closed

donotrack policy requires disabling conntrack invalid check #2609

tungdam opened this issue May 11, 2019 · 2 comments

Comments

@tungdam
Copy link

tungdam commented May 11, 2019

Expected Behavior

When enable donotrack policy for an host endpoint ( with Allow-all profile + global network policy for that host endpoint ), request from another physical host to container / workload endpoints on that host will work properly

Current Behavior

Request from remote physical host to host endpoint was drop by conntrack INVALID
[7:420] -A cali-fw-cali0d15f58372a -m comment --comment "cali:W0TLQ_-e8RQ1FC18" -m conntrack --ctstate INVALID -j DROP

disable rp-filter doesn't help. Only work by setting FELIX_DISABLECONNTRACKINVALIDCHECK to true.
My DefaultEndpointToHostAction is ACCEPT.

Context

We have a redis container that receive quite high traffic from services on another physical note, thus have some weird latency outliers quite often. We suspect that may be conntrack issue and want to disable it completely, thus need to configure donotrack policy for our hostendpoint

Could you please tell me:

Thanks in advance

My Environment

  • calico-node 3.5.1
  • kubernetes 1.12
  • Etcd version 3.3.10
  • Debian 9.4
@fasaxc
Copy link
Member

fasaxc commented May 14, 2019

"doNotTrack" was designed for host protection rather than workload protection; in this case, I think the problem is that the pod policy is also being applied and pod policy is always expecting conntrack (since most k8s network usage relies on that).

Depending on your use case, it may be cleaner to run your pod host-networked so that it serves directly on the host's IP; then doNotTrack will work as expected.

Disabling the invalid check seems reasonable in your use case, it's a defensive measure.

@tungdam
Copy link
Author

tungdam commented May 15, 2019

You're right. This doNotTrack feature if applying to hostendpoint level only will break our k8s services.
I wanted to use this to get rid of conntrack at all for some of my services which are headless ( clusterIP = None ) but can't find a way to apply it for them only.

Thanks for your answer anyway.

@tungdam tungdam closed this as completed May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants