Merge "[tls] Make a cert SLS IDs globally unique"
diff --git a/README.rst b/README.rst
index 2a8ace1..c3a67f1 100644
--- a/README.rst
+++ b/README.rst
@@ -618,6 +618,32 @@
         format: iso9660  # Default: vfat
         inject_password: False  # Default: False
 
+Number of concurrent live migrates
+----------------------------------
+
+Default is to have no concurrent live migrations (so 1 live-migration at a time).
+
+Excerpt from config options page (https://docs.openstack.org/ocata/config-reference/compute/config-options.html):
+
+  Maximum number of live migrations to run concurrently. This limit is
+  enforced to avoid outbound live migrations overwhelming the host/network
+  and causing failures. It is not recommended that you change this unless
+  you are very sure that doing so is safe and stable in your environment.
+
+  Possible values:
+
+  - 0 : treated as unlimited.
+  - Negative value defaults to 0.
+  - Any positive integer representing maximum number of live migrations to run concurrently.
+
+To configure this option:
+
+.. code-block:: yaml
+
+  nova:
+    compute:
+      max_concurrent_live_migrations: 1  # (1 is the default)
+
 
 Documentation and Bugs
 ======================
diff --git a/nova/controller.sls b/nova/controller.sls
index 2f05978..4bc8035 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:
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index e43e8ba..c46f18d 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -38,6 +38,10 @@
 
 reserved_host_memory_mb = {{ compute.get('reserved_host_memory_mb', '512') }}
 
+{%- if compute.max_concurrent_live_migrations is defined %}
+max_concurrent_live_migrations = {{ compute.max_concurrent_live_migrations }}
+{%- endif %}
+
 {%- if compute.vcpu_pin_set is defined %}
 vcpu_pin_set={{ compute.vcpu_pin_set }}
 {%- endif %}
diff --git a/nova/files/newton/nova-compute.conf.Debian b/nova/files/newton/nova-compute.conf.Debian
index 7050864..e729c04 100644
--- a/nova/files/newton/nova-compute.conf.Debian
+++ b/nova/files/newton/nova-compute.conf.Debian
@@ -40,6 +40,10 @@
 
 reserved_host_memory_mb = {{ compute.get('reserved_host_memory_mb', '512') }}
 
+{%- if compute.max_concurrent_live_migrations is defined %}
+max_concurrent_live_migrations = {{ compute.max_concurrent_live_migrations }}
+{%- endif %}
+
 {%- if compute.vcpu_pin_set is defined %}
 vcpu_pin_set={{ compute.vcpu_pin_set }}
 {%- endif %}
diff --git a/nova/files/ocata/nova-compute.conf.Debian b/nova/files/ocata/nova-compute.conf.Debian
index ab59964..54708a3 100644
--- a/nova/files/ocata/nova-compute.conf.Debian
+++ b/nova/files/ocata/nova-compute.conf.Debian
@@ -716,6 +716,9 @@
 #   to run concurrently.
 #  (integer value)
 #max_concurrent_live_migrations=1
+{%- if compute.max_concurrent_live_migrations is defined %}
+max_concurrent_live_migrations = {{ compute.max_concurrent_live_migrations }}
+{%- endif %}
 
 #
 # Number of times to retry block device allocation on failures. Starting with