enable listen_interface for cassandra
Change-Id: I11b6613534d39ac4809812028e48d20dd4bbc9d8
diff --git a/README.rst b/README.rst
index 307ae1c..c0b397e 100644
--- a/README.rst
+++ b/README.rst
@@ -623,6 +623,18 @@
multi_tenancy: false
...
+Cassandra listen interface
+------------------------------
+
+.. code-block:: yaml
+
+ database:
+ ....
+ bind:
+ interface: eth0
+ port: 9042
+ rpc_port: 9160
+ ....
Usage
=====
diff --git a/opencontrail/files/2.2/cassandra.yaml b/opencontrail/files/2.2/cassandra.yaml
index f2fe355..e6abd7b 100644
--- a/opencontrail/files/2.2/cassandra.yaml
+++ b/opencontrail/files/2.2/cassandra.yaml
@@ -380,8 +380,12 @@
# you can specify which should be chosen using listen_interface_prefer_ipv6. If false the first ipv4
# address will be used. If true the first ipv6 address will be used. Defaults to false preferring
# ipv4. If there is only one address it will be selected regardless of ipv4/ipv6.
+{% if database.bind.interface is defined %}
+listen_interface: {{ database.bind.interface }}
+{% else %}
listen_address: {{ database.bind.host }}
# listen_interface: eth0
+{% endif %}
# listen_interface_prefer_ipv6: false
# Address to broadcast to other Cassandra nodes
diff --git a/opencontrail/files/3.0/cassandra.yaml b/opencontrail/files/3.0/cassandra.yaml
index f2fe355..e6abd7b 100644
--- a/opencontrail/files/3.0/cassandra.yaml
+++ b/opencontrail/files/3.0/cassandra.yaml
@@ -380,8 +380,12 @@
# you can specify which should be chosen using listen_interface_prefer_ipv6. If false the first ipv4
# address will be used. If true the first ipv6 address will be used. Defaults to false preferring
# ipv4. If there is only one address it will be selected regardless of ipv4/ipv6.
+{% if database.bind.interface is defined %}
+listen_interface: {{ database.bind.interface }}
+{% else %}
listen_address: {{ database.bind.host }}
# listen_interface: eth0
+{% endif %}
# listen_interface_prefer_ipv6: false
# Address to broadcast to other Cassandra nodes