mirror of
https://github.com/containers/podman.git
synced 2025-07-18 01:57:24 +08:00

Previously, we always computed pause path from the Rootless runtime directory. Problem: this does not match the behavior of Libpod when the directory changes. Libpod will continue to use the previous directory, cached in the database; Pause pidfiles will swap to the new path. This is problematic when the directory needs to exist to write the pidfile, and Libpod is what creates the directory. There are two potential solutions - allow the pause pidfile to move and just make the directory when we want to write it, or use the cached Libpod paths for a guaranteed location. This patch does the second, because it seems safer - we will never miss a previously-existing pidfile because the location is now consistent. Fixes #8539 Signed-off-by: Matthew Heon <mheon@redhat.com>
43 lines
1.5 KiB
Go
43 lines
1.5 KiB
Go
// +build windows
|
|
|
|
package util
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
var errNotImplemented = errors.New("not yet implemented")
|
|
|
|
// IsCgroup2UnifiedMode returns whether we are running in cgroup 2 unified mode.
|
|
func IsCgroup2UnifiedMode() (bool, error) {
|
|
return false, errors.Wrap(errNotImplemented, "IsCgroup2Unified")
|
|
}
|
|
|
|
// GetContainerPidInformationDescriptors returns a string slice of all supported
|
|
// format descriptors of GetContainerPidInformation.
|
|
func GetContainerPidInformationDescriptors() ([]string, error) {
|
|
return nil, errors.Wrap(errNotImplemented, "GetContainerPidInformationDescriptors")
|
|
}
|
|
|
|
// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
|
|
// the pause process
|
|
func GetRootlessPauseProcessPidPath() (string, error) {
|
|
return "", errors.Wrap(errNotImplemented, "GetRootlessPauseProcessPidPath")
|
|
}
|
|
|
|
// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
|
|
// the pause process
|
|
func GetRootlessPauseProcessPidPathGivenDir(unused string) (string, error) {
|
|
return "", errors.Wrap(errNotImplemented, "GetRootlessPauseProcessPidPath")
|
|
}
|
|
|
|
// GetRuntimeDir returns the runtime directory
|
|
func GetRuntimeDir() (string, error) {
|
|
return "", errors.New("this function is not implemented for windows")
|
|
}
|
|
|
|
// GetRootlessConfigHomeDir returns the config home directory when running as non root
|
|
func GetRootlessConfigHomeDir() (string, error) {
|
|
return "", errors.New("this function is not implemented for windows")
|
|
}
|