Skip to content

Commit

Permalink
Merge pull request #251 from timdengyun/cp_ovs_multicast_default_as_f…
Browse files Browse the repository at this point in the history
…alse

Set enable_ovs_mcast_snooping as false by default(CP#250)
  • Loading branch information
timdengyun authored Apr 3, 2024
2 parents 4195d3c + 2aa3183 commit 1974644
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/controller/configmap/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ func (adaptor *ConfigMapOc) FillDefaults(configmap *corev1.ConfigMap, spec *conf
// For Openshift add a 3-seconds agent delay by default
appendErrorIfNotNil(&errs, fillDefault(cfg, "nsx_node_agent", "waiting_before_cni_response", "3", false))
appendErrorIfNotNil(&errs, fillDefault(cfg, "nsx_node_agent", "mtu", strconv.Itoa(operatortypes.DefaultMTU), false))
// For Openshift force enable_ovs_mcast_snooping as True by default for IPI and UPI installation
appendErrorIfNotNil(&errs, fillDefault(cfg, "nsx_node_agent", "enable_ovs_mcast_snooping", "true", false))
// For Openshift force enable_ovs_mcast_snooping as False by default for IPI and UPI installation
// keepalived is configured with unicast by default from OC 4.11
appendErrorIfNotNil(&errs, fillDefault(cfg, "nsx_node_agent", "enable_ovs_mcast_snooping", "false", false))
appendErrorIfNotNil(&errs, fillClusterNetwork(spec, cfg))

// Write config back to ConfigMap data
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/configmap/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestFillDefaults(t *testing.T) {
assert.Equal(t, "10.0.0.0/24", cfg.Section("nsx_v3").Key("container_ip_blocks").Value())
assert.Equal(t, "3", cfg.Section("nsx_node_agent").Key("waiting_before_cni_response").Value())
assert.Equal(t, "1500", cfg.Section("nsx_node_agent").Key("mtu").Value())
assert.Equal(t, "true", cfg.Section("nsx_node_agent").Key("enable_ovs_mcast_snooping").Value())
assert.Equal(t, "false", cfg.Section("nsx_node_agent").Key("enable_ovs_mcast_snooping").Value())

mockConfigMap := createMockConfigMap()
data = &mockConfigMap.Data
Expand Down

0 comments on commit 1974644

Please sign in to comment.