From 5ea0ae26f4e9d027df22e21685e3ced7f53176a8 Mon Sep 17 00:00:00 2001 From: Kamil Sambor Date: Tue, 20 Jul 2021 14:08:49 +0200 Subject: [PATCH] Add ovn-monitor-all option to ovn-controller With monitor-all option, all ovn-controllers do not enable conditional monitoring there by reducing the load on the Southbound ovsdb-server. Conflicts: manifests/controller.pp (wallaby -> victoria) Conflicts: manifests/controller.pp Resolved conflict caused by c60fdb9540bc5dfc60cf05d56ad9d8fe45164343 (victoria -> ususri) Conflicts: spec/classes/ovn_controller_spec.rb Resolved conflict caused by dba349dad01edafab4a3fda3b9ad813cce814597 Partial-Bug: #1936781 Signed-off-by: Kamil Sambor Change-Id: Ia78c0873e7ac6488b3048ae8475cc87ec40022bb (cherry picked from commit 7a1bb545198d8c864c619b30f4bc13417d764bbd) (cherry picked from commit 9879556556e9cb2bc9139799e93da5feb60124b3) (cherry picked from commit d2c29451c4c88fc97f08f78dc07642150ef6e463) (cherry picked from commit 65f3e99681af726ba016484d1488aa14c4b4033b) --- manifests/controller.pp | 8 ++++++++ releasenotes/notes/ovn-monitor-all-001cafc946130936.yaml | 4 ++++ spec/classes/ovn_controller_spec.rb | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 releasenotes/notes/ovn-monitor-all-001cafc946130936.yaml diff --git a/manifests/controller.pp b/manifests/controller.pp index 06bab85..780f678 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -76,6 +76,12 @@ # vlan type logical switch. # Defaults to empty list # +# [*ovn_monitor_all*] +# (optional) A boolean value that tells if ovn-controller should monitor all +# records of tables in ovs-database. If set to false, it will conditionally +# monitor the records that is needed in the current chassis. +# Default to false (keep the original behavior) +# class ovn::controller( $ovn_remote, $ovn_encap_ip, @@ -91,6 +97,7 @@ class ovn::controller( $ovn_remote_probe_interval = 60000, $ovn_openflow_probe_interval = 60, $ovn_chassis_mac_map = [], + $ovn_monitor_all = false, ) { include ::ovn::params @@ -133,6 +140,7 @@ class ovn::controller( 'external_ids:ovn-bridge' => { 'value' => $ovn_bridge }, '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}" }, } if !empty($ovn_chassis_mac_map) { diff --git a/releasenotes/notes/ovn-monitor-all-001cafc946130936.yaml b/releasenotes/notes/ovn-monitor-all-001cafc946130936.yaml new file mode 100644 index 0000000..5ec210d --- /dev/null +++ b/releasenotes/notes/ovn-monitor-all-001cafc946130936.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``ovn::controller::ovn_monitor_all`` parameter has been added. diff --git a/spec/classes/ovn_controller_spec.rb b/spec/classes/ovn_controller_spec.rb index 574b89d..bf9ad3a 100644 --- a/spec/classes/ovn_controller_spec.rb +++ b/spec/classes/ovn_controller_spec.rb @@ -14,6 +14,7 @@ describe 'ovn::controller' do :mac_table_size => 20000, :ovn_remote_probe_interval => 30000, :ovn_openflow_probe_interval => 8, + :ovn_monitor_all => true, :ovn_chassis_mac_map => ['physnet1:aa:bb:cc:dd:ee:ff', 'physnet2:bb:aa:cc:dd:ee:ff'] } @@ -75,6 +76,10 @@ describe 'ovn::controller' do :value => params[:ovn_openflow_probe_interval], ) + is_expected.to contain_vs_config('external_ids:ovn-monitor-all').with( + :value => params[:ovn_monitor_all], + ) + 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', )