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:
Feng Wang 2021-09-20 13:27:54 -07:00
parent c4bafc4e68
commit 9a6d56f1ab

View File

@ -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)