Config-Model-Systemd
view release on metacpan or search on metacpan
lib/Config/Model/models/Systemd/Section/ServiceUnit.pl view on Meta::CPAN
burst times within an interval time span are
not permitted to start any more. Use C<StartLimitIntervalSec> to configure the
checking interval and C<StartLimitBurst> to configure how many starts per interval
are allowed.
interval is a time span with the default unit of seconds, but other
units may be specified, see
L<systemd.time(7)>.
The special value C<infinity> can be used to limit the total number of start
attempts, even if they happen at large time intervals.
Defaults to C<DefaultStartLimitIntervalSec> in manager configuration file, and may
be set to 0 to disable any kind of rate limiting. burst is a number and
defaults to C<DefaultStartLimitBurst> in manager configuration file.
These configuration options are particularly useful in conjunction with the service setting
C<Restart> (see
L<systemd.service(5)>);
however, they apply to all kinds of starts (including manual), not just those triggered by the
C<Restart> logic.
Note that units which are configured for C<Restart>, and which reach the start
limit are not attempted to be restarted anymore; however, they may still be restarted manually or
from a timer or socket at a later point, after the interval has passed.
From that point on, the restart logic is activated again. systemctl reset-failed
will cause the restart rate counter for a service to be flushed, which is useful if the administrator
wants to manually start a unit and the start limit interferes with that. Rate-limiting is enforced
after any unit condition checks are executed, and hence unit activations with failing conditions do
not count towards the rate limit.
When a unit is unloaded due to the garbage collection logic (see above) its rate limit counters
are flushed out too. This means that configuring start rate limiting for a unit that is not
referenced continuously has no effect.
This setting does not apply to slice, target, device, and scope units, since they are unit
types whose activation may either never fail, or may succeed only a single time.',
'StartLimitIntervalSec' => '*StartLimitBurst',
'SuccessAction' => '*FailureAction'
},
'element' => [
'FailureAction',
{
'choice' => [
'exit',
'exit-force',
'halt',
'halt-force',
'halt-immediate',
'kexec',
'kexec-force',
'none',
'poweroff',
'poweroff-force',
'poweroff-immediate',
'reboot',
'reboot-force',
'reboot-immediate',
'soft-reboot',
'soft-reboot-force'
],
'migrate_from' => {
'formula' => '$service',
'variables' => {
'service' => '- - Service FailureAction'
}
},
'type' => 'leaf',
'value_type' => 'enum'
},
'SuccessAction',
{
'choice' => [
'exit',
'exit-force',
'halt',
'halt-force',
'halt-immediate',
'kexec',
'kexec-force',
'none',
'poweroff',
'poweroff-force',
'poweroff-immediate',
'reboot',
'reboot-force',
'reboot-immediate',
'soft-reboot',
'soft-reboot-force'
],
'migrate_from' => {
'formula' => '$service',
'variables' => {
'service' => '- - Service SuccessAction'
}
},
'type' => 'leaf',
'value_type' => 'enum'
},
'StartLimitBurst',
{
'migrate_from' => {
'formula' => '$service',
'variables' => {
'service' => '- - Service StartLimitBurst'
}
},
'type' => 'leaf',
'value_type' => 'uniline'
},
'StartLimitIntervalSec',
{
'migrate_from' => {
'formula' => '$unit || $service',
'use_eval' => '1',
'variables' => {
'service' => '- - Service StartLimitInterval',
'unit' => '- StartLimitInterval'
}
},
'type' => 'leaf',
'value_type' => 'uniline'
},
'RebootArgument',
{
'migrate_from' => {
'formula' => '$service',
'variables' => {
'service' => '- - Service RebootArgument'
}
},
'type' => 'leaf',
'value_type' => 'uniline'
}
],
'include' => [
'Systemd::Section::Unit'
],
'name' => 'Systemd::Section::ServiceUnit'
}
]
;
( run in 0.348 second using v1.01-cache-2.11-cpan-85f18b9d64f )