... and update to remove the now-deprecated Locker interface.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač
2022-11-21 23:24:04 +01:00
parent e7eb19c7cc
commit c83efd0f07
23 changed files with 531 additions and 210 deletions

View File

@ -35,6 +35,7 @@ import (
"github.com/containers/podman/v4/pkg/util"
"github.com/containers/podman/v4/utils"
"github.com/containers/storage"
"github.com/containers/storage/pkg/lockfile"
"github.com/containers/storage/pkg/unshare"
"github.com/docker/docker/pkg/namesgenerator"
spec "github.com/opencontainers/runtime-spec/specs-go"
@ -539,7 +540,7 @@ func makeRuntime(runtime *Runtime) (retErr error) {
// This check must be locked to prevent races
runtimeAliveLock := filepath.Join(runtime.config.Engine.TmpDir, "alive.lck")
runtimeAliveFile := filepath.Join(runtime.config.Engine.TmpDir, "alive")
aliveLock, err := storage.GetLockfile(runtimeAliveLock)
aliveLock, err := lockfile.GetLockFile(runtimeAliveLock)
if err != nil {
return fmt.Errorf("acquiring runtime init lock: %w", err)
}