Skip to content

Commit

Permalink
bugfix: avoid an occasional "permission denied" error while frozen fa…
Browse files Browse the repository at this point in the history
  • Loading branch information
jiusanzhou committed Apr 3, 2023
1 parent 17922e3 commit 68168b7
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 @@ -356,6 +356,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 err != errSubsystemDoesNotExist {
if needsThaw {
if thawErr := m.doFreeze(configs.Thawed); thawErr != nil {
logrus.Infof("thaw container after SetUnitProperties failed: %v", thawErr)
}
}
return err
}
}
}
setErr := setUnitProperties(m.dbus, unitName, properties...)
Expand Down

0 comments on commit 68168b7

Please sign in to comment.