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

should not rely on TMPDIR env variable #11418

Closed
maxandersen opened this issue Sep 2, 2021 · 4 comments
Closed

should not rely on TMPDIR env variable #11418

maxandersen opened this issue Sep 2, 2021 · 4 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@maxandersen
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Steps to reproduce the issue:

  1. podman machine stop (or start or other commands) shows error:
    Error: unable to resolve TMPDIR

  2. re-run with TMPDIR=blah podman machine stop and it works

Describe the results you received:

unless TMPDIR is set most podman machine commands fail.

Describe the results you expected:

that podman machine will just work.

TMPDIR should be assumed set.

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

podman version
Error: failed to create sshClient: Connection to bastion host (ssh://core@localhost:61556/run/user/1000/podman/podman.sock) failed.: dial tcp [::1]:61556: connect: connection refused

but it is 3.3.0 :)

Output of podman info --debug:

same error :)

Package info (e.g. output of rpm -q podman or apt list podman):

i'm on OS X

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 2, 2021
@mheon
Copy link
Member

mheon commented Sep 2, 2021

Are you sure that it fails when TMPDIR is completely unset?

@Luap99
Copy link
Member

Luap99 commented Sep 3, 2021

@mheon Yes.

func getRuntimeDir() (string, error) {
tmpDir, ok := os.LookupEnv("TMPDIR")
if !ok {
return "", errors.New("unable to resolve TMPDIR")
}
return tmpDir, nil
}

@baude @ashley-cui PTAL Should this fall back to something like /tmp on macOS?

@mheon
Copy link
Member

mheon commented Sep 3, 2021

OK. OS X only, makes sense. Concur we need to rewrite to not depend on that.

@ashley-cui
Copy link
Member

ashley-cui commented Sep 3, 2021

Should this fall back to something like /tmp on macOS?

/tmp sgtm

openshift-merge-robot added a commit that referenced this issue Sep 7, 2021
[NO TESTS NEEDED] Fix #11418 - Default TMPDIR to /tmp on OS X
mheon pushed a commit to mheon/libpod that referenced this issue Sep 20, 2021
@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 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

4 participants