Skip to content

Commit dff7685

Browse files
authored
Merge pull request #2459 from tedyu/linux-cont-set-cfg
Set configs back when intelrdt configs cannot be set LGTMS: @AkihiroSuda @kolyshkin
2 parents e643db6 + 9d275d3 commit dff7685

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libcontainer/container_linux.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ func (c *linuxContainer) Set(config configs.Config) error {
233233
if c.intelRdtManager != nil {
234234
if err := c.intelRdtManager.Set(&config); err != nil {
235235
// Set configs back
236+
if err2 := c.cgroupManager.Set(c.config); err2 != nil {
237+
logrus.Warnf("Setting back cgroup configs failed due to error: %v, your state.json and actual configs might be inconsistent.", err2)
238+
}
236239
if err2 := c.intelRdtManager.Set(c.config); err2 != nil {
237240
logrus.Warnf("Setting back intelrdt configs failed due to error: %v, your state.json and actual configs might be inconsistent.", err2)
238241
}

0 commit comments

Comments
 (0)