mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-24 14:32:33 +00:00
runtime: fix empty cgroup path validation error
An empty cgroup path shouldn't fail cgroup creation Fixes #2674 Signed-off-by: Feng Wang <feng.wang@databricks.com>
This commit is contained in:
parent
c4bafc4e68
commit
9a6d56f1ab
@ -26,7 +26,7 @@ const DefaultCgroupPath = "/vc"
|
|||||||
|
|
||||||
func RenameCgroupPath(path string) (string, error) {
|
func RenameCgroupPath(path string) (string, error) {
|
||||||
if path == "" {
|
if path == "" {
|
||||||
return "", fmt.Errorf("Cgroup path is empty")
|
path = DefaultCgroupPath
|
||||||
}
|
}
|
||||||
|
|
||||||
cgroupPathDir := filepath.Dir(path)
|
cgroupPathDir := filepath.Dir(path)
|
||||||
|
Loading…
Reference in New Issue
Block a user