diff options
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 06737776b..7c37fd65b 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -394,6 +394,22 @@ func WithDefaultInfraCommand(cmd string) RuntimeOption { } } +// WithRenumber instructs libpod to perform a lock renumbering while +// initializing. This will handle migrations from early versions of libpod with +// file locks to newer versions with SHM locking, as well as changes in the +// number of configured locks. +func WithRenumber() RuntimeOption { + return func(rt *Runtime) error { + if rt.valid { + return ErrRuntimeFinalized + } + + rt.doRenumber = true + + return nil + } +} + // Container Creation Options // WithShmDir sets the directory that should be mounted on /dev/shm. |