Skip to content

Commit 9902a3d

Browse files
authored
Merge pull request #4827 from marquiz/devel/runc-update-rdt-empty-conf
runc update: refuse to create new rdt group
2 parents e20b2c7 + 85801e8 commit 9902a3d

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

update.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"github.com/sirupsen/logrus"
1313

1414
"github.com/docker/go-units"
15-
"github.com/opencontainers/runc/libcontainer/configs"
1615
"github.com/opencontainers/runc/libcontainer/intelrdt"
1716
"github.com/opencontainers/runtime-spec/specs-go"
1817
"github.com/urfave/cli"
@@ -377,15 +376,7 @@ other options are ignored.
377376
// In update command, we could re-enable through IntelRdtManager.Apply()
378377
// and then update intelrdt constraint.
379378
if config.IntelRdt == nil {
380-
state, err := container.State()
381-
if err != nil {
382-
return err
383-
}
384-
config.IntelRdt = &configs.IntelRdt{}
385-
intelRdtManager := intelrdt.NewManager(&config, container.ID(), state.IntelRdtPath)
386-
if err := intelRdtManager.Apply(state.InitProcessPid); err != nil {
387-
return err
388-
}
379+
return errors.New("updating a non-existent Intel RDT configuration is not supported")
389380
}
390381
if l3CacheSchema != "" {
391382
config.IntelRdt.L3CacheSchema = l3CacheSchema

0 commit comments

Comments
 (0)