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

bpf: Fix stale map removal in agent logs #17973

Merged
merged 2 commits into from Nov 23, 2021
Merged

bpf: Fix stale map removal in agent logs #17973

merged 2 commits into from Nov 23, 2021

Conversation

borkmann
Copy link
Member

See commit msg.

Fixes: #17935

Reduces scope to where it is really used given this creates a map.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
When the agent starts up we can see the following maps being removed as
stale maps:

  [...]
  level=info msg="Restored endpoint" endpointID=3747 ipAddr="[ ]" subsys=endpoint
  level=info msg="Finished regenerating restored endpoints" regenerated=1 subsys=daemon total=1
  level=info msg="Removed stale bpf map" file-path=/sys/fs/bpf/tc/globals/cilium_capture_cache subsys=daemon
  level=info msg="Removed stale bpf map" file-path=/sys/fs/bpf/tc/globals/cilium_ktime_cache subsys=daemon
  [...]

This is due to pcap.h being included from nodeport.h where the former
defines mentioned maps unconditionally. Rework it, so that both are
only created in L4LB mode.

Fixes: #17935
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
@borkmann borkmann added sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/misc This PR makes changes that have no direct user impact. labels Nov 23, 2021
@borkmann borkmann requested review from brb, pchaigno and a team November 23, 2021 09:25
@borkmann
Copy link
Member Author

borkmann commented Nov 23, 2021

/test

Job 'Cilium-PR-K8s-1.22-kernel-4.9' failed and has not been observed before, so may be related to your PR:

Click to show.

Test Name

K8sHubbleTest Hubble Observe Test L3/L4 Flow

Failure Output

FAIL: Found 1 io.cilium/app=operator logs matching list of errors that must be investigated:

If it is a flake, comment /mlh new-flake Cilium-PR-K8s-1.22-kernel-4.9 so I can create a new GitHub issue to track it.

@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.11.0 Nov 23, 2021
@borkmann
Copy link
Member Author

borkmann commented Nov 23, 2021

/mlh new-flake Cilium-PR-K8s-1.22-kernel-4.9

👍 created #17981

@borkmann
Copy link
Member Author

test-1.22-4.9

@borkmann
Copy link
Member Author

borkmann commented Nov 23, 2021

test-1.22-4.9

Job 'Cilium-PR-K8s-1.22-kernel-4.9' failed and has not been observed before, so may be related to your PR:

Click to show.

Test Name

K8sPolicyTest Basic Test checks all kind of Kubernetes policies

Failure Output

FAIL: Found 1 io.cilium/app=operator logs matching list of errors that must be investigated:

If it is a flake, comment /mlh new-flake Cilium-PR-K8s-1.22-kernel-4.9 so I can create a new GitHub issue to track it.

@borkmann borkmann merged commit cb1bf90 into master Nov 23, 2021
@borkmann borkmann deleted the pr/fix-stale-map-rm branch November 23, 2021 20:23
@qmonnet qmonnet mentioned this pull request Nov 26, 2021
12 tasks
@joestringer joestringer added backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. and removed backport-pending/1.11 labels Dec 3, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport done to v1.11 in 1.11.0 Dec 3, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport done to v1.11 in 1.11.0 Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.11 The backport for Cilium 1.11.x for this PR is done. 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.
Projects
No open projects
1.11.0
Backport done to v1.11
Development

Successfully merging this pull request may close these issues.

cilium: Removed stale bpf map info messages on L4LB-only maps
5 participants