Service that fails and is auto restarted still goes through failed state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

When a service fails but is auto restarted by systemd due to Restart= it still goes through “failed” state before entering “activating" state. For example this is ActiveState and SubState of a service that when running fails three times before it fails to be restarted due to StartLimitBurst=, as reported by org.freedesktop.DBus.Properties.PropertiesChanged signal.

active      running
failed      failed
activating  auto-restart
inactive    dead
active      running
failed      failed
activating  auto-restart
inactive    dead
active      running
failed      failed
activating  auto-restart
inactive    dead
failed      failed

I was reading the following documentation and I thought that service will enter “failed” state only after it can’t be restarted anymore:
https://www.freedesktop.org/software/systemd/man/systemd.service.html

“Note that service restart is subject to unit start rate limiting configured with StartLimitIntervalSec= and StartLimitBurst=, see systemd.unit(5)
for details. A restarted service enters the failed state only after the start limits are reached."

So I would assume there would be only one "failed" right at the end.

Do I understand this sentence wrong?

Przemyslaw


[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux