multicast: make igmp query interval configurable#3819
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3819 +/- ##
==========================================
- Coverage 64.38% 56.39% -7.99%
==========================================
Files 284 398 +114
Lines 40248 55938 +15690
==========================================
+ Hits 25912 31547 +5635
- Misses 12304 21923 +9619
- Partials 2032 2468 +436
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fe885c8 to
489cae5
Compare
|
verified in testbed |
489cae5 to
7884919
Compare
tnqn
left a comment
There was a problem hiding this comment.
It doesn't make sense to add a user-facing configuration parameter just to make test quicker.
But I think igmp query interval itself is good to be configurable since this is configurable in physical routers. I would not say this is for testing only in PR description.
And the title can be simplified: "multicast: make igmp query interval configurable"
igmpQueryInterval in agent.conf7884919 to
ba33470
Compare
ba33470 to
0fc2e49
Compare
| MulticastInterfaces []string `yaml:"multicastInterfaces,omitempty"` | ||
| // The interval for antrea-agent to send IGMP query to pods, time uint is second. | ||
| // Defaults to 125 seconds. | ||
| IGMPQueryInterval int `yaml:"igmpQueryInterval"` |
There was a problem hiding this comment.
@wenyingd @liu4480 do we likely have other similar configurations in the future? I wonder if we should group them in one struct, including multicastInterfaces.
cc @antoninbas
There was a problem hiding this comment.
I can't say no other configurations are needed in future. Agree to use one struct to group them if possible.
There was a problem hiding this comment.
OK, I will add a group for multicast
There was a problem hiding this comment.
grouping them sounds good to me.
0fc2e49 to
96d569c
Compare
99514c2 to
ec768e5
Compare
| --help, -h Print this message and exit | ||
| --multicast Generates a manifest for multicast. | ||
| --multicast-interfaces Multicast interface names (default is empty) | ||
| --igmpquery-interval Interval to send IGMP query, time unit is second (default is 125) |
There was a problem hiding this comment.
This seems too specific. I think you can use --extra-helm-values-file or add a --extra-helm-values argument.
There was a problem hiding this comment.
removed this option, and use --extra-helm-values-file
ec768e5 to
1bff55b
Compare
| | kubeAPIServerOverride | string | `""` | Address of Kubernetes apiserver, to override any value provided in kubeconfig or InClusterConfig. | | ||
| | logVerbosity | int | `0` | | | ||
| | multicastInterfaces | list | `[]` | Names of the interfaces on Nodes that are used to forward multicast traffic. | | ||
| | multicast.igmpQueryInterval | int | `125` | The interval for antrea-agent to send IGMP query to pods, time uint is second. Defaults to 125 seconds. | |
There was a problem hiding this comment.
pods -> Pods
query -> queries
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
|
|
||
| # The interval for antrea-agent to send IGMP query to Pods, time unit is second. |
| // The names of the interfaces on Nodes that are used to forward multicast traffic. | ||
| // Defaults to transport interface if not set. | ||
| MulticastInterfaces []string `yaml:"multicastInterfaces,omitempty"` | ||
| // The interval for antrea-agent to send IGMP query to pods, time uint is second. |
| multicast: | ||
| # -- Names of the interfaces on Nodes that are used to forward multicast traffic. | ||
| multicastInterfaces: [] | ||
| # -- The interval for antrea-agent to send IGMP query to pods, time uint is second. |
There was a problem hiding this comment.
| # -- The interval for antrea-agent to send IGMP query to pods, time uint is second. | |
| # -- The interval in seconds at which the antrea-agent send IGMP queries to Pods. |
| # -- Names of the interfaces on Nodes that are used to forward multicast traffic. | ||
| multicastInterfaces: [] | ||
| # -- The interval for antrea-agent to send IGMP query to pods, time uint is second. | ||
| # Defaults to 125 seconds. |
There was a problem hiding this comment.
you can remove this IMO, the default is already used to configure the value below
| multicastInterfaces: [] | ||
| # -- The interval for antrea-agent to send IGMP query to pods, time uint is second. | ||
| # Defaults to 125 seconds. | ||
| igmpQueryInterval: 125 |
There was a problem hiding this comment.
@tnqn do you think that for time durations we should consistently use go duration strings (e.g. "125s", "2m", "1m30s", ...)?
I think that K8s components do that and we also do that for other Antrea configuration parameters (for the Flow Aggregator IIRC).
1bff55b to
1ad8513
Compare
1ad8513 to
949a135
Compare
| func (o *Options) validateMulticastConfig() error { | ||
| if features.DefaultFeatureGate.Enabled(features.Multicast) { | ||
| var err error | ||
| o.igmpQueryInterval, err = time.ParseDuration(o.config.Multicast.IGMPQueryInterval) |
There was a problem hiding this comment.
I think it should only parse it when it's not empty? otherwise empty value would crash the process?
949a135 to
b58f396
Compare
antoninbas
left a comment
There was a problem hiding this comment.
small comment, otherwise LGTM
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
|
|
||
| # The interval at which the antrea-agent to send IGMP queries to Pods. |
There was a problem hiding this comment.
s/to send/sends
in all the other places as well
| staleConnectionTimeout time.Duration | ||
| nplStartPort int | ||
| nplEndPort int | ||
| // IGMP query interval |
There was a problem hiding this comment.
not a useful comment IMO, it just repeats the variable name; you could remove that line altogether
Signed-off-by: Bin Liu <biliu@vmware.com>
b58f396 to
4f73825
Compare
|
/test-all |
|
/skip-conformance no change related to conformance test |
Signed-off-by: Bin Liu <biliu@vmware.com> Signed-off-by: Scott Rosenberg <scott@terasky.com>
)" This reverts commit 6d3036b. Signed-off-by: Shuyang Xin <gavinx@vmware.com>
For multicast, IGMP query is sent by antrea-agent every 125 seconds. This patch makes IGMP query interval configurable.