Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to go-ipfix v0.5.12 #3352

Merged
merged 1 commit into from
Feb 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/kind/test-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ COMMON_IMAGES_LIST=("k8s.gcr.io/e2e-test-images/agnhost:2.29" \
"projects.registry.vmware.com/library/busybox" \
"projects.registry.vmware.com/antrea/nginx:1.21.6-alpine" \
"projects.registry.vmware.com/antrea/perftool" \
"projects.registry.vmware.com/antrea/ipfix-collector:v0.5.11" \
"projects.registry.vmware.com/antrea/ipfix-collector:v0.5.12" \
"projects.registry.vmware.com/antrea/wireguard-go:0.0.20210424")
for image in "${COMMON_IMAGES_LIST[@]}"; do
for i in `seq 3`; do
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
github.com/stretchr/testify v1.7.0
github.com/ti-mo/conntrack v0.4.0
github.com/vishvananda/netlink v1.1.1-0.20210510164352-d17758a128bf
github.com/vmware/go-ipfix v0.5.11
github.com/vmware/go-ipfix v0.5.12
go.uber.org/multierr v1.6.0
golang.org/x/crypto v0.0.0-20210503195802-e9a32991a82e
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,8 @@ github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmF
github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns=
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vmware/go-ipfix v0.5.11 h1:1731EiUCTkhrK0YTxVbpT3YVyfyIj3ACua+QjL+9eq0=
github.com/vmware/go-ipfix v0.5.11/go.mod h1:yzbG1rv+yJ8GeMrRm+MDhOV3akygNZUHLhC1pDoD2AY=
github.com/vmware/go-ipfix v0.5.12 h1:mqQknlvnvDY25apPNy9c27ri3FMDFIhzvO68Kk5Qp58=
github.com/vmware/go-ipfix v0.5.12/go.mod h1:yzbG1rv+yJ8GeMrRm+MDhOV3akygNZUHLhC1pDoD2AY=
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8=
Expand Down
2 changes: 1 addition & 1 deletion pkg/flowaggregator/flowaggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ func (fa *flowAggregator) sendFlowKeyRecord(key ipfixintermediate.FlowKey, recor
if err != nil {
return err
}
if err = fa.aggregationProcess.ResetStatElementsInRecord(record.Record); err != nil {
if err = fa.aggregationProcess.ResetStatAndThroughputElementsInRecord(record.Record); err != nil {
return err
}
klog.V(4).Infof("Data set sent successfully: %d Bytes sent", sentBytes)
Expand Down
2 changes: 1 addition & 1 deletion pkg/flowaggregator/flowaggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func TestFlowAggregator_sendFlowKeyRecord(t *testing.T) {
mockRecord.EXPECT().GetOrderedElementList().Return(elementList)
mockDataSet.EXPECT().AddRecord(elementList, templateID).Return(nil)
mockIPFIXExpProc.EXPECT().SendSet(mockDataSet).Return(0, nil)
mockAggregationProcess.EXPECT().ResetStatElementsInRecord(mockRecord).Return(nil)
mockAggregationProcess.EXPECT().ResetStatAndThroughputElementsInRecord(mockRecord).Return(nil)
mockAggregationProcess.EXPECT().AreCorrelatedFieldsFilled(*tc.flowRecord).Return(false)
emptyStr := make([]byte, 0)
sourcePodNameElem, _ := ipfixentities.DecodeAndCreateInfoElementWithValue(ipfixentities.NewInfoElement("sourcePodName", 0, 0, ipfixregistry.AntreaEnterpriseID, 0), emptyStr)
Expand Down
6 changes: 3 additions & 3 deletions pkg/ipfix/ipfix_intermediate.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type IPFIXAggregationProcess interface {
ForAllExpiredFlowRecordsDo(callback ipfixintermediate.FlowKeyRecordMapCallBack) error
GetExpiryFromExpirePriorityQueue() time.Duration
GetRecords(flowKey *ipfixintermediate.FlowKey) []map[string]interface{}
ResetStatElementsInRecord(record ipfixentities.Record) error
ResetStatAndThroughputElementsInRecord(record ipfixentities.Record) error
SetCorrelatedFieldsFilled(record *ipfixintermediate.AggregationFlowRecord)
AreCorrelatedFieldsFilled(record ipfixintermediate.AggregationFlowRecord) bool
IsAggregatedRecordIPv4(record ipfixintermediate.AggregationFlowRecord) bool
Expand Down Expand Up @@ -76,8 +76,8 @@ func (ap *ipfixAggregationProcess) GetRecords(flowKey *ipfixintermediate.FlowKey
return ap.AggregationProcess.GetRecords(flowKey)
}

func (ap *ipfixAggregationProcess) ResetStatElementsInRecord(record ipfixentities.Record) error {
return ap.AggregationProcess.ResetStatElementsInRecord(record)
func (ap *ipfixAggregationProcess) ResetStatAndThroughputElementsInRecord(record ipfixentities.Record) error {
return ap.AggregationProcess.ResetStatAndThroughputElementsInRecord(record)
}

func (ap *ipfixAggregationProcess) SetCorrelatedFieldsFilled(record *ipfixintermediate.AggregationFlowRecord) {
Expand Down
14 changes: 7 additions & 7 deletions pkg/ipfix/testing/mock_ipfix.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion plugins/octant/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0=
github.com/vmware-tanzu/octant v0.24.0 h1:PMLU2QG6czSdCl6/xn7lHkHGi+Dv43rxL+AZL6sPJ24=
github.com/vmware-tanzu/octant v0.24.0/go.mod h1:yK0Nu7wzzvV25/T8nf4NQFMUUA7sLcp0gk96CjOTUiQ=
github.com/vmware/go-ipfix v0.5.11/go.mod h1:yzbG1rv+yJ8GeMrRm+MDhOV3akygNZUHLhC1pDoD2AY=
github.com/vmware/go-ipfix v0.5.12/go.mod h1:yzbG1rv+yJ8GeMrRm+MDhOV3akygNZUHLhC1pDoD2AY=
github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4=
github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI=
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I=
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const (
netshootImage = "projects.registry.vmware.com/antrea/netshoot:v0.1"
nginxImage = "projects.registry.vmware.com/antrea/nginx:1.21.6-alpine"
perftoolImage = "projects.registry.vmware.com/antrea/perftool"
ipfixCollectorImage = "projects.registry.vmware.com/antrea/ipfix-collector:v0.5.11"
ipfixCollectorImage = "projects.registry.vmware.com/antrea/ipfix-collector:v0.5.12"
ipfixCollectorPort = "4739"

nginxLBService = "nginx-loadbalancer"
Expand Down