Skip to content

Commit bb4286e

Browse files
authored
Merge branch 'containerd:main' into main
2 parents 63aa1c0 + ffca7ca commit bb4286e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cgroup2/manager.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -942,14 +942,16 @@ func startUnit(conn *systemdDbus.Conn, group string, properties []systemdDbus.Pr
942942
}
943943
}
944944

945+
systemdStartUnitTimeout := 30 * time.Second
945946
select {
946947
case s := <-statusChan:
947948
if s != "done" {
948949
attemptFailedUnitReset(conn, group)
949950
return fmt.Errorf("error creating systemd unit `%s`: got `%s`", group, s)
950951
}
951-
case <-time.After(30 * time.Second):
952-
log.G(ctx).Warnf("Timed out while waiting for StartTransientUnit(%s) completion signal from dbus. Continuing...", group)
952+
case <-time.After(systemdStartUnitTimeout):
953+
attemptFailedUnitReset(conn, group)
954+
return fmt.Errorf("timed out while waiting for StartTransientUnit(%s) completion signal from dbus after %v", group, systemdStartUnitTimeout)
953955
}
954956

955957
return nil

0 commit comments

Comments
 (0)