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

(yoga to xena)
Conflicts:
	manifests/controller.pp

(xena to wallaby)
Conflicts:
	manifests/controller.pp

(wallaby to victoria)
Conflicts:
	manifests/controller.pp

Change-Id: Ia3112b9a219b90af718c49776da49078449f09a2
(cherry picked from commit b5d38dcbd4)
(cherry picked from commit a8f8fe2cec)
(cherry picked from commit b41d052d0f)
(cherry picked from commit 3cb1265352)
(cherry picked from commit 6375bb29de)
This commit is contained in:
Terry Wilson 2022-11-01 12:45:15 -05:00 committed by Takashi Kajinami
parent 3af845c4d2
commit 947d0e143c
3 changed files with 21 additions and 0 deletions

View File

@ -93,6 +93,11 @@
# monitor the records that is needed in the current chassis.
# Default to false (keep the original behavior)
#
# [*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,
@ -111,6 +116,7 @@ class ovn::controller(
$enable_ovn_match_northd = false,
$ovn_chassis_mac_map = [],
$ovn_monitor_all = false,
$ovn_ofctrl_wait_before_clear = 8000
) {
include ovn::params
@ -154,6 +160,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 !empty($ovn_chassis_mac_map) {

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

@ -93,6 +93,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