Skip to content

Conversation

tklauser
Copy link
Member

Manual backport of #14329 to fix port collision of the gops port with the proxy (#13400).

I manually backported the commits from #14329 as they didn't apply cleaning using cherry-picking. I also dropped the commit that updates the client-side gops binary in the runtime images - same as was done for the v1.9 backport in #14419.

See individual commits for details.

Fixes #13400

Remap gops to fixed port to avoid port collision with proxy.

@tklauser tklauser added area/proxy Impacts proxy components, including DNS, Kafka, Envoy and/or XDS servers. release-note/bug This PR fixes an issue in a previous release of Cilium. kind/backports This PR provides functionality previously merged into master. backport/1.8 labels Apr 10, 2021
@tklauser tklauser requested a review from a team as a code owner April 10, 2021 13:54
@tklauser tklauser requested a review from borkmann April 10, 2021 13:54
@tklauser
Copy link
Member Author

test-backport-1.8

@tklauser
Copy link
Member Author

tklauser commented Apr 12, 2021

@tklauser tklauser force-pushed the pr/v1.8-gops-fixed-port branch from 1d7a1a1 to 4d617c2 Compare April 12, 2021 09:52
@tklauser
Copy link
Member Author

test-backport-1.8

@tklauser
Copy link
Member Author

tklauser commented Apr 13, 2021

@tklauser tklauser force-pushed the pr/v1.8-gops-fixed-port branch from 4d617c2 to 4fc767e Compare April 14, 2021 14:34
@tklauser
Copy link
Member Author

test-backport-1.8

@tklauser
Copy link
Member Author

tklauser commented Apr 15, 2021

test-1.16-4.9

hit something that looks like #12795 https://jenkins.cilium.io/job/Cilium-PR-K8s-1.16-kernel-4.9/163/

@tklauser
Copy link
Member Author

tklauser commented Apr 15, 2021

@tklauser
Copy link
Member Author

tklauser commented Apr 15, 2021

tklauser and others added 2 commits April 17, 2021 19:00
[ upstream commit b8d65ad ]

Manually updated gops to v0.3.14 using:

  go get github.com/google/gops@v0.3.14
  go mod tidy
  go mod vendor

Signed-off-by: Tobias Klauser <tobias@cilium.io>
[ upstream commit 7757d31 ]

Manually backported from cilium#14329 to address cilium#13400 for v1.8.

Lee reported that kube-proxy log had a warning that its bind protection
couldn't bind a specific port in the nodeport range. Turns out gops was
using this particular port already through it's auto-binding (127.0.0.1:0).
Meaning that in case gops collides with a NodePort service, we might
not be able to pull gops data from that port since either kube-proxy or
kube-proxt free variant will redirect us to the actual service instead.

Given this is rather unpredictable wrt which port the agent will bind for
gops, remap it to a fixed default port and add a user configurable knob
that allows to use a different one if necessary. Given the agent, operator,
clustermesh-apiserver and hubble-relay all start the gops listener, add
the --gops-port flag to each of them. The CNI does not have gops enabled
by default but only in debug mode hence no changes there for now given
it's unlikely being used this way in production.

Fixes: cilium#14218
Reported-by: Lee Hu via Slack
Co-authored-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Tobias Klauser <tobias@cilium.io>
@aanm aanm force-pushed the pr/v1.8-gops-fixed-port branch from 4fc767e to 54adf1a Compare April 17, 2021 17:01
@aanm
Copy link
Member

aanm commented Apr 17, 2021

test-backport-1.8

@aanm
Copy link
Member

aanm commented Apr 17, 2021

test-upstream-k8s (failed to download the VM in time)

@aanm aanm merged commit d1c3cc3 into cilium:v1.8 Apr 17, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Apr 17, 2021
@tklauser tklauser deleted the pr/v1.8-gops-fixed-port branch April 18, 2021 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/proxy Impacts proxy components, including DNS, Kafka, Envoy and/or XDS servers. kind/backports This PR provides functionality previously merged into master. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants