Fix db migration running when db relation has not been setup

This commit is contained in:
Liam Young
2014-10-20 07:43:06 +00:00
parent 04bf15cd8e
commit 642e41086d
2 changed files with 11 additions and 1 deletions

View File

@@ -294,7 +294,8 @@ def neutron_api_relation_joined(rid=None):
@restart_on_change(restart_map())
def neutron_api_relation_changed():
CONFIGS.write(NEUTRON_CONF)
conditional_neutron_migration()
if 'shared-db' in CONFIGS.complete_contexts():
conditional_neutron_migration()
@hooks.hook('neutron-plugin-api-relation-joined')