Add clustering support for ovsdb
Change-Id: I740c3cf6ac907a0d6854680ee89b7ca60f3407d6
This commit is contained in:
@@ -7,7 +7,19 @@
|
|||||||
# The IP-Address where OVN DBs should be listening
|
# The IP-Address where OVN DBs should be listening
|
||||||
# Defaults to '0.0.0.0'
|
# Defaults to '0.0.0.0'
|
||||||
#
|
#
|
||||||
class ovn::northd($dbs_listen_ip = '0.0.0.0') {
|
# [*dbs_cluster_local_addr*]
|
||||||
|
# The IP-Address where OVN Clustered DBs should be listening
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
|
# [*dbs_cluster_remote_addr*]
|
||||||
|
# The IP-Address where OVN Clustered DBs sync from
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
|
class ovn::northd(
|
||||||
|
$dbs_listen_ip = '0.0.0.0',
|
||||||
|
$dbs_cluster_local_addr = undef,
|
||||||
|
$dbs_cluster_remote_addr = undef,
|
||||||
|
) {
|
||||||
include ovn::params
|
include ovn::params
|
||||||
include vswitch::ovs
|
include vswitch::ovs
|
||||||
|
|
||||||
@@ -25,10 +37,27 @@ class ovn::northd($dbs_listen_ip = '0.0.0.0') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$ovn_northd_opts_addr = "--db-nb-addr=${dbs_listen_ip} --db-sb-addr=${dbs_listen_ip} \
|
||||||
|
--db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes"
|
||||||
|
|
||||||
|
if $dbs_cluster_local_addr {
|
||||||
|
$ovn_northd_opts_cluster_local_addr = "--db-nb-cluster-local-addr=${dbs_cluster_local_addr} \
|
||||||
|
--db-sb-cluster-local-addr=${dbs_cluster_local_addr}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if $dbs_cluster_remote_addr {
|
||||||
|
$ovn_northd_opts_cluster_remote_addr = "--db-nb-cluster-remote-addr=${dbs_cluster_remote_addr} \
|
||||||
|
--db-sb-cluster-remote-addr=${dbs_cluster_remote_addr}"
|
||||||
|
}
|
||||||
|
|
||||||
|
$ovn_northd_opts = join([$ovn_northd_opts_addr,
|
||||||
|
$ovn_northd_opts_cluster_local_addr,
|
||||||
|
$ovn_northd_opts_cluster_remote_addr],
|
||||||
|
' ')
|
||||||
|
|
||||||
augeas { 'config-ovn-northd':
|
augeas { 'config-ovn-northd':
|
||||||
context => $ovn_northd_context,
|
context => $ovn_northd_context,
|
||||||
changes => "set ${ovn_northd_option_name} '\"--db-nb-addr=${dbs_listen_ip} --db-sb-addr=${dbs_listen_ip} \
|
changes => "set ${ovn_northd_option_name} '\"${ovn_northd_opts}\"'",
|
||||||
--db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes\"'",
|
|
||||||
before => Service['northd'],
|
before => Service['northd'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user