Remove chance of config-changed running in an infinite loop due to re-exec
This commit is contained in:
parent
686464a8ba
commit
a4711763a0
1
hooks/config-changed-postupgrade
Symbolic link
1
hooks/config-changed-postupgrade
Symbolic link
@ -0,0 +1 @@
|
||||
keystone_hooks.py
|
@ -154,6 +154,13 @@ def config_changed():
|
||||
status_set('maintenance', 'Running openstack upgrade')
|
||||
do_openstack_upgrade(configs=CONFIGS)
|
||||
|
||||
config_changed_postupgrade()
|
||||
|
||||
|
||||
@hooks.hook('config-changed-postupgrade')
|
||||
@restart_on_change(restart_map())
|
||||
@synchronize_ca_if_changed(fatal=True)
|
||||
def config_changed_postupgrade():
|
||||
# Ensure ssl dir exists and is unison-accessible
|
||||
ensure_ssl_dir()
|
||||
|
||||
|
@ -395,7 +395,8 @@ def do_openstack_upgrade(configs):
|
||||
else:
|
||||
log("Database not ready - deferring to shared-db relation",
|
||||
level=INFO)
|
||||
os.execl('./hooks/config-changed', '')
|
||||
log("Re-execing hook to pickup upgraded packages", level=INFO)
|
||||
os.execl('./hooks/config-changed-postupgrade', '')
|
||||
|
||||
|
||||
def is_db_initialised():
|
||||
|
Loading…
Reference in New Issue
Block a user