diff --git a/manifests/controller.pp b/manifests/controller.pp index c08abfc..686ebc0 100644 --- a/manifests/controller.pp +++ b/manifests/controller.pp @@ -81,6 +81,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, @@ -97,6 +103,7 @@ class ovn::controller( $ovn_transport_zones = [], $enable_ovn_match_northd = false, $ovn_chassis_mac_map = [], + $ovn_monitor_all = false, ) { include ovn::params @@ -139,6 +146,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 8625e8d..28ae33f 100644 --- a/spec/classes/ovn_controller_spec.rb +++ b/spec/classes/ovn_controller_spec.rb @@ -13,6 +13,7 @@ describe 'ovn::controller' do :mac_table_size => 20000, :ovn_remote_probe_interval => 30000, :ovn_openflow_probe_interval => 8, + :ovn_monitor_all => true, :ovn_transport_zones => ['tz1'], :enable_ovn_match_northd => false, :ovn_chassis_mac_map => ['physnet1:aa:bb:cc:dd:ee:ff', @@ -76,6 +77,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-transport-zones').with( :value => params[:ovn_transport_zones], )