Merge "Fix config nodemgr configuration"
diff --git a/opencontrail/control.sls b/opencontrail/control.sls
index 486f9dc..1edfa54 100644
--- a/opencontrail/control.sls
+++ b/opencontrail/control.sls
@@ -155,4 +155,30 @@
{%- endif %}
{%- endif %}
+{%- if control.get('disable_dns', False) %}
+{%- if control.version < 4.0 %}
+disable_contrail_dns_service:
+ file.replace:
+ - name: /etc/contrail/supervisord_control_files/contrail-dns.ini
+ - pattern: "autostart=true"
+ - repl: "autostart=false"
+
+disable_contrail_named_service:
+ file.replace:
+ - name: /etc/contrail/supervisord_control_files/contrail-named.ini
+ - pattern: "autostart=true"
+ - repl: "autostart=false"
+
+{# cmd run is used, beacause service.dead or supervisord.dead states are not working #}
+stop_contrail_dns_service:
+ cmd.run:
+ - name: "service contrail-dns stop"
+
+stop_contrail_named_service:
+ cmd.run:
+ - name: "service contrail-named stop"
+
+{%- endif %}
+{%- endif %}
+
{%- endif %}
diff --git a/opencontrail/files/3.0/contrail-alarm-gen.conf b/opencontrail/files/3.0/contrail-alarm-gen.conf
index d14cab0..026a903 100644
--- a/opencontrail/files/3.0/contrail-alarm-gen.conf
+++ b/opencontrail/files/3.0/contrail-alarm-gen.conf
@@ -15,11 +15,13 @@
{%- if collector.get('message_queue', {}).members is defined %}
rabbitmq_server_list={{ collector.message_queue.members | join(',', attribute='host') }}
rabbitmq_ha_mode=True
-rabbitmq_port={{ collector.get('message_queue', {}).get('port', 5672) }}
{%- elif collector.get('message_queue', {}).host is defined %}
rabbitmq_server_list={{ collector.message_queue.host }}
-rabbitmq_port={{ collector.get('message_queue', {}).get('port', 5672) }}
{%- endif %}
+rabbitmq_port={{ collector.get('message_queue', {}).get('port', 5672) }}
+rabbitmq_user={{ collector.get('message_queue', {}).get('user', 'guest') }}
+rabbitmq_password={{ collector.get('message_queue', {}).get('password', 'guest') }}
+rabbitmq_vhost={{ collector.get('message_queue', {}).get('vhost', '') }}
[DISCOVERY]
disc_server_ip = {{ collector.discovery.host }}
diff --git a/opencontrail/files/4.0/contrail-alarm-gen.conf b/opencontrail/files/4.0/contrail-alarm-gen.conf
index ae8ea5e..e0c51a3 100644
--- a/opencontrail/files/4.0/contrail-alarm-gen.conf
+++ b/opencontrail/files/4.0/contrail-alarm-gen.conf
@@ -14,12 +14,13 @@
{%- if collector.get('message_queue', {}).members is defined %}
rabbitmq_server_list={{ collector.message_queue.members | join(',', attribute='host') }}
rabbitmq_ha_mode=True
-rabbitmq_port={{ collector.get('message_queue', {}).get('port', 5672) }}
{%- elif collector.get('message_queue', {}).host is defined %}
rabbitmq_server_list={{ collector.message_queue.host }}
-rabbitmq_port={{ collector.get('message_queue', {}).get('port', 5672) }}
{%- endif %}
-
+rabbitmq_port={{ collector.get('message_queue', {}).get('port', 5672) }}
+rabbitmq_user={{ collector.get('message_queue', {}).get('user', 'guest') }}
+rabbitmq_password={{ collector.get('message_queue', {}).get('password', 'guest') }}
+rabbitmq_vhost={{ collector.get('message_queue', {}).get('vhost', '') }}
[API_SERVER]
# List of api-servers in ip:port format separated by space