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

[docker compat] Don't overwrite the NetworkMode from "default" to "bridge" if containers.conf specifies a non-default configuration. #17064

Conversation

Romain-Geissler-1A
Copy link
Contributor

Fixes #16915 (only the part about docker client).

Does this PR introduce a user-facing change?

When creating a container with the Docker API, the `NetworkMode=default` is no longer rewritten to `NetworkMode=bridge` if the `containers.conf` configuration file overwrites `netns`.

@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Jan 10, 2023
@Romain-Geissler-1A Romain-Geissler-1A changed the title [docker compat] Don't overwrite the NetworkMode from "default" to "bridge" if containers.conf specifies a non-default configuration. [WIP][docker compat] Don't overwrite the NetworkMode from "default" to "bridge" if containers.conf specifies a non-default configuration. Jan 10, 2023
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 10, 2023
@Romain-Geissler-1A Romain-Geissler-1A force-pushed the docker-compat-networkmode branch 4 times, most recently from 7dbc692 to 0f786ad Compare January 11, 2023 00:42
@Romain-Geissler-1A Romain-Geissler-1A changed the title [WIP][docker compat] Don't overwrite the NetworkMode from "default" to "bridge" if containers.conf specifies a non-default configuration. [docker compat] Don't overwrite the NetworkMode from "default" to "bridge" if containers.conf specifies a non-default configuration. Jan 11, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jan 11, 2023
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Thanks for the patch. This is the right approach to keep the compat as close as possible.

just one smal nit

pkg/api/handlers/compat/containers_create.go Outdated Show resolved Hide resolved
…errides netns.

Fixes containers#16915 (only the part about docker client).

Signed-off-by: Romain Geissler <[email protected]>
@Romain-Geissler-1A Romain-Geissler-1A force-pushed the docker-compat-networkmode branch from 0f786ad to 3e2b9a2 Compare January 11, 2023 17:45
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, Romain-Geissler-1A

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 11, 2023
@mheon
Copy link
Member

mheon commented Jan 11, 2023

/lgtm
/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 11, 2023
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 11, 2023
@TomSweeneyRedHat
Copy link
Member

LGTM
and happy green test buttons @mheon

@mheon
Copy link
Member

mheon commented Jan 11, 2023

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 11, 2023
@openshift-merge-robot openshift-merge-robot merged commit 39ffcb8 into containers:main Jan 11, 2023
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 15, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Change to remote API; merits scrutiny lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

--network=default doesn't mean the same thing as --network=
5 participants