Fix DB errors due to DB online migration
The patch fixes DB errors appear due to the fact that discovery step
doesn't have dependency to the end of db syncing and doesn't wait for the finish
of this one therefore as a consequences the DB errors occure.
Change-Id: I61eddacbc338fff1e6bb0a94027ddd31d98d996f
Related-PROD: PROD-15964
diff --git a/nova/controller.sls b/nova/controller.sls
index bf4ba28..2c90f0f 100644
--- a/nova/controller.sls
+++ b/nova/controller.sls
@@ -172,6 +172,8 @@
{%- if grains.get('noservices') %}
- onlyif: /bin/false
{%- endif %}
+ - require:
+ - cmd: nova_controller_syncdb
nova_cell1_create:
cmd.run:
@@ -180,6 +182,8 @@
- onlyif: /bin/false
{%- endif %}
- unless: 'nova-manage cell_v2 list_cells | grep cell1'
+ - require:
+ - cmd: nova_controller_syncdb
nova_placement_service_mask:
file.symlink:
@@ -214,6 +218,7 @@
- require:
- cmd: nova_controller_map_cell0
- cmd: nova_cell1_create
+ - cmd: nova_controller_syncdb
nova_controller_map_instances:
novang.map_instances: