Skip to content

Conversation

learnitall
Copy link
Contributor

Please ensure your pull request adheres to the following guidelines:

  • For first time contributors, read Submitting a pull request
  • All code is covered by unit and/or runtime tests where feasible.
  • All commits contain a well written commit description including a title,
    description and a Fixes: #XXX line if the commit addresses a particular
    GitHub issue.
  • If your commit description contains a Fixes: <commit-id> tag, then
    please add the commit author[s] as reviewer[s] to this issue.
  • All commits are signed off. See the section Developer’s Certificate of Origin
  • Provide a title or release-note blurb suitable for the release notes.
  • Are you a user of Cilium? Please add yourself to the Users doc
  • Thanks for contributing!

This PR introduces a couple of potential bug fixes for tests that consume the TunnelMap. There were a couple of potential issues that may cause flaky tests or a lack of observability into failing tests. Please see individual commits for details.

This may potentially fix #31232

Improve potential issues with tests that use the tunnel eBPF map to help prevent flakes.

@learnitall learnitall added area/CI Continuous Integration testing issue or flake release-note/ci This PR makes changes to the CI. labels Mar 7, 2024
@learnitall learnitall force-pushed the pr/learnitall/fix-tunnel-map branch from cbd8107 to 32666a2 Compare March 11, 2024 14:56
@learnitall learnitall marked this pull request as ready for review March 11, 2024 14:56
@learnitall learnitall requested a review from a team as a code owner March 11, 2024 14:56
@learnitall learnitall requested a review from aspsk March 11, 2024 14:56
@learnitall learnitall force-pushed the pr/learnitall/fix-tunnel-map branch from 32666a2 to 4cbd6e3 Compare March 11, 2024 15:29
@learnitall learnitall requested a review from aspsk March 11, 2024 15:30
@learnitall
Copy link
Contributor Author

/test

1 similar comment
@learnitall
Copy link
Contributor Author

/test

@learnitall learnitall force-pushed the pr/learnitall/fix-tunnel-map branch from 4cbd6e3 to c98dbbd Compare April 2, 2024 21:47
@learnitall
Copy link
Contributor Author

/test

@learnitall learnitall force-pushed the pr/learnitall/fix-tunnel-map branch from c98dbbd to 2e9ccd8 Compare May 2, 2024 21:35
@learnitall
Copy link
Contributor Author

/test

@julianwiedmann julianwiedmann added area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. labels May 13, 2024
@julianwiedmann
Copy link
Member

@learnitall just needs a rebase, and then we're good to go? :)

@learnitall learnitall force-pushed the pr/learnitall/fix-tunnel-map branch from 2e9ccd8 to 150f303 Compare May 22, 2024 17:17
@learnitall
Copy link
Contributor Author

Yep! This got stalled for a while because I kept running into flakes in CI. Just pushed a rebase 👍

…sing

This commit modifies the test TestClusterAwareAddressing in
pkg/maps/tunnel/tunnel_test.go to check the error returned by the tunnel
mapped when it is unpinned. Before, this error was ignored.

Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
The function tunnel.SetTunnelMap is used in go tests to manually set the
tunnel map, however this function relies on the caller to clean up the
map when it is no longer needed. This commit modifies this function to
try and unpin any existing tunnel map before setting a new one, in order
to address cases where a leftover map may still be pinned.

See https://github.com/cilium/cilium/actions/runs/8193113970/job/22406307012
for an example flake that may be related to this issue.

Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
The function tunnel.TunnelMap calls a sync.Once to set the variable
tunnel.tunnelMap before returning it. This conflicts with the behavior
of the tunnel.SetTunnelMap function however, for if tunnel.SetTunnelMap
is called to manually set the tunnel map in a test, and the test then
calls tunnel.TunnelMap to grab a reference to the map, tunnel.TunnelMap
will overwrite the map created by tunnel.SetTunnelMap.

Signed-off-by: Ryan Drew <ryan.drew@isovalent.com>
@aanm aanm force-pushed the pr/learnitall/fix-tunnel-map branch from 150f303 to 277d920 Compare June 13, 2024 11:55
@aanm
Copy link
Member

aanm commented Jun 13, 2024

/test

@aanm aanm enabled auto-merge June 13, 2024 11:56
@aanm aanm removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Jun 17, 2024
@aanm aanm added this pull request to the merge queue Jun 17, 2024
@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 Jun 17, 2024
Merged via the queue into cilium:main with commit df6609f Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake area/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: Test/TunnelMapTestSuite/TestClusterAwareAddressing
4 participants