Skip to content

Commit ffca7ca

Browse files
authored
Merge pull request #349 from jchorl/jchorl/ignoretimeout
2 parents 190de3b + 2e25118 commit ffca7ca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cgroup2/manager.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -952,14 +952,16 @@ func startUnit(conn *systemdDbus.Conn, group string, properties []systemdDbus.Pr
952952
}
953953
}
954954

955+
systemdStartUnitTimeout := 30 * time.Second
955956
select {
956957
case s := <-statusChan:
957958
if s != "done" {
958959
attemptFailedUnitReset(conn, group)
959960
return fmt.Errorf("error creating systemd unit `%s`: got `%s`", group, s)
960961
}
961-
case <-time.After(30 * time.Second):
962-
log.G(ctx).Warnf("Timed out while waiting for StartTransientUnit(%s) completion signal from dbus. Continuing...", group)
962+
case <-time.After(systemdStartUnitTimeout):
963+
attemptFailedUnitReset(conn, group)
964+
return fmt.Errorf("timed out while waiting for StartTransientUnit(%s) completion signal from dbus after %v", group, systemdStartUnitTimeout)
963965
}
964966

965967
return nil

0 commit comments

Comments
 (0)