-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Fix creation of macvlan interfaces #11663
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[test] |
pushed another commit; we still had macvlan-related code in the shell script even though it never got used any more |
LGTM |
[test] flake seems to be the same as #11685 |
flake #10336, [test] |
LinkAttrs: netlink.LinkAttrs{ | ||
MTU: defIface.Attrs().MTU, | ||
Name: "macvlan0", | ||
ParentIndex: defIface.Attrs().Index, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can give LinkAdd() the netns like so:
Namespace: netlink.NsFd(int(ns.Fd())),
and it'll get put into the namespace after it's created. Then I'd do "ns.Do()" for the LinkByName and LinkSetUp.
The CNI plugin implements this internally, and was never passing an 8th arg to the script.
3a0bdf7
to
211f3cc
Compare
@danwinship needs a gofmt on pkg/sdn/plugin/pod_linux.go |
211f3cc
to
620dae3
Compare
Evaluated for origin test up to 620dae3 |
continuous-integration/openshift-jenkins/test Running (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/10992/) (Base Commit: 6932bcc) |
continuous-integration/openshift-jenkins/test SUCCESS |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (Image: devenv-rhel7_5305) |
Evaluated for origin merge up to 620dae3 |
We need to create the macvlan in the default namespace (so it can refer to the default interface) and then move it.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1389717 (bug 1389717)
@dcbw / @openshift/networking PTAL