mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-23 13:45:04 +02:00
Merge pull request #6916 from Icinga/bugfix/retry-interval-zero
Don't allow retry_interval <= 0
This commit is contained in:
commit
eb155495f7
@ -198,6 +198,14 @@ void Checkable::ValidateCheckInterval(const Lazy<double>& lvalue, const Validati
|
|||||||
BOOST_THROW_EXCEPTION(ValidationError(this, { "check_interval" }, "Interval must be greater than 0."));
|
BOOST_THROW_EXCEPTION(ValidationError(this, { "check_interval" }, "Interval must be greater than 0."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Checkable::ValidateRetryInterval(const Lazy<double>& lvalue, const ValidationUtils& utils)
|
||||||
|
{
|
||||||
|
ObjectImpl<Checkable>::ValidateRetryInterval(lvalue, utils);
|
||||||
|
|
||||||
|
if (lvalue() <= 0)
|
||||||
|
BOOST_THROW_EXCEPTION(ValidationError(this, { "retry_interval" }, "Interval must be greater than 0."));
|
||||||
|
}
|
||||||
|
|
||||||
void Checkable::ValidateMaxCheckAttempts(const Lazy<int>& lvalue, const ValidationUtils& utils)
|
void Checkable::ValidateMaxCheckAttempts(const Lazy<int>& lvalue, const ValidationUtils& utils)
|
||||||
{
|
{
|
||||||
ObjectImpl<Checkable>::ValidateMaxCheckAttempts(lvalue, utils);
|
ObjectImpl<Checkable>::ValidateMaxCheckAttempts(lvalue, utils);
|
||||||
|
@ -192,6 +192,7 @@ public:
|
|||||||
std::vector<intrusive_ptr<Dependency> > GetReverseDependencies() const;
|
std::vector<intrusive_ptr<Dependency> > GetReverseDependencies() const;
|
||||||
|
|
||||||
void ValidateCheckInterval(const Lazy<double>& lvalue, const ValidationUtils& value) final;
|
void ValidateCheckInterval(const Lazy<double>& lvalue, const ValidationUtils& value) final;
|
||||||
|
void ValidateRetryInterval(const Lazy<double>& lvalue, const ValidationUtils& value) final;
|
||||||
void ValidateMaxCheckAttempts(const Lazy<int>& lvalue, const ValidationUtils& value) final;
|
void ValidateMaxCheckAttempts(const Lazy<int>& lvalue, const ValidationUtils& value) final;
|
||||||
|
|
||||||
static void IncreasePendingChecks();
|
static void IncreasePendingChecks();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user