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

Add mac_address to connect_container_to_network #1756

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hongbin
Copy link

@hongbin hongbin commented Sep 24, 2017

No description provided.

@shin-
Copy link
Contributor

shin- commented Sep 26, 2017

Thanks! Do you mind adding the appropriate version check?

@hongbin
Copy link
Author

hongbin commented Sep 28, 2017

@shin- Done

@shin-
Copy link
Contributor

shin- commented Nov 7, 2017

I tried adding a test for this, but I don't think this is supported by the engine yet as no matter what I do, I'm not able to set a different MAC address for the network. This is reinforced by the fact that there is currently no CLI option to achieve this: moby/moby#33715

Until this actually works with the Docker Engine, I think we probably shouldn't merge this PR.

openstack-gerrit pushed a commit to openstack/zun that referenced this pull request Nov 28, 2017
This patch changed the workflow to configure the network in
docker. The old workflow is as following:
* Create container with default network_mode (which connected
  to 'bridge' network by default)
* Disconnect from 'bridge' network
* Connect to each requested neutron network

The problem is that docker-py doesn't support connect with
specified MAC address [1]. This caused problems on SR-IOV support,
which required to set the MAC address. Therefore, we need to change
to a new workflow:
* Create container with the first requested neutron network
* Connect to the rest of the neutron networks

[1] docker/docker-py#1756

Change-Id: Ib26fc3458c95c3b3d5df9566acdb0a2d28d1eb30
@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "connect-with-mac" [email protected]:hongbin/docker-py.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354570992
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@hongbin
Copy link
Author

hongbin commented Jan 20, 2019

@shin- when you said "I'm not able to set a different MAC address for the network", could you provide the exact reproducing steps? I will follow up with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants