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 podman pod create --infra-command and --infra-image #7621

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Sep 13, 2020

Currently infr-command and --infra-image commands are ignored
from the user. This PR instruments them and adds tests for
each combination.

Signed-off-by: Daniel J Walsh [email protected]

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 13, 2020
@rhatdan
Copy link
Member Author

rhatdan commented Sep 13, 2020

Fixes #7167

libpod/pod.go Outdated

// InfraImage is the image a pod infra container will use to manage
// namespaces.
InfraImage string `json:"InfraImage,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Throw these in InfraContainerConfig

@TomSweeneyRedHat
Copy link
Member

You've some lint unhappiness in here @rhatdan

@rhatdan rhatdan force-pushed the pods branch 2 times, most recently from 6119f5b to 91fd522 Compare September 14, 2020 20:39
libpod/pod.go Outdated

// InfraImage is the image a pod infra container will use to manage
// namespaces.
InfraImage string `json:"infraImage,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Can you take these out of PodConfig now that they're in InfraContainerConfig?

Copy link
Member Author

Choose a reason for hiding this comment

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

Light dawns on marble head. Fixed.

@TomSweeneyRedHat
Copy link
Member

Still fighting test issues @rhatdan

@rhatdan
Copy link
Member Author

rhatdan commented Sep 16, 2020

This is ready to go in,
@TomSweeneyRedHat @mheon @vrothberg @giuseppe @ashley-cui @QiWang19 @jwhonce @baude PTAL

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Other than the nit, LGTM

@@ -104,6 +103,18 @@ func create(cmd *cobra.Command, args []string) error {
createOptions.Share = nil
} else {
createOptions.Share = strings.Split(share, ",")
if cmd.Flag("infra-command").Changed {
createOptions.InfraCommand, err = cmd.Flags().GetString("infra-command")
Copy link
Member

Choose a reason for hiding this comment

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

Why is that necessary? It seems rather exotic. A comment would be very helpful.

Copy link
Member

Choose a reason for hiding this comment

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

Same below.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure it is exotic, since this type of code is all over the cli. Basically we want to make sure the user made a change using the CLI, rather then sending the default settings over to the server. That way the server can differentiate if the user wanted a change or just to take defaults.

Copy link
Member

Choose a reason for hiding this comment

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

So we wouldn't take the defaults from the client containers.conf but from the server?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes

Copy link
Member

Choose a reason for hiding this comment

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

What's the reasoning for that? Do we document that somewhere?

I think there's some inconsistency among the commands w.r.t. to which defaults come from the client and server.

I am not against the idea but just want to understand if we have some policy for that decision.

Copy link
Member Author

Choose a reason for hiding this comment

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

All defaults should come from the server. Any defaults that come from the client are a bug. But I agree there are some coming from the client.

Copy link
Member Author

Choose a reason for hiding this comment

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

@vrothberg I now have comments, PTAL

Currently infr-command and --infra-image commands are ignored
from the user.  This PR instruments them and adds tests for
each combination.

Signed-off-by: Daniel J Walsh <[email protected]>
Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

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

LGTM

@jwhonce
Copy link
Member

jwhonce commented Sep 16, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2020
@openshift-merge-robot openshift-merge-robot merged commit 8d7e795 into containers:master Sep 16, 2020
@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.

7 participants