Skip to content

Commit

Permalink
Create and mainatain connection store for Antrea flow exporter (antre…
Browse files Browse the repository at this point in the history
…a-io#773)

* Create and maintain connection store for Antrea flows in conntrack

Created connection store that stores the flows by polling conntrack module
every 5s. cxnStore updates the flow if it is already there or add a new
flow based on 5 tuple map. In addition, we add local pod information by
querying interfaceStore. We added ipCache in
interfaceStore for this purpose.

Unit tests and testing on local setup is done with custom apps.

Issue: antrea-io#712

* Connection store for flow exporter feature:

Supporting Pod-to-Service flows. Eliminating duplicate flows with
kube-proxy.

* Connection store patch follow-up

Added feature switch and addressed comments.
Added logic to enable netfilter.conntrack_acct setting.
Swapped names of connTrackPoller and connTrack to be more appropriate.

Addressed comments.

Issue antrea-io#712

* Connection store patch:

Addressed comments. Optimized the check of sysctl settings check.
Addressed merge conflicts.

* Update base antrea-agent.conf to provide info on feature gate

* Addressed comments.
  • Loading branch information
srikartati authored and GraysonWu committed Sep 23, 2020
1 parent 40f0eda commit 393b951
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/yamls/base/conf/antrea-agent.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ featureGates:
# AntreaProxy: false
# Enable traceflow which provides packet tracing feature to diagnose network issue.
# Traceflow: false
# Enable flowexporter which exports polled conntrack connections as IPFIX flow records from each agent to a configured collector.
# FlowExporter: false

# Enable traceflow which provides packet tracing feature to diagnose network issue.
# Traceflow: false
Expand Down
3 changes: 3 additions & 0 deletions cmd/antrea-agent/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ func (o *Options) validate(args []string) error {
if err := o.validateFlowExporterConfig(); err != nil {
return fmt.Errorf("Failed to validate flow exporter config: %v", err)
}
if o.config.OVSDatapathType == ovsconfig.OVSDatapathNetdev && features.DefaultFeatureGate.Enabled(features.FlowExporter) {
return fmt.Errorf("FlowExporter feature is not supported for OVS datapath type %s", o.config.OVSDatapathType)
}
return nil
}

Expand Down

0 comments on commit 393b951

Please sign in to comment.