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

fix pod creation with "new:" syntax followup + allow hostname #7388

Merged
merged 1 commit into from
Aug 20, 2020

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Aug 20, 2020

Fixes: 4c75fe3 ("fix pod creation with "new:" syntax")

Commit 4c75fe3 passes all net options to the pod but forgot
to unset the options for the container creation. This leads to
erros when using flags like --ip since we tried setting
the ip on the pod and container which obviously fails.

I didn't notice the bug because we don't throw an error when
specifing port bindings on a container which joins the pods
network namespace. (#7373)

Also allow the use of --hostname and pass that option to the
pod and unset it for the container. The container has to use
the pods hostname anyway. This would error otherwise.

Added tests to prevent regression.

@Luap99
Copy link
Member Author

Luap99 commented Aug 20, 2020

@mheon PTAL Commit 4c75fe3 is already in the v2 branch

@mheon
Copy link
Member

mheon commented Aug 20, 2020

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 20, 2020
Fixes: 4c75fe3 ("fix pod creation with "new:" syntax")

Commit 4c75fe3 passes all net options to the pod but forgot
to unset the options for the container creation. This leads to
erros when using flags like `--ip` since we tried setting
the ip on the pod and container which obviously fails.

I didn't notice the bug because we don't throw an error when
specifing port bindings on a container which joins the pods
network namespace. (containers#7373)

Also allow the use of `--hostname` and pass that option to the
pod and unset it for the container. The container has to use
the pods hostname anyway. This would error otherwise.

Added tests to prevent regression.

Signed-off-by: Paul Holzinger <[email protected]>
@mheon
Copy link
Member

mheon commented Aug 20, 2020

Restarted two flakes.

@baude @rhatdan @vrothberg @giuseppe PTAL, would like to get this one into 2.0.5 - it's an annoying little regression from 1.9

@rhatdan
Copy link
Member

rhatdan commented Aug 20, 2020

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 20, 2020
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, mheon, rhatdan

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

@TomSweeneyRedHat
Copy link
Member

LGTM

@openshift-merge-robot openshift-merge-robot merged commit dd18844 into containers:master Aug 20, 2020
@Luap99 Luap99 deleted the new-pod branch November 2, 2020 15:49
@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 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants