Add 'manage_service_maintenance'. Don't manage services scheduling while upgrading.
For some special cases, don't manage services scheduling both enable and
disable before and after upgrade procedure.
Change-Id: I0bf32fcfe88df45c580ab9892e4331cb87abf017
Related-Prod: PROD-30156
diff --git a/README.rst b/README.rst
index 2ef3f49..8c7579f 100644
--- a/README.rst
+++ b/README.rst
@@ -1749,6 +1749,23 @@
+-------------------------------+------------------------------------------------------+
+Don't manage services scheduling while upgrade
+----------------------------------------------
+For some special cases, don't manage services scheduling both enable and disable
+before and after upgrade procedure.
+
+If 'manage_service_maintenance: true' or not present - default behavior, disable services
+before upgrade and enable it after upgrade.
+If 'manage_service_maintenance: false' - don't disable and don't enable upgraded services
+scheduling before and after upgrade.
+
+.. code-block:: yaml
+
+ neutron:
+ upgrade:
+ manage_service_maintenance: false
+
+
Enable x509 and ssl communication between Neutron and Galera cluster.
---------------------
By default communication between Neutron and Galera is unsecure.
diff --git a/neutron/upgrade/upgrade/post.sls b/neutron/upgrade/upgrade/post.sls
index 9c1d20f..2b085b5 100644
--- a/neutron/upgrade/upgrade/post.sls
+++ b/neutron/upgrade/upgrade/post.sls
@@ -1,10 +1,18 @@
-{%- from "neutron/map.jinja" import server,gateway with context %}
+{%- from "neutron/map.jinja" import server, gateway, upgrade with context %}
+
+neutron_upgrade_upgrade_post:
+ test.show_notification:
+ - name: "dump_message_upgrade_neutron_post"
+ - text: "Running neutron.upgrade.upgrade.post"
{%- if gateway.get('enabled') %}
{% set host_id = salt['network.get_hostname']() %}
+ {%- if upgrade.get('manage_service_maintenance', true) %}
neutron_agent_enabled:
neutronv2.agents_enabled:
- name: {{ host_id }}
- cloud_name: admin_identity
+
+ {%- endif %}
{%- endif %}
diff --git a/neutron/upgrade/upgrade/pre.sls b/neutron/upgrade/upgrade/pre.sls
index 615f98a..2a22a01 100644
--- a/neutron/upgrade/upgrade/pre.sls
+++ b/neutron/upgrade/upgrade/pre.sls
@@ -1,13 +1,21 @@
-{%- from "neutron/map.jinja" import upgrade,server,gateway with context %}
+{%- from "neutron/map.jinja" import server, gateway, upgrade with context %}
+
+neutron_upgrade_upgrade_pre:
+ test.show_notification:
+ - name: "dump_message_upgrade_neutron_pre"
+ - text: "Running neutron.upgrade.upgrade.pre"
{%- if gateway.get('enabled') %}
{% set host_id = salt['network.get_hostname']() %}
+ {%- if upgrade.get('manage_service_maintenance', true) %}
neutron_agent_disable:
neutronv2.agents_disabled:
- name: {{ host_id }}
- cloud_name: admin_identity
+ {%- endif %}
+
{%- if upgrade.get('resource_migration').get('l3', {}).get('enabled') %}
migrate_non_ha_l3:
neutronv2.l3_resources_moved: