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

If CONTAINER_HOST env variable is set default podman --remote=true #11978

Merged
merged 1 commit into from
Oct 15, 2021

Conversation

rhatdan
Copy link
Member

@rhatdan rhatdan commented Oct 14, 2021

Users enabling CONTAINER_HOST==PATH is indicating to podman they intend
to use remote functionality.

Fixes: #11196

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

What this PR does / why we need it:

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 14, 2021

[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 openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 14, 2021
@Luap99
Copy link
Member

Luap99 commented Oct 14, 2021

Should we do the same for CONTAINER_CONNECTION?

@rhatdan
Copy link
Member Author

rhatdan commented Oct 14, 2021

Yes and that does not seem to be documented anywhere.

@@ -95,6 +95,7 @@ Path to the command binary to use for setting up a network. It is currently onl
#### **--remote**, **-r**
Access Podman service will be remote
Remote connections use local containers.conf for default.
When CONTAINER_HOST environment variable is set default to true.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not parsing much of this.

Suggested change
When CONTAINER_HOST environment variable is set default to true.
When true, access to the Podman service will be remote. When the CONTAINER_HOST environment variable is set, the remote option defaults to true. Remote connections use the local containers.conf file by default.

Is remote false by default or set from containers.conf? That should be added.

Users enabling CONTAINER_HOST==PATH is indicating to podman they intend
to use remote functionality.

Fixes: containers#11196

Update man pages to document all of the environment variables.

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

rhatdan commented Oct 15, 2021

@containers/podman-maintainers PTAL

Copy link
Member

@ashley-cui ashley-cui left a comment

Choose a reason for hiding this comment

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

LGTM

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.

LGTM but I want a final head nod from @jwhonce

@jwhonce
Copy link
Member

jwhonce commented Oct 15, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 15, 2021
@openshift-merge-robot openshift-merge-robot merged commit 3f6fd8a into containers:main Oct 15, 2021
@Luap99
Copy link
Member

Luap99 commented Oct 15, 2021

I do not think this works. Remote must be parsed before any cli commands are defined. The code handles this in a special way here:

func IsRemote() bool {

This is because the cli changes depending if we are remote or not, so when cobra parsed the --remote flag it is already to late.

rhatdan added a commit to rhatdan/podman that referenced this pull request Oct 15, 2021
Current code does not check early enough.

Follow up to containers#11978

Signed-off-by: Daniel J Walsh <[email protected]>
@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 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.

Make use of remoting support consistent between platforms (CONTAINER_HOST)
7 participants