Merge "Fix generating connections to OVN db"

This commit is contained in:
Zuul 2019-02-13 16:02:50 +00:00 committed by Gerrit Code Review
commit 6c611ff7a6
5 changed files with 8 additions and 8 deletions

View File

@ -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}"], ':'),
}
}
}

View File

@ -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' |>
}

View File

@ -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}"], ':'),
}
}
}

View File

@ -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,

View File

@ -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 => {