Add managing for nova-serialproxy service
By default service nova-serialproxy should be disabled.
To skip disabling add next data to the model:
nova:
controller:
....
serial_proxy:
enabled: True
PROD-36897
Change-Id: I8a309594d76e32c0165cda165e19564a02c28dd2
diff --git a/README.rst b/README.rst
index 3333007..15a48c0 100644
--- a/README.rst
+++ b/README.rst
@@ -1606,3 +1606,13 @@
controller:
filter_scheduler:
max_instances_per_host: 50
+
+Enable Nova nova-serialproxy service:
+
+.. code-block:: yaml
+
+ nova:
+ controller:
+ ....
+ serial_proxy:
+ enabled: True
diff --git a/nova/controller.sls b/nova/controller.sls
index 2055ac5..7e93392 100644
--- a/nova/controller.sls
+++ b/nova/controller.sls
@@ -67,6 +67,22 @@
- require:
- pkg: nova_controller_packages
+{%- if not controller.get('serial_proxy',{}).get('enabled', False) %}
+nova_serialproxy_service_disable:
+ service.disabled:
+ - name: nova-serialproxy
+ - require:
+ - pkg: nova_controller_packages
+
+nova_serialproxy_service_reset_failed:
+ cmd.run:
+ - name: systemctl reset-failed nova-serialproxy
+ - onlyif:
+ - systemctl list-units --state=failed | grep nova-serialproxy
+ - require:
+ - pkg: nova_controller_packages
+{%- endif %}
+
{%- if not salt['user.info']('nova') %}
user_nova:
user.present: