From bb923a3a44b9b0f361e8864bc9fafa0b72704089 Mon Sep 17 00:00:00 2001 From: dbiletskiy Date: Fri, 3 Jan 2025 20:25:19 +0100 Subject: [PATCH] Add to osdpl introspective instance timeout options Related-Prod: PRODX-48222 Change-Id: I84115bcee26ceaea4625a78de97736f920a700ca --- rockoon/admission/validators/schemas/osdpl.yaml | 15 +++++++++++++++ rockoon/templates/services/instance-ha.yaml | 9 +++++++-- .../instance-ha/ussuri_ceph_local_non_dvr.yaml | 5 +++++ .../ussuri_ceph_local_non_dvr_db_cleanup.yaml | 5 +++++ .../ussuri_ceph_local_non_dvr_policies.yaml | 5 +++++ .../ussuri_ceph_local_non_dvr_telemetry.yaml | 5 +++++ 6 files changed, 42 insertions(+), 2 deletions(-) diff --git a/rockoon/admission/validators/schemas/osdpl.yaml b/rockoon/admission/validators/schemas/osdpl.yaml index 33ae6f5..90564e1 100644 --- a/rockoon/admission/validators/schemas/osdpl.yaml +++ b/rockoon/admission/validators/schemas/osdpl.yaml @@ -1821,6 +1821,21 @@ properties: description: | Enable instance introspection monitor default: false + guest_monitoring_interval: + type: integer + description: | + Guest monitoring interval of VM status (in seconds) + default: 10 + guest_monitoring_timeout: + type: integer + description: | + Guest monitoring timeout (in seconds) + default: 2 + guest_monitoring_failure_threshold: + type: integer + description: | + Failure threshold before sending notification + default: 3 logging: type: object additionalProperties: false diff --git a/rockoon/templates/services/instance-ha.yaml b/rockoon/templates/services/instance-ha.yaml index 5dc392e..a3a5bb1 100644 --- a/rockoon/templates/services/instance-ha.yaml +++ b/rockoon/templates/services/instance-ha.yaml @@ -15,7 +15,7 @@ {%- endif %} {%- set masakari_db_cleanup = spec.get('features', {}).get('database', {}).get('cleanup', {}).get('masakari', {'enabled': true}) %} {%- set libvirt_server_tls_enabled = spec.get('features', {}).get('nova', {}).get('libvirt', {}).get('tls', {}).get('enabled', false) %} -{%- set introspective_monitors_enabled = spec.get('features', {}).get('masakari', {}).get('monitors', {}).get('introspective', {}).get('enabled', false) %} +{%- set introspective_monitors = spec.get('features', {}).get('masakari', {}).get('monitors', {}).get('introspective', {}) %} {%- from 'macros/etcd3.j2' import get_etcd3_endpoint %} spec: @@ -69,9 +69,14 @@ spec: evacuate_all_instances: false ignore_instances_in_error_state: true {% include 'base/_oslo_policy_enforce_defaults.yaml' %} + masakarimonitors: + introspectiveinstancemonitor: + guest_monitoring_interval: {{ introspective_monitors.get("guest_monitoring_interval", 10) }} + guest_monitoring_timeout: {{ introspective_monitors.get("guest_monitoring_timeout", 2) }} + guest_monitoring_failure_threshold: {{ introspective_monitors.get("guest_monitoring_failure_threshold", 3) }} monitors: introspective: - enabled: {{ introspective_monitors_enabled }} + enabled: {{ introspective_monitors.get("enabled", false) }} logging: logger_masakari: level: {{ spec.get('features', {}).get('logging', {}).get('masakari', {}).get('level', 'INFO') }} diff --git a/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr.yaml b/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr.yaml index 9e62d50..141b407 100644 --- a/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr.yaml +++ b/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr.yaml @@ -27,6 +27,11 @@ spec: host_failure: evacuate_all_instances: false ignore_instances_in_error_state: true + masakarimonitors: + introspectiveinstancemonitor: + guest_monitoring_interval: 10 + guest_monitoring_timeout: 2 + guest_monitoring_failure_threshold: 3 monitors: introspective: enabled: false diff --git a/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_db_cleanup.yaml b/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_db_cleanup.yaml index e609097..d1d4c78 100644 --- a/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_db_cleanup.yaml +++ b/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_db_cleanup.yaml @@ -27,6 +27,11 @@ spec: host_failure: evacuate_all_instances: false ignore_instances_in_error_state: true + masakarimonitors: + introspectiveinstancemonitor: + guest_monitoring_interval: 10 + guest_monitoring_timeout: 2 + guest_monitoring_failure_threshold: 3 monitors: introspective: enabled: false diff --git a/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_policies.yaml b/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_policies.yaml index 7d34ea8..7fb2232 100644 --- a/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_policies.yaml +++ b/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_policies.yaml @@ -28,6 +28,11 @@ spec: host_failure: evacuate_all_instances: false ignore_instances_in_error_state: true + masakarimonitors: + introspectiveinstancemonitor: + guest_monitoring_interval: 10 + guest_monitoring_timeout: 2 + guest_monitoring_failure_threshold: 3 monitors: introspective: enabled: false diff --git a/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_telemetry.yaml b/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_telemetry.yaml index 74700a5..d718dd8 100644 --- a/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_telemetry.yaml +++ b/tests/fixtures/render_service_template/output/instance-ha/ussuri_ceph_local_non_dvr_telemetry.yaml @@ -27,6 +27,11 @@ spec: host_failure: evacuate_all_instances: false ignore_instances_in_error_state: true + masakarimonitors: + introspectiveinstancemonitor: + guest_monitoring_interval: 10 + guest_monitoring_timeout: 2 + guest_monitoring_failure_threshold: 3 monitors: introspective: enabled: false