diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-02 22:03:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-02 22:03:19 +0100 |
commit | 7984842d7e55baa8fc9498afa23b62113850feac (patch) | |
tree | 45a9d09c0595ee11b7162c11836004b51a2c2aa4 /libpod/runtime.go | |
parent | e74072e742a427fbd8577fdc98daf1133cf13c48 (diff) | |
parent | ab886328357184cd0a8375a5dedf816ba91789f9 (diff) | |
download | podman-7984842d7e55baa8fc9498afa23b62113850feac.tar.gz podman-7984842d7e55baa8fc9498afa23b62113850feac.tar.bz2 podman-7984842d7e55baa8fc9498afa23b62113850feac.zip |
Merge pull request #8556 from mheon/fix_8539
Use Libpod tmpdir for pause path
Diffstat (limited to 'libpod/runtime.go')
-rw-r--r-- | libpod/runtime.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libpod/runtime.go b/libpod/runtime.go index df3dfae2b..cdf66a4d0 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -472,7 +472,7 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) { // we will need to access the storage. if os.Geteuid() != 0 { aliveLock.Unlock() // Unlock to avoid deadlock as BecomeRootInUserNS will reexec. - pausePid, err := util.GetRootlessPauseProcessPidPath() + pausePid, err := util.GetRootlessPauseProcessPidPathGivenDir(runtime.config.Engine.TmpDir) if err != nil { return errors.Wrapf(err, "could not get pause process pid file path") } @@ -538,6 +538,15 @@ func makeRuntime(ctx context.Context, runtime *Runtime) (retErr error) { return nil } +// TmpDir gets the current Libpod temporary files directory. +func (r *Runtime) TmpDir() (string, error) { + if !r.valid { + return "", define.ErrRuntimeStopped + } + + return r.config.Engine.TmpDir, nil +} + // GetConfig returns a copy of the configuration used by the runtime func (r *Runtime) GetConfig() (*config.Config, error) { r.lock.RLock() |