Reload vault on configure

Always reload reload on configure.
This ensures any certificates changed on disk will be reloaded.
(Such as the tcp listener certificate files.)

Closes-Bug: #1912261
Change-Id: Ic254f38d86c0e8323ed10a2eaa22462797d48605
This commit is contained in:
Samuel Walladge 2022-06-17 08:37:29 +09:30
parent 0da8001c12
commit 4fccd71076
1 changed files with 7 additions and 0 deletions

View File

@ -43,6 +43,7 @@ from charmhelpers.core.hookenv import (
from charmhelpers.core.host import (
service,
service_reload,
service_restart,
service_running,
write_file,
@ -238,6 +239,12 @@ def configure_vault(context):
if any_file_changed([VAULT_CONFIG, VAULT_SYSTEMD_CONFIG]):
# force a restart if config has changed
clear_flag('started')
else:
# If vault isn't going to be totally restarted, reload it.
# This will pick up things like certificates changed on disk.
# It is inexpensive and doesn't cause vault to be resealed,
# so we can always reload it here.
service_reload(service_name='vault')
@when_not("is-update-status-hook")