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

pypodman: Don't use $HOST and $USER variables for remote #1824

Merged
merged 1 commit into from
Nov 19, 2018

Conversation

afbjorklund
Copy link
Contributor

Also, don't use $PORT. These are too generic.

Make sure to read $LOGNAME after the config.


Makes it hard to configure "root" in pypodman.conf

It will always use $USER, for the ssh login name ?

@openshift-ci-robot openshift-ci-robot added size/XS needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 16, 2018
@TomSweeneyRedHat
Copy link
Member

/ok-to-test

@openshift-ci-robot openshift-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 17, 2018
@TomSweeneyRedHat
Copy link
Member

The change LGTM in what you're attempting to do. I'll let @mheon and @jwhonce weigh in to see if they've issues.

@afbjorklund
Copy link
Contributor Author

It would be OK to use something specific, like $PYPODMAN_USER and $PYPODMAN_HOST/PORT

I just hid all that complexity in the pypodman.conf file, although that could need a variable instead...

Currently you have to override $XDG_CONFIG_HOME, which also hard (a bad idea) to do globally:

        """Find and fill in any arguments not passed on command line."""
        args.xdg_runtime_dir = os.environ.get('XDG_RUNTIME_DIR', '/tmp')
        args.xdg_config_home = os.environ.get('XDG_CONFIG_HOME',
                                              os.path.expanduser('~/.config'))
        args.xdg_config_dirs = os.environ.get('XDG_CONFIG_DIRS', '/etc/xdg')

Would be better to set $PYPODMAN_CONFIG_HOME, when you want to use a temporary config ?


Anyway, this change allows me to not have to use pypodman --username=root all the time...

I will do a separate patch for the variable. Already contributed a patch for $VARLINK_BRIDGE.

@rhatdan
Copy link
Member

rhatdan commented Nov 17, 2018

I believe the variables should be prefixed with PODMAN_ not PYPODMAN. That would give us the flexibility to name the tool podman or podman_remote when installed on a non linux box.

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Nov 17, 2018

It would also give you the opportunity to use a different language :-)

Maybe the same approach should be taken for the pypodman.conf ?

Also, don't use $PORT. These are too generic.

Make sure to read $LOGNAME _after_ the config.

Prefix all the remote variables with PODMAN_

Signed-off-by: Anders F Björklund <[email protected]>
@afbjorklund
Copy link
Contributor Author

@jwhonce : added it to all environment variables, for consistency.

@rhatdan
Copy link
Member

rhatdan commented Nov 19, 2018

LGTM

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

@rhatdan
Copy link
Member

rhatdan commented Nov 19, 2018

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2018
@jwhonce
Copy link
Member

jwhonce commented Nov 19, 2018

LGTM

@rhatdan
Copy link
Member

rhatdan commented Nov 19, 2018

/approve

@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 Nov 19, 2018
@openshift-merge-robot openshift-merge-robot merged commit ea928f2 into containers:master Nov 19, 2018
@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 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 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