Make midonet_agent control interface configurable

Currently this is hard coded to be eth0

Change-Id: I88898607ba120b28419fa659840f69512942dda4
This commit is contained in:
Sam Morrison 2016-02-11 11:18:43 +11:00
parent 000f371e7d
commit 880199aeab
3 changed files with 20 additions and 8 deletions

View File

@ -6,9 +6,11 @@
#
# [*zk_servers*]
# List of hash [{ip, port}] Zookeeper instances that run in cluster.
# [*cassandra_seeds]
# [*cassandra_seeds*]
# List of [ip] cassandra instances that run in cluster.
#
# [*control_interface*]
# Control interface to use
# Defaults to eth0
# === Examples
#
# The easiest way to run the class is:
@ -26,7 +28,8 @@
# zk_servers => [{'ip' => 'host1',
# 'port' => '2183'},
# {'ip' => 'host2'}],
# cassandra_seeds => ['host1', 'host2', 'host3']
# cassandra_seeds => ['host1', 'host2', 'host3'],
# control_interface => 'eth0'
# }
#
# Please note that Zookeeper port is not mandatory and defaulted to 2181
@ -42,6 +45,8 @@
# - 'host2'
# - 'host3'
#
# midonet::midonet_agent::control_interface: 'eth0'
#
# === Authors
#
# Midonet (http://midonet.org)
@ -63,13 +68,18 @@
# limitations under the License.
#
class midonet::midonet_agent($zk_servers, $cassandra_seeds) {
class midonet::midonet_agent(
$zk_servers,
$cassandra_seeds,
$control_interface='eth0')
{
contain midonet::midonet_agent::install
class {'midonet::midonet_agent::run':
zk_servers => $zk_servers,
cs_seeds => $cassandra_seeds
zk_servers => $zk_servers,
cs_seeds => $cassandra_seeds,
control_interface => $control_interface,
}
contain midonet::midonet_agent::run
}

View File

@ -24,7 +24,9 @@
#
class midonet::midonet_agent::run (
$zk_servers,
$cs_seeds) {
$cs_seeds,
$control_interface)
{
file {'/etc/midolman/midolman.conf':
ensure => present,

View File

@ -46,7 +46,7 @@ arp_expiration_seconds = 3600
[midolman]
disconnected_ttl_seconds = 30
control_interface = eth0
control_interface = <%= @control_interface %>
cache_type = cassandra
check_flow_expiration_interval = 10000 #millis
# top_level_actor_supervisor = resume