From d9656f8fdf0b5657c2dd0d6deb7552b9f08f90f0 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 21 Jul 2024 20:21:37 +0900 Subject: [PATCH] Add support for [healthcheck] enable_by_file_paths Depends-on: https://review.opendev.org/923648 Change-Id: Ib84c504c1634c9f965539247b5f5516e39f45620 --- manifests/healthcheck.pp | 7 +++++++ .../notes/hc-enable_by_file_paths-17fc4a38a2e0e5a1.yaml | 5 +++++ spec/classes/aodh_healthcheck_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/hc-enable_by_file_paths-17fc4a38a2e0e5a1.yaml diff --git a/manifests/healthcheck.pp b/manifests/healthcheck.pp index 6c177b90..3f179fb9 100644 --- a/manifests/healthcheck.pp +++ b/manifests/healthcheck.pp @@ -32,6 +32,11 @@ # is running on a port. Expects a "port:path" list of strings. # Defaults to $facts['os_service_default'] # +# [*enable_by_file_paths*] +# (Optional) Check the presence of files. Used by EnableByFilesHealthcheck +# plugin. +# Defaults to $facts['os_service_default'] +# class aodh::healthcheck ( $detailed = $facts['os_service_default'], $backends = $facts['os_service_default'], @@ -39,6 +44,7 @@ class aodh::healthcheck ( $ignore_proxied_requests = $facts['os_service_default'], $disable_by_file_path = $facts['os_service_default'], $disable_by_file_paths = $facts['os_service_default'], + $enable_by_file_paths = $facts['os_service_default'], ) { include aodh::deps @@ -50,5 +56,6 @@ class aodh::healthcheck ( ignore_proxied_requests => $ignore_proxied_requests, disable_by_file_path => $disable_by_file_path, disable_by_file_paths => $disable_by_file_paths, + enable_by_file_paths => $enable_by_file_paths, } } diff --git a/releasenotes/notes/hc-enable_by_file_paths-17fc4a38a2e0e5a1.yaml b/releasenotes/notes/hc-enable_by_file_paths-17fc4a38a2e0e5a1.yaml new file mode 100644 index 00000000..2add21e0 --- /dev/null +++ b/releasenotes/notes/hc-enable_by_file_paths-17fc4a38a2e0e5a1.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``aodh::healthcheck::enable_by_file_paths`` parameter has been + added. diff --git a/spec/classes/aodh_healthcheck_spec.rb b/spec/classes/aodh_healthcheck_spec.rb index 9241664c..05d9e5b1 100644 --- a/spec/classes/aodh_healthcheck_spec.rb +++ b/spec/classes/aodh_healthcheck_spec.rb @@ -17,6 +17,7 @@ describe 'aodh::healthcheck' do :ignore_proxied_requests => '', :disable_by_file_path => '', :disable_by_file_paths => '', + :enable_by_file_paths => '', ) end end @@ -30,6 +31,7 @@ describe 'aodh::healthcheck' do :ignore_proxied_requests => false, :disable_by_file_path => '/etc/aodh/healthcheck/disabled', :disable_by_file_paths => ['8042:/etc/aodh/healthcheck/disabled'], + :enable_by_file_paths => ['/etc/aodh/healthcheck/enabled'], } end @@ -41,6 +43,7 @@ describe 'aodh::healthcheck' do :ignore_proxied_requests => false, :disable_by_file_path => '/etc/aodh/healthcheck/disabled', :disable_by_file_paths => ['8042:/etc/aodh/healthcheck/disabled'], + :enable_by_file_paths => ['/etc/aodh/healthcheck/enabled'], ) end end