Skip to content

Commit

Permalink
Merge pull request #3921 from jiusanzhou/1.1-bugfix/skip-update-while…
Browse files Browse the repository at this point in the history
…-frozen-faield

[1.1] libct/cg/sd/v1: do not update non-frozen cgroup after frozen failed.
  • Loading branch information
lifubang authored Jul 16, 2023
2 parents 828eb47 + 6bc3f22 commit 096277c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libcontainer/cgroups/systemd/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,15 @@ func (m *legacyManager) Set(r *configs.Resources) error {
if err := m.doFreeze(configs.Frozen); err != nil {
// If freezer cgroup isn't supported, we just warn about it.
logrus.Infof("freeze container before SetUnitProperties failed: %v", err)
// skip update the cgroup while frozen failed. #3803
if !errors.Is(err, errSubsystemDoesNotExist) {
if needsThaw {
if thawErr := m.doFreeze(configs.Thawed); thawErr != nil {
logrus.Infof("thaw container after doFreeze failed: %v", thawErr)
}
}
return err
}
}
}
setErr := setUnitProperties(m.dbus, unitName, properties...)
Expand Down

0 comments on commit 096277c

Please sign in to comment.