Re: [systemd-devel] a way to limit restarts?
On Wed, 10.12.14 09:41, Ivan Shapovalov (intelfx...@gmail.com) wrote: > On Tuesday 09 December 2014 at 13:11:41, Nekrasov, Alexander wrote: > > Totally missed those. Thanks. Will OnFailure= be activated when the limit > > is hit? The manual only directly describes StartLimitAction= which isn’t > > exactly what’s required > > OnFailure= will be activated each time the unit enters "failed" state, i. e. > at the same time it is restarted. > > There is apparently no way to start a special unit when the start limit is > reached. > However, I may have missed it as well... Hmm, we should either change bbehaviour of OnFailure, to only trigger after the star limit is hit, or introduce some option to make this configurable I guess. Also see: https://bugs.freedesktop.org/show_bug.cgi?id=87799 Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] a way to limit restarts?
On Tuesday 09 December 2014 at 13:11:41, Nekrasov, Alexander wrote: > Totally missed those. Thanks. Will OnFailure= be activated when the limit is > hit? The manual only directly describes StartLimitAction= which isn’t exactly > what’s required OnFailure= will be activated each time the unit enters "failed" state, i. e. at the same time it is restarted. There is apparently no way to start a special unit when the start limit is reached. However, I may have missed it as well... -- Ivan Shapovalov / intelfx / signature.asc Description: This is a digitally signed message part. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] a way to limit restarts?
Totally missed those. Thanks. Will OnFailure= be activated when the limit is hit? The manual only directly describes StartLimitAction= which isn’t exactly what’s required From: Mantas Mikulėnas [mailto:graw...@gmail.com] Sent: Tuesday, December 09, 2014 1:05 PM To: Nekrasov, Alexander Cc: systemd-devel@lists.freedesktop.org Subject: Re: [systemd-devel] a way to limit restarts? On Tue, Dec 9, 2014 at 7:47 PM, Nekrasov, Alexander mailto:alexander.nekra...@emc.com>> wrote: Hi, There’s a routine need to support this scenario: a service runs that can fail and needs to be restarted. But if it just keeps failing it doesn’t make sense to keep restarting forever, it’s just overhead and the system is stuck. So in that case 1) the service needs to be left stopped in “failed” state, and 2) whatever failure action was specified – that action needs to be run. Ideally, need to be able to limit restarts to a number per period of time, such as 3 restarts in 10 minutes, etc. Sure, see StartLimit{Interval,Burst,Action}= in systemd.service(5). -- Mantas Mikulėnas mailto:graw...@gmail.com>> ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] a way to limit restarts?
On Tue, Dec 9, 2014 at 7:47 PM, Nekrasov, Alexander < alexander.nekra...@emc.com> wrote: > Hi, > > There’s a routine need to support this scenario: a service runs that can > fail and needs to be restarted. > > But if it just keeps failing it doesn’t make sense to keep restarting > forever, it’s just overhead and the system is stuck. So in that case 1) the > service needs to be left stopped in “failed” state, and 2) whatever failure > action was specified – that action needs to be run. > > Ideally, need to be able to limit restarts to a number per period of time, > such as 3 restarts in 10 minutes, etc. > Sure, see StartLimit{Interval,Burst,Action}= in systemd.service(5). -- Mantas Mikulėnas ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] a way to limit restarts?
Hi, There's a routine need to support this scenario: a service runs that can fail and needs to be restarted. But if it just keeps failing it doesn't make sense to keep restarting forever, it's just overhead and the system is stuck. So in that case 1) the service needs to be left stopped in "failed" state, and 2) whatever failure action was specified - that action needs to be run. Ideally, need to be able to limit restarts to a number per period of time, such as 3 restarts in 10 minutes, etc. Is there a way to do this? Thanks, Alex ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel