Fix generating connections to OVN db
Correct way how we generate ovn db connection and recognize when ovn_host is IPV4 or IPV6 Change-Id: Iaed7304adf40a87a0f14b7a95339f8416140e947
This commit is contained in:
parent
71a8722eb3
commit
1514e983ba
|
@ -36,7 +36,7 @@ class tripleo::profile::base::neutron::agents::ovn (
|
|||
) {
|
||||
if $step >= 4 {
|
||||
class { '::ovn::controller':
|
||||
ovn_remote => "tcp:${ovn_db_host}:${ovn_sbdb_port}",
|
||||
ovn_remote => join(['tcp', normalize_ip_for_uri($ovn_db_host), "${ovn_sbdb_port}"], ':'),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class tripleo::profile::base::neutron::ovn_metadata (
|
|||
if $step >= 4 {
|
||||
include ::tripleo::profile::base::neutron
|
||||
class { '::neutron::agents::ovn_metadata':
|
||||
ovn_sb_connection => "tcp:${ovn_db_host}:${ovn_sb_port}",
|
||||
ovn_sb_connection => join(['tcp', normalize_ip_for_uri($ovn_db_host), "${ovn_sb_port}"], ':'),
|
||||
}
|
||||
Service<| title == 'controller' |> -> Service<| title == 'ovn-metadata' |>
|
||||
}
|
||||
|
|
|
@ -41,8 +41,8 @@ class tripleo::profile::base::neutron::plugins::ml2::ovn (
|
|||
) {
|
||||
if $step >= 4 {
|
||||
class { '::neutron::plugins::ml2::ovn':
|
||||
ovn_nb_connection => "tcp:${ovn_db_host}:${ovn_nb_port}",
|
||||
ovn_sb_connection => "tcp:${ovn_db_host}:${ovn_sb_port}",
|
||||
ovn_nb_connection => join(['tcp', normalize_ip_for_uri($ovn_db_host), "${ovn_nb_port}"], ':'),
|
||||
ovn_sb_connection => join(['tcp', normalize_ip_for_uri($ovn_db_host), "${ovn_sb_port}"], ':'),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ class tripleo::profile::pacemaker::ovn_dbs_bundle (
|
|||
before => Pacemaker::Resource::Bundle['ovn-dbs-bundle'],
|
||||
}
|
||||
}
|
||||
|
||||
$ovn_dbs_vip_norm = normalize_ip_for_uri($ovn_dbs_vip)
|
||||
$ovn_dbs_location_rule = {
|
||||
resource_discovery => 'exclusive',
|
||||
score => 0,
|
||||
|
@ -144,7 +144,7 @@ class tripleo::profile::pacemaker::ovn_dbs_bundle (
|
|||
ocf_agent_name => "${ovndb_servers_ocf_name}",
|
||||
master_params => '',
|
||||
op_params => 'start timeout=200s stop timeout=200s',
|
||||
resource_params => "master_ip=${ovn_dbs_vip} nb_master_port=${nb_db_port} \
|
||||
resource_params => "master_ip=${ovn_dbs_vip_norm} nb_master_port=${nb_db_port} \
|
||||
sb_master_port=${sb_db_port} manage_northd=yes inactive_probe_interval=180000",
|
||||
tries => $pcs_tries,
|
||||
location_rule => $ovn_dbs_location_rule,
|
||||
|
|
|
@ -73,7 +73,7 @@ class tripleo::profile::pacemaker::ovn_northd (
|
|||
$ovndb_servers_resource_name = 'ovndb_servers'
|
||||
$ovndb_servers_ocf_name = 'ovn:ovndb-servers'
|
||||
$ovndb_vip_resource_name = "ip-${ovn_dbs_vip}"
|
||||
|
||||
$ovn_dbs_vip_norm = normalize_ip_for_uri($ovn_dbs_vip)
|
||||
# By step 3, all the VIPs would have been created.
|
||||
# After creating ovn ocf resource, colocate it with the
|
||||
# VIP - ip-${ovn_dbs_vip}.
|
||||
|
@ -81,7 +81,7 @@ class tripleo::profile::pacemaker::ovn_northd (
|
|||
ocf_agent_name => "${ovndb_servers_ocf_name}",
|
||||
master_params => '',
|
||||
op_params => 'start timeout=200s stop timeout=200s',
|
||||
resource_params => "master_ip=${ovn_dbs_vip} nb_master_port=${nb_db_port} \
|
||||
resource_params => "master_ip=${ovn_dbs_vip_norm} nb_master_port=${nb_db_port} \
|
||||
sb_master_port=${sb_db_port} manage_northd=yes inactive_probe_interval=180000",
|
||||
tries => $pcs_tries,
|
||||
location_rule => {
|
||||
|
|
Loading…
Reference in New Issue