Add support for [healthcheck] enable_by_file_paths

Depends-on: https://review.opendev.org/923648
Change-Id: I197732a6a9c53467012bb6e439af5ecdd7934397
This commit is contained in:
Takashi Kajinami 2024-07-21 20:30:59 +09:00
parent 9055ae436a
commit 656c44f2dd
3 changed files with 15 additions and 0 deletions

View File

@ -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 cinder::healthcheck (
$detailed = $facts['os_service_default'],
$backends = $facts['os_service_default'],
@ -39,6 +44,7 @@ class cinder::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 cinder::deps
@ -50,5 +56,6 @@ class cinder::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,
}
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The new ``cinder::healthcheck::enable_by_file_paths`` parameter has been
added.

View File

@ -17,6 +17,7 @@ describe 'cinder::healthcheck' do
:ignore_proxied_requests => '<SERVICE DEFAULT>',
:disable_by_file_path => '<SERVICE DEFAULT>',
:disable_by_file_paths => '<SERVICE DEFAULT>',
:enable_by_file_paths => '<SERVICE DEFAULT>',
)
end
end
@ -30,6 +31,7 @@ describe 'cinder::healthcheck' do
:ignore_proxied_requests => false,
:disable_by_file_path => '/etc/cinder/healthcheck/disabled',
:disable_by_file_paths => ['8776:/etc/cinder/healthcheck/disabled'],
:enable_by_file_paths => ['/etc/cinder/healthcheck/enabled'],
}
end
@ -41,6 +43,7 @@ describe 'cinder::healthcheck' do
:ignore_proxied_requests => false,
:disable_by_file_path => '/etc/cinder/healthcheck/disabled',
:disable_by_file_paths => ['8776:/etc/cinder/healthcheck/disabled'],
:enable_by_file_paths => ['/etc/cinder/healthcheck/enabled'],
)
end
end