Merge pull request #2675 from fengwang666/cgroup-bug-fix

runtime: fix empty cgroup path validation error
This commit is contained in:
Fabiano Fidêncio 2021-09-21 08:48:22 +02:00 committed by GitHub
commit 9ea78ac386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ const DefaultCgroupPath = "/vc"
func RenameCgroupPath(path string) (string, error) {
if path == "" {
return "", fmt.Errorf("Cgroup path is empty")
path = DefaultCgroupPath
}
cgroupPathDir := filepath.Dir(path)