Add sysinv-conductor and sysinv-agent audit intervals into sysinv.conf

Currently, the periodic interval is defined by a configuration variable
called 'audit_interval'. This integer variable is used for all periodic
tasks and its default value is set to 60 seconds.

The purpose of the whole story is to split this periodic interval into
singular intervals so that each periodic task has its own appropriate
unique time interval. Therefore, each periodic task will only be
executed at the time when it actually needs to run (further
implementation already scheduled).

This commit adds (via puppet) all the necessary periodic task interval
variables into /etc/sysinv/sysinv.conf.

Note: this change is related to the task 45616.

TEST PLAN:
PASS: AIO-SX: manually replaced these files into a Debian installation
and no crashes happened.
PASS: rebuild the whole system with the modification with no crashes.
PASS: AIO-SX: verify if the sysinv conductor and agent audits (periodic
tasks) are being called.
PASS: follow the sysinv logs seeking for errors. No error was found.
PASS: changed the periodicity of some audits (just for test purposes)
and the periodicity was followed.

Story: 2010087
Task: 45711

Signed-off-by: Bruno Costa <bruno.costa@windriver.com>
Change-Id: I4e45698af6d175e5581a07ac7cbf90039efc7cc7
This commit is contained in:
Bruno Costa 2022-06-30 15:55:37 -03:00
parent 1cdfd78286
commit e939e82a0c
1 changed files with 44 additions and 0 deletions

View File

@ -64,6 +64,19 @@ class sysinv (
$barbican_region_name = 'RegionOne',
$fm_catalog_info = undef,
$fernet_key_repository = undef,
$periodic_interval_conductor = { default => 60,
agent_update_request => 60,
kubernetes_local_secrets => 60,
deferred_runtime_config => 60,
controller_config_active_apply => 60,
upgrade_status => 60,
install_states => 60,
kubernetes_labels => 60,
image_conversion => 60,
storage_backend_failure => 60,
k8s_application => 60,
device_image_update => 60 },
$periodic_interval_agent = { default => 60 },
) {
include sysinv::params
@ -205,6 +218,37 @@ class sysinv (
'fernet_repo/key_repository': value => $fernet_key_repository;
}
sysinv_config {
'conductor_periodic_task_intervals/default':
value => $periodic_interval_conductor[default];
'conductor_periodic_task_intervals/agent_update_request':
value => $periodic_interval_conductor[agent_update_request];
'conductor_periodic_task_intervals/kubernetes_local_secrets':
value => $periodic_interval_conductor[kubernetes_local_secrets];
'conductor_periodic_task_intervals/deferred_runtime_config':
value => $periodic_interval_conductor[deferred_runtime_config];
'conductor_periodic_task_intervals/controller_config_active_apply':
value => $periodic_interval_conductor[controller_config_active_apply];
'conductor_periodic_task_intervals/upgrade_status':
value => $periodic_interval_conductor[upgrade_status];
'conductor_periodic_task_intervals/install_states':
value => $periodic_interval_conductor[install_states];
'conductor_periodic_task_intervals/kubernetes_labels':
value => $periodic_interval_conductor[kubernetes_labels];
'conductor_periodic_task_intervals/image_conversion':
value => $periodic_interval_conductor[image_conversion];
'conductor_periodic_task_intervals/storage_backend_failure':
value => $periodic_interval_conductor[storage_backend_failure];
'conductor_periodic_task_intervals/k8s_application':
value => $periodic_interval_conductor[k8s_application];
'conductor_periodic_task_intervals/device_image_update':
value => $periodic_interval_conductor[device_image_update];
}
sysinv_config {
'agent_periodic_task_intervals/default': value => $periodic_interval_agent[default];
}
sysinv_api_paste_ini {
'filter:authtoken/region_name': value => $region_name;
}