Add support for ovn-ofctrl-wait-before-clear

Support was added for this option [1] to avoid dataplane downtime
during ovn upgrades where schema changes have happened. This
adds the ability for us to configure it.

[1] https://patchwork.ozlabs.org/project/ovn/patch/20220808182845.2746916-2-mmichels@redhat.com/

Conflicts:
	manifests/controller.pp
	spec/classes/ovn_controller_spec.rb

Change-Id: Ia3112b9a219b90af718c49776da49078449f09a2
(cherry picked from commit b5d38dcbd4)
(cherry picked from commit a8f8fe2cec)
This commit is contained in:
Terry Wilson
2022-11-01 12:45:15 -05:00
committed by Takashi Kajinami
parent 528de65e88
commit b41d052d0f
3 changed files with 22 additions and 1 deletions

View File

@@ -100,6 +100,11 @@
# (optional) Create ovs bridges according to ovn_bridge_mappings.
# Defaults to true
#
# [*ovn_ofctrl_wait_before_clear*]
# (optional) Time (ms) to wait at startup before clearing openflow rules and
# install new ones.
# Defaults to 8000
#
class ovn::controller(
$ovn_remote,
$ovn_encap_ip,
@@ -119,7 +124,8 @@ class ovn::controller(
$enable_ovn_match_northd = false,
$ovn_chassis_mac_map = [],
$ovn_monitor_all = false,
$manage_ovs_bridge = true
$manage_ovs_bridge = true,
$ovn_ofctrl_wait_before_clear = 8000
) {
include ovn::params
@@ -169,6 +175,7 @@ class ovn::controller(
'external_ids:ovn-remote-probe-interval' => { 'value' => "${ovn_remote_probe_interval}" },
'external_ids:ovn-openflow-probe-interval' => { 'value' => "${ovn_openflow_probe_interval}" },
'external_ids:ovn-monitor-all' => { 'value' => "${ovn_monitor_all}" },
'external_ids:ovn-ofctrl-wait-before-clear' => { 'value' => "${$ovn_ofctrl_wait_before_clear}" },
}
if $ovn_encap_tos {

View File

@@ -0,0 +1,11 @@
---
features:
- |
The new ``ovn::controller::ovn_ofctrl_wait_before_clear`` parameter
has been added to resolve an issue with dataplane downtime during
upgrades that involve OVN schema changes. It will delay delting and
re-adding openflow rules by the configured time in ms to give
ovn-controller time to handle db connection / reconnection that can
happen in this case. The default of 8000ms is based on upstream OVN
testing with 200k openflow rules. Since it involved a change in
behavior, the upstream OVN value defaults to unset.

View File

@@ -100,6 +100,9 @@ describe 'ovn::controller' do
is_expected.to contain_vs_config('external_ids:ovn-chassis-mac-mappings').with(
:value => 'physnet1:aa:bb:cc:dd:ee:ff,physnet2:bb:aa:cc:dd:ee:ff',
)
is_expected.to contain_vs_config('external_ids:ovn-ofctrl-wait-before-clear').with(
:value => "8000"
)
end
it 'configures bridge mappings' do