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

test,daemon: Fix repeated devices #12176

Merged
merged 2 commits into from Jun 19, 2020
Merged

Conversation

brb
Copy link
Member

@brb brb commented Jun 18, 2020

This PR:

  • Ensures that the GetDefaultIface() test helper will return a single device.
  • Omits repeated devices passed via --devices by a user.

/cc @pchaigno @jrajahalme

Reviewable per commit.

@brb brb added pending-review area/CI Continuous Integration testing issue or flake area/daemon Impacts operation of the Cilium daemon. release-note/minor This PR changes functionality that users may find relevant to operating Cilium. release-note/ci This PR makes changes to the CI. labels Jun 18, 2020
@brb brb requested a review from a team June 18, 2020 10:39
@brb brb requested review from a team as code owners June 18, 2020 10:39
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.8.0 Jun 18, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.8.0 Jun 18, 2020
@brb
Copy link
Member Author

brb commented Jun 18, 2020

test-me-please

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 37.113% when pulling 19931f0ce9343207ede76e7149f0ff0cb10d21b9 on pr/brb/ci-fix-default-devices into d28767b on master.

@brb
Copy link
Member Author

brb commented Jun 18, 2020

retest-net-next

@brb brb force-pushed the pr/brb/ci-fix-default-devices branch from 19931f0 to 7b3d3fe Compare June 18, 2020 13:25
brb added 2 commits June 18, 2020 15:26
It was reported that GetDefaultIface() can return multiple ifaces with a
default route. E.g.:

    time="2020-06-17T12:54:34-07:00" level=debug msg="running command:
    kubectl exec -n cilium log-gatherer-gg44r -- ip -o r | grep default |
    grep -o 'dev [a-zA-Z0-9]*' | cut -d' ' -f2"
    cmd: "kubectl exec -n cilium log-gatherer-gg44r -- ip -o r | grep
    default | grep -o 'dev [a-zA-Z0-9]*' | cut -d' ' -f2" exitCode: 0
    duration: 511.169541ms stdout:
    eth0
    eth0

Improve the helper by returning only a single value.

Debugged-by: Paul Chaignon <paul@cilium.io>
Signed-off-by: Martynas Pumputis <m@lambda.lt>
This commit removes repeated devices passed via --devices to prevent
from attaching the same bpf_host program multiple times to it.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
@brb
Copy link
Member Author

brb commented Jun 18, 2020

test-me-please

@borkmann borkmann merged commit 9d78e1a into master Jun 19, 2020
1.8.0 automation moved this from In progress to Merged Jun 19, 2020
@borkmann borkmann deleted the pr/brb/ci-fix-default-devices branch June 19, 2020 06:21
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.8 in 1.8.0 Jun 19, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.8 in 1.8.0 Jun 19, 2020
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.8 to Backport done to v1.8 in 1.8.0 Jun 19, 2020
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/daemon Impacts operation of the Cilium daemon. release-note/ci This PR makes changes to the CI. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
No open projects
1.8.0
  
Merged
1.8.0
Backport done to v1.8
Development

Successfully merging this pull request may close these issues.

None yet

7 participants