From e939e82a0cbc5a32426ef567437265741fb56089 Mon Sep 17 00:00:00 2001 From: Bruno Costa Date: Thu, 30 Jun 2022 15:55:37 -0300 Subject: [PATCH] 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 Change-Id: I4e45698af6d175e5581a07ac7cbf90039efc7cc7 --- .../src/sysinv/manifests/init.pp | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/modules/puppet-sysinv/src/sysinv/manifests/init.pp b/modules/puppet-sysinv/src/sysinv/manifests/init.pp index 037a8c33..a953cc10 100644 --- a/modules/puppet-sysinv/src/sysinv/manifests/init.pp +++ b/modules/puppet-sysinv/src/sysinv/manifests/init.pp @@ -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; }