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

Allow assign-macvlan annotation to specify an interface #17334

Merged
merged 1 commit into from
Nov 18, 2017

Conversation

danwinship
Copy link
Contributor

If the assign-macvlan interface is a string other than "true", assume that it's the name of a network interface and hang the macvlan off that rather than the default interface. This lets you egress-route out a non-default interface (without forcing OpenShift itself to parse the EGRESS_SOURCE environment variable in the pod definition).

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1513764. Needs to be backported to 3.7 and 3.6 quickly for a customer, so we went with a simple solution here.

@openshift/networking PTAL

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 15, 2017
@openshift-merge-robot openshift-merge-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 15, 2017
@knobunc
Copy link
Contributor

knobunc commented Nov 16, 2017

Wow. Thanks for the rapid turn-around!

My only concern is that the interface name may not be consistent across all nodes of the cluster. Is that a safe assumption to make? Or are you expected to limit these only to the nodes with the right name (if so we just need to make that very clear in the docs).

Copy link
Contributor

@knobunc knobunc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me.

@knobunc
Copy link
Contributor

knobunc commented Nov 16, 2017

/test all

@danwinship
Copy link
Contributor Author

My only concern is that the interface name may not be consistent across all nodes of the cluster.

The customer suggested this feature themselves, so...

Yes, you'd have to make sure to only schedule the pod on nodes that have an interface with the given name. But you already have to be careful to only schedule the pod on nodes that are on the right subnet for the pod's EGRESS_SOURCE.

(We could change things so that you can specify an IP address for the macvlan as an annotation, and have OpenShift find the right interface for that IP. But that would be a much larger change.)

@danwinship
Copy link
Contributor Author

/retest

1 similar comment
@knobunc
Copy link
Contributor

knobunc commented Nov 16, 2017

/retest

@knobunc
Copy link
Contributor

knobunc commented Nov 16, 2017

LGTM. We can always use an IP address or subnet later if that proves useful.

@danwinship
Copy link
Contributor Author

/retest

1 similar comment
@knobunc
Copy link
Contributor

knobunc commented Nov 17, 2017

/retest

Copy link

@pravisankar pravisankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need docs update

@pravisankar
Copy link

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 17, 2017
@openshift-merge-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship, pravisankar

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@danwinship
Copy link
Contributor Author

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot
Copy link
Contributor

/test all [submit-queue is verifying that this PR is safe to merge]

@openshift-merge-robot
Copy link
Contributor

Automatic merge from submit-queue (batch tested with PRs 17335, 17334, 17372).

@openshift-merge-robot openshift-merge-robot merged commit 4f0920d into openshift:master Nov 18, 2017
@openshift-ci-robot
Copy link

@danwinship: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/openshift-jenkins/extended_conformance_install_update a734b61 link /test extended_conformance_install_update
ci/openshift-jenkins/cmd a734b61 link /test cmd
ci/openshift-jenkins/extended_conformance_gce a734b61 link /test extended_conformance_gce

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@danwinship danwinship deleted the egress-interface branch November 20, 2017 14:51
@danwinship
Copy link
Contributor Author

/cherrypick release-3.7

@openshift-cherrypick-robot

@danwinship: New pull request created: #17383

In response to this:

/cherrypick release-3.7

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

openshift-merge-robot added a commit that referenced this pull request Nov 21, 2017
…-17334-to-release-3.7

Automatic merge from submit-queue.

Automated cherry-pick of #17334 on release-3.7

This is an automated cherry-pick of #17334

/assign danwinship
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/networking lgtm Indicates that a PR is ready to be merged. sig/networking size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants