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

Support for com.docker.network.container_interface_prefix driver label #1667

Merged
merged 1 commit into from Mar 13, 2017

Conversation

Projects
None yet
4 participants
@wnagele
Contributor

wnagele commented Feb 27, 2017

This adds support for a custom interface prefix. Can be used to address issues such as moby/moby#20067. If the label is not used the default behaviour prevails.

Show outdated Hide outdated osl/interface_linux.go Outdated
Show outdated Hide outdated drivers/bridge/bridge.go Outdated
Show outdated Hide outdated drivers/bridge/bridge.go Outdated
Show outdated Hide outdated osl/namespace_linux.go Outdated
@wnagele

This comment has been minimized.

Show comment
Hide comment
@wnagele

wnagele Feb 28, 2017

Contributor

All comments addressed now.

Contributor

wnagele commented Feb 28, 2017

All comments addressed now.

Show outdated Hide outdated osl/interface_linux.go Outdated
Show outdated Hide outdated drivers/bridge/labels.go Outdated
@aboch

This comment has been minimized.

Show comment
Hide comment
@aboch

aboch Feb 28, 2017

Contributor

Thanks @wnagele , I only have one last comment about making the new option driver agnostic.

Contributor

aboch commented Feb 28, 2017

Thanks @wnagele , I only have one last comment about making the new option driver agnostic.

Support for com.docker.network.bridge.container_interface_prefix label
Signed-off-by: Wolfgang Nagele <mail@wnagele.com>
@aboch

This comment has been minimized.

Show comment
Hide comment
@aboch

aboch Mar 1, 2017

Contributor

Thanks @wnagele

LGTM

Contributor

aboch commented Mar 1, 2017

Thanks @wnagele

LGTM

@wnagele

This comment has been minimized.

Show comment
Hide comment
@wnagele

wnagele Mar 1, 2017

Contributor

Merge? :)

Contributor

wnagele commented Mar 1, 2017

Merge? :)

@aboch

This comment has been minimized.

Show comment
Hide comment
@aboch

aboch Mar 1, 2017

Contributor

@wnagele
For most of the PRs we usually require two mantainers' LGTMs before merging.

Contributor

aboch commented Mar 1, 2017

@wnagele
For most of the PRs we usually require two mantainers' LGTMs before merging.

@wnagele

This comment has been minimized.

Show comment
Hide comment
@wnagele

wnagele Mar 12, 2017

Contributor

Anybody else able to review this for a merge? @sanimej @mavenugo

Contributor

wnagele commented Mar 12, 2017

Anybody else able to review this for a merge? @sanimej @mavenugo

@@ -241,8 +241,8 @@ func (n *networkNamespace) AddInterface(srcName, dstPrefix string, options ...If
if n.isDefault {
i.dstName = i.srcName
} else {
i.dstName = fmt.Sprintf("%s%d", i.dstName, n.nextIfIndex)
n.nextIfIndex++
i.dstName = fmt.Sprintf("%s%d", dstPrefix, n.nextIfIndex[dstPrefix])

This comment has been minimized.

@mavenugo

mavenugo Mar 12, 2017

Contributor

j/c. are you relying on the fact that the map access on new prefix will return 0 ?

@mavenugo

mavenugo Mar 12, 2017

Contributor

j/c. are you relying on the fact that the map access on new prefix will return 0 ?

This comment has been minimized.

@wnagele

wnagele Mar 12, 2017

Contributor

Correct - basically just moved the original method towards using a map to track all prefixes independently.

@wnagele

wnagele Mar 12, 2017

Contributor

Correct - basically just moved the original method towards using a map to track all prefixes independently.

@mavenugo

LGTM

It would have been better to have changed other drivers as well. But we can deal with it in individual PRs.

@mavenugo mavenugo merged commit af59385 into docker:master Mar 13, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
dco-signed All commits are signed

@aboch aboch changed the title from Support for com.docker.network.bridge.container_interface_prefix label to Support for com.docker.network.container_interface_prefix driver label Mar 14, 2017

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