Ensure all settings provided on lxd relation before configuring
This commit is contained in:
parent
52e826edc4
commit
d195ba9a7e
1
hooks/lxd-relation-changed
Symbolic link
1
hooks/lxd-relation-changed
Symbolic link
@ -0,0 +1 @@
|
||||
nova_compute_hooks.py
|
@ -373,11 +373,15 @@ def neutron_plugin_changed():
|
||||
CONFIGS.write(NOVA_CONF)
|
||||
|
||||
|
||||
@hooks.hook('lxd-relation-joined')
|
||||
@hooks.hook('lxd-relation-changed')
|
||||
@restart_on_change(restart_map())
|
||||
def lxd_joined():
|
||||
settings = relation_get()
|
||||
configure_lxd(settings, user='nova')
|
||||
settings = {
|
||||
'lxd_password': relation_get('lxd_password'),
|
||||
'lxd_address': relation_get('lxd_address'),
|
||||
}
|
||||
if all(settings):
|
||||
configure_lxd(settings, user='nova')
|
||||
|
||||
def main():
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user