vendor: bump runc to 1.0.2
For the complete release notes, see - https://github.com/opencontainers/runc/releases/tag/v1.0.2 In particular, this fixes the check cgroup v1 systemd manager check if a container needs to be frozen before Set(), and adds a knob to skip the check/freeze entirely (to be used by the next commit). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
12
vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go
generated
vendored
12
vendor/github.com/opencontainers/runc/libcontainer/cgroups/systemd/common.go
generated
vendored
@@ -310,6 +310,14 @@ func getUnitName(c *configs.Cgroup) string {
|
||||
return c.Name
|
||||
}
|
||||
|
||||
// This code should be in sync with getUnitName.
|
||||
func getUnitType(unitName string) string {
|
||||
if strings.HasSuffix(unitName, ".slice") {
|
||||
return "Slice"
|
||||
}
|
||||
return "Scope"
|
||||
}
|
||||
|
||||
// isDbusError returns true if the error is a specific dbus error.
|
||||
func isDbusError(err error, name string) bool {
|
||||
if err != nil {
|
||||
@@ -388,10 +396,10 @@ func resetFailedUnit(cm *dbusConnManager, name string) {
|
||||
}
|
||||
}
|
||||
|
||||
func getUnitProperty(cm *dbusConnManager, unitName string, propertyName string) (*systemdDbus.Property, error) {
|
||||
func getUnitTypeProperty(cm *dbusConnManager, unitName string, unitType string, propertyName string) (*systemdDbus.Property, error) {
|
||||
var prop *systemdDbus.Property
|
||||
err := cm.retryOnDisconnect(func(c *systemdDbus.Conn) (Err error) {
|
||||
prop, Err = c.GetUnitPropertyContext(context.TODO(), unitName, propertyName)
|
||||
prop, Err = c.GetUnitTypePropertyContext(context.TODO(), unitName, unitType, propertyName)
|
||||
return Err
|
||||
})
|
||||
return prop, err
|
||||
|
||||
Reference in New Issue
Block a user