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:
parent
0da8001c12
commit
4fccd71076
@ -43,6 +43,7 @@ from charmhelpers.core.hookenv import (
|
|||||||
|
|
||||||
from charmhelpers.core.host import (
|
from charmhelpers.core.host import (
|
||||||
service,
|
service,
|
||||||
|
service_reload,
|
||||||
service_restart,
|
service_restart,
|
||||||
service_running,
|
service_running,
|
||||||
write_file,
|
write_file,
|
||||||
@ -238,6 +239,12 @@ def configure_vault(context):
|
|||||||
if any_file_changed([VAULT_CONFIG, VAULT_SYSTEMD_CONFIG]):
|
if any_file_changed([VAULT_CONFIG, VAULT_SYSTEMD_CONFIG]):
|
||||||
# force a restart if config has changed
|
# force a restart if config has changed
|
||||||
clear_flag('started')
|
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")
|
@when_not("is-update-status-hook")
|
||||||
|
Loading…
Reference in New Issue
Block a user