[systemd-devel] Fwd: Fwd: Excess of StartLimitBurst

2019-05-20 Thread Alexander Mykolaichyk
Thanks,
Sorry for bad English.

As you wrote
> This setting means the service is attempted to be started at most 3 times
within 5min
> Note that these settings apply to any kind of start, i.e. both "systemctl
start" and "systemctl restart".

So after my OS is booted up and my service is started - service's start
counter has value 1. So during next 5 minutes it is possible to restart my
service only 2 times, but I can do it 3 times. And question is "Why start
counter is reseted?".

> This means restart limiting is ineffective if units are not referenced
continously.

My service is referenced by multi-user.target.wants and some other unit
that executed at shutdown(referenced by Conficts and After). Maybe you
could provide link to the documentation where referencing is described? Or
describe it by yourself?

Thanks



пн, 20 мая 2019 г. в 12:34, Lennart Poettering :

> On Mo, 20.05.19 10:59, Alexander Mykolaichyk (to4...@gmail.com) wrote:
>
> > Dear all,
> >
> > Help me please with my problem.
> > For example, I have systems service config with such parameters:
> >
> > Restart=always
> > RestartSec=1
> > StartLimitInterval=300
> > StartLimitBurst=3
>
> This setting means the service is attempted to be started at most 3
> times within 5min. By default current systemd allows services to be
> started at most 5 times within 10s. The default can be controlled with
> DefaultStartLimitIntervalSec=/DefaultStartLimitBurst= in
> /etc/systemd/system.conf.
>
> Note that these settings apply to any kind of start, i.e. both
> "systemctl start" and "systemctl restart".
>
> >
> > systemd version = 215
> >
> > After the system boot up I can restart the service 4 times with systemctl
> > restart service. But all other services can be restarted 3 times.
> >
> > As I understand and after I looked to the systemd sources -
> StartLimitBurst
> > is the limit for start/restart operations and after boot up there are
> > possibility for restarting the service only 3 times during
> > StartLimitInterval. When new StartLimitInterval is started I can restart
> > the service 4 times.
>
> I cannot parse this, sorry.
>
> Note that "systemctl reset-failed" will also reset the restart counter
> of a unit these days. Also, if a unit is not pinned into memory
> because some other unit references it in some way it gets unloaded
> right-away and along with it the restart counter. This means restart
> limiting is ineffective if units are not referenced continously.
>
> Lennart
>
> --
> Lennart Poettering, Berlin
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] Fwd: Excess of StartLimitBurst

2019-05-20 Thread Alexander Mykolaichyk
Dear all,

Help me please with my problem.
For example, I have systems service config with such parameters:

Restart=always
RestartSec=1
StartLimitInterval=300
StartLimitBurst=3

systemd version = 215

After the system boot up I can restart the service 4 times with systemctl
restart service. But all other services can be restarted 3 times.

As I understand and after I looked to the systemd sources - StartLimitBurst
is the limit for start/restart operations and after boot up there are
possibility for restarting the service only 3 times during
StartLimitInterval. When new StartLimitInterval is started I can restart
the service 4 times.

So why counter for start/restart operation for my service is reseted after
the service is started and I can restart my service 4 times?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel