Add posibility to avoid cell mapping
If we disable cell mapping for env not in upgrade/resize state
it will greatfully reduce the time for recalling nova state on
controller node
Related-PROD: PROD-34645
Change-Id: I8aa77e5ebd1618dadd7e0a72d51e9b6a11b44f43
diff --git a/nova/controller.sls b/nova/controller.sls
index e189bd9..9420661 100644
--- a/nova/controller.sls
+++ b/nova/controller.sls
@@ -463,6 +463,7 @@
{%- endif %}
+{%- if controller.get('update_cells') %}
nova_controller_discover_hosts:
cmd.run:
- name: nova-manage cell_v2 discover_hosts {{ nova_manage_cell_v2_discover_hosts_args | join(' ') }}
@@ -488,6 +489,7 @@
- pkg: nova_controller_packages
{%- endif %}
+{%- endif %}
{%- if controller.version not in ["juno", "kilo", "liberty", "mitaka", "newton"] %}
diff --git a/nova/db/offline_sync.sls b/nova/db/offline_sync.sls
index 07da02a..a2b8849 100644
--- a/nova/db/offline_sync.sls
+++ b/nova/db/offline_sync.sls
@@ -15,6 +15,7 @@
{%- if controller.version not in ["juno", "kilo", "liberty", "mitaka", "newton"] %}
+{%- if controller.get('update_cells') %}
nova_controller_map_cell0:
cmd.run:
- name: nova-manage cell_v2 map_cell0
@@ -39,6 +40,7 @@
- nova_controller_syncdb
{%- endif %}
+{%- endif %}
nova_controller_syncdb:
cmd.run: