From f3877ffa5c5e20d446bdf4811eb0b90636cdd491 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 8 Apr 2024 16:41:31 +0900 Subject: [PATCH] validate maxdelay for cron job The parameter descriptions says the value should be a positive integer (or 0). Validate the given value to reject invalid values such as strings or even negative values. Change-Id: I91d029250da223f999381d594a3c7b953ec19898 --- manifests/cron/db_purge.pp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/manifests/cron/db_purge.pp b/manifests/cron/db_purge.pp index 861b227a..497ccea4 100644 --- a/manifests/cron/db_purge.pp +++ b/manifests/cron/db_purge.pp @@ -61,15 +61,15 @@ # Defaults to present. # class cinder::cron::db_purge ( - $minute = 1, - $hour = 0, - $monthday = '*', - $month = '*', - $weekday = '*', - $user = $::cinder::params::user, - $age = 30, - $destination = '/var/log/cinder/cinder-rowsflush.log', - $maxdelay = 0, + $minute = 1, + $hour = 0, + $monthday = '*', + $month = '*', + $weekday = '*', + $user = $::cinder::params::user, + $age = 30, + $destination = '/var/log/cinder/cinder-rowsflush.log', + Integer[0] $maxdelay = 0, Enum['present', 'absent'] $ensure = 'present', ) inherits cinder::params {