Browse Source

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
changes/72/635872/8
Kamil Sambor 3 years ago
parent
commit
1514e983ba
  1. 2
      manifests/profile/base/neutron/agents/ovn.pp
  2. 2
      manifests/profile/base/neutron/ovn_metadata.pp
  3. 4
      manifests/profile/base/neutron/plugins/ml2/ovn.pp
  4. 4
      manifests/profile/pacemaker/ovn_dbs_bundle.pp
  5. 4
      manifests/profile/pacemaker/ovn_northd.pp

2
manifests/profile/base/neutron/agents/ovn.pp

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

2
manifests/profile/base/neutron/ovn_metadata.pp

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

4
manifests/profile/base/neutron/plugins/ml2/ovn.pp

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

4
manifests/profile/pacemaker/ovn_dbs_bundle.pp

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

4
manifests/profile/pacemaker/ovn_northd.pp

@ -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…
Cancel
Save