Skip to content

Commit e2b0791

Browse files
committed
libcontainer/intelrdt: support explicit assignment to root CLOS
Makes it possible e.g. to enable monitoring (linux.intelRdt.enableMonitoring) without creating a CLOS (resctrl group) for the container. Implements opencontainers/runtime-spec#1289. Signed-off-by: Markus Lehtonen <[email protected]>
1 parent 1398ba7 commit e2b0791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcontainer/configs/validate/validator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func intelrdtCheck(config *configs.Config) error {
287287
return fmt.Errorf("intelRdt is specified in config, but Intel RDT is not enabled")
288288
}
289289

290-
if config.IntelRdt.ClosID == "." || config.IntelRdt.ClosID == ".." || strings.Contains(config.IntelRdt.ClosID, "/") {
290+
if config.IntelRdt.ClosID == "." || config.IntelRdt.ClosID == ".." || (config.IntelRdt.ClosID != "/" && strings.Contains(config.IntelRdt.ClosID, "/")) {
291291
return fmt.Errorf("invalid intelRdt.ClosID %q", config.IntelRdt.ClosID)
292292
}
293293

0 commit comments

Comments
 (0)