diff --git a/manifests/midonet_agent.pp b/manifests/midonet_agent.pp index fae4e7b..b33946a 100644 --- a/manifests/midonet_agent.pp +++ b/manifests/midonet_agent.pp @@ -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 } diff --git a/manifests/midonet_agent/run.pp b/manifests/midonet_agent/run.pp index 8823a9d..297eefc 100644 --- a/manifests/midonet_agent/run.pp +++ b/manifests/midonet_agent/run.pp @@ -24,7 +24,9 @@ # class midonet::midonet_agent::run ( $zk_servers, - $cs_seeds) { + $cs_seeds, + $control_interface) +{ file {'/etc/midolman/midolman.conf': ensure => present, diff --git a/templates/midonet-agent/midolman.conf.erb b/templates/midonet-agent/midolman.conf.erb index 1648ea5..4b956d4 100644 --- a/templates/midonet-agent/midolman.conf.erb +++ b/templates/midonet-agent/midolman.conf.erb @@ -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