Merge "Contrail 3.1.1 fix for discovery to static assignement"
diff --git a/opencontrail/files/3.0/contrail-vrouter-agent.conf b/opencontrail/files/3.0/contrail-vrouter-agent.conf
index 9170aee..29fce04 100644
--- a/opencontrail/files/3.0/contrail-vrouter-agent.conf
+++ b/opencontrail/files/3.0/contrail-vrouter-agent.conf
@@ -9,7 +9,7 @@
# value provided by discovery service will be used. (Optional)
# server=10.0.0.1 10.0.0.2
{%- if not compute.discovery.get('enabled', True) %}
-server={% for member in compute.control.members %}{{ member.host }}{% if not loop.last %} {% endif %}{% endfor %}
+server={% for member in compute.control.members[0:2] %}{{ member.host }}{% if not loop.last %} {% endif %}{% endfor %}
{%- endif %}
[DEFAULT]
@@ -20,7 +20,7 @@
# IP:port strings separated by space can be provided
# collectors=127.0.0.1:8086
{%- if not compute.discovery.get('enabled', True) %}
-server={% for member in compute.collector.members %}{{ member.host }}:8086{% if not loop.last %} {% endif %}{% endfor %}
+collectors={% for member in compute.collector.members[0:2] %}{{ member.host }}:8086{% if not loop.last %} {% endif %}{% endfor %}
{%- endif %}
# Agent mode : can be vrouter / tsn / tor (default is vrouter)
@@ -118,7 +118,7 @@
# the value provided by discovery service will be used.
# server=10.0.0.1:53 10.0.0.2:53
{%- if not compute.discovery.get('enabled', True) %}
-server={% for member in compute.control.members %}{{ member.host }}:53{% if not loop.last %} {% endif %}{% endfor %}
+server={% for member in compute.control.members[0:2] %}{{ member.host }}:53{% if not loop.last %} {% endif %}{% endfor %}
{%- endif %}
# Client port used by vrouter-agent while connecting to contrail-named
diff --git a/opencontrail/files/3.0/contrail-vrouter-nodemgr.conf b/opencontrail/files/3.0/contrail-vrouter-nodemgr.conf
index e3f1957..1efe1f2 100644
--- a/opencontrail/files/3.0/contrail-vrouter-nodemgr.conf
+++ b/opencontrail/files/3.0/contrail-vrouter-nodemgr.conf
@@ -1,7 +1,9 @@
{%- from "opencontrail/map.jinja" import compute with context %}
+{%- if compute.discovery.get('enabled', True) %}
[DISCOVERY]
server={{ compute.discovery.host }}
port=5998
-
+{%- else %}
[COLLECTOR]
-#server_list=ip1:port1 ip2:port2
+server_list={% for member in compute.collector.members %}{{ member.host }}:8086{% if not loop.last %} {% endif %}{% endfor %}
+{%- endif %}