Skip to content

Commit

Permalink
Fix the flaky e2e TestFlowAggregator test
Browse files Browse the repository at this point in the history
In addition, clean up certain miscalleneous items like removing
references to feature/flow-aggregator branch.
  • Loading branch information
srikartati committed Dec 21, 2020
1 parent ffb0fee commit 92b6976
Show file tree
Hide file tree
Showing 14 changed files with 126 additions and 133 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ on:
branches:
- master
- release-*
- feature/flow-aggregator
push:
branches:
- master
- release-*
- feature/flow-aggregator

jobs:
check-changes:
Expand Down Expand Up @@ -109,7 +107,7 @@ jobs:
run: make flow-aggregator-ubuntu
- name: Push flow-aggregator Docker image to registry
# Will remove the feature/flow-aggregator branch later
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/feature/flow-aggregator')}}
if: ${{ github.repository == 'vmware-tanzu/antrea' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ on:
branches:
- master
- release-*
- feature/flow-aggregator
push:
branches:
- master
- release-*
- feature/flow-aggregator
jobs:


Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ on:
branches:
- master
- release-*
- feature/flow-aggregator
push:
branches:
- master
- release-*
- feature/flow-aggregator

env:
KIND_VERSION: v0.9.0
Expand Down
8 changes: 4 additions & 4 deletions build/yamls/antrea-aks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ data:
# If PORT is empty, we default to 4739, the standard IPFIX port.
# If no PROTO is given, we consider "tcp" as default. We support "tcp" and "udp"
# L4 transport protocols.
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:tcp"
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:4739:tcp"
# Provide flow poll interval as a duration string. This determines how often the flow exporter dumps connections from the conntrack module.
# Flow poll interval should be greater than or equal to 1s (one second).
Expand Down Expand Up @@ -1315,7 +1315,7 @@ metadata:
annotations: {}
labels:
app: antrea
name: antrea-config-tkk482c56m
name: antrea-config-gm7dcbm584
namespace: kube-system
---
apiVersion: v1
Expand Down Expand Up @@ -1422,7 +1422,7 @@ spec:
key: node-role.kubernetes.io/master
volumes:
- configMap:
name: antrea-config-tkk482c56m
name: antrea-config-gm7dcbm584
name: antrea-config
- name: antrea-controller-tls
secret:
Expand Down Expand Up @@ -1687,7 +1687,7 @@ spec:
operator: Exists
volumes:
- configMap:
name: antrea-config-tkk482c56m
name: antrea-config-gm7dcbm584
name: antrea-config
- hostPath:
path: /etc/cni/net.d
Expand Down
8 changes: 4 additions & 4 deletions build/yamls/antrea-eks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ data:
# If PORT is empty, we default to 4739, the standard IPFIX port.
# If no PROTO is given, we consider "tcp" as default. We support "tcp" and "udp"
# L4 transport protocols.
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:tcp"
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:4739:tcp"
# Provide flow poll interval as a duration string. This determines how often the flow exporter dumps connections from the conntrack module.
# Flow poll interval should be greater than or equal to 1s (one second).
Expand Down Expand Up @@ -1315,7 +1315,7 @@ metadata:
annotations: {}
labels:
app: antrea
name: antrea-config-tkk482c56m
name: antrea-config-gm7dcbm584
namespace: kube-system
---
apiVersion: v1
Expand Down Expand Up @@ -1422,7 +1422,7 @@ spec:
key: node-role.kubernetes.io/master
volumes:
- configMap:
name: antrea-config-tkk482c56m
name: antrea-config-gm7dcbm584
name: antrea-config
- name: antrea-controller-tls
secret:
Expand Down Expand Up @@ -1689,7 +1689,7 @@ spec:
operator: Exists
volumes:
- configMap:
name: antrea-config-tkk482c56m
name: antrea-config-gm7dcbm584
name: antrea-config
- hostPath:
path: /etc/cni/net.d
Expand Down
8 changes: 4 additions & 4 deletions build/yamls/antrea-gke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ data:
# If PORT is empty, we default to 4739, the standard IPFIX port.
# If no PROTO is given, we consider "tcp" as default. We support "tcp" and "udp"
# L4 transport protocols.
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:tcp"
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:4739:tcp"
# Provide flow poll interval as a duration string. This determines how often the flow exporter dumps connections from the conntrack module.
# Flow poll interval should be greater than or equal to 1s (one second).
Expand Down Expand Up @@ -1315,7 +1315,7 @@ metadata:
annotations: {}
labels:
app: antrea
name: antrea-config-ccm9d925m4
name: antrea-config-h7t8ffthht
namespace: kube-system
---
apiVersion: v1
Expand Down Expand Up @@ -1422,7 +1422,7 @@ spec:
key: node-role.kubernetes.io/master
volumes:
- configMap:
name: antrea-config-ccm9d925m4
name: antrea-config-h7t8ffthht
name: antrea-config
- name: antrea-controller-tls
secret:
Expand Down Expand Up @@ -1687,7 +1687,7 @@ spec:
operator: Exists
volumes:
- configMap:
name: antrea-config-ccm9d925m4
name: antrea-config-h7t8ffthht
name: antrea-config
- hostPath:
path: /etc/cni/net.d
Expand Down
8 changes: 4 additions & 4 deletions build/yamls/antrea-ipsec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ data:
# If PORT is empty, we default to 4739, the standard IPFIX port.
# If no PROTO is given, we consider "tcp" as default. We support "tcp" and "udp"
# L4 transport protocols.
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:tcp"
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:4739:tcp"
# Provide flow poll interval as a duration string. This determines how often the flow exporter dumps connections from the conntrack module.
# Flow poll interval should be greater than or equal to 1s (one second).
Expand Down Expand Up @@ -1320,7 +1320,7 @@ metadata:
annotations: {}
labels:
app: antrea
name: antrea-config-mcfc2b62gk
name: antrea-config-mh52t2hmmd
namespace: kube-system
---
apiVersion: v1
Expand Down Expand Up @@ -1436,7 +1436,7 @@ spec:
key: node-role.kubernetes.io/master
volumes:
- configMap:
name: antrea-config-mcfc2b62gk
name: antrea-config-mh52t2hmmd
name: antrea-config
- name: antrea-controller-tls
secret:
Expand Down Expand Up @@ -1736,7 +1736,7 @@ spec:
operator: Exists
volumes:
- configMap:
name: antrea-config-mcfc2b62gk
name: antrea-config-mh52t2hmmd
name: antrea-config
- hostPath:
path: /etc/cni/net.d
Expand Down
8 changes: 4 additions & 4 deletions build/yamls/antrea.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ data:
# If PORT is empty, we default to 4739, the standard IPFIX port.
# If no PROTO is given, we consider "tcp" as default. We support "tcp" and "udp"
# L4 transport protocols.
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:tcp"
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:4739:tcp"
# Provide flow poll interval as a duration string. This determines how often the flow exporter dumps connections from the conntrack module.
# Flow poll interval should be greater than or equal to 1s (one second).
Expand Down Expand Up @@ -1320,7 +1320,7 @@ metadata:
annotations: {}
labels:
app: antrea
name: antrea-config-5c77mt4c28
name: antrea-config-mfd9dcdh6d
namespace: kube-system
---
apiVersion: v1
Expand Down Expand Up @@ -1427,7 +1427,7 @@ spec:
key: node-role.kubernetes.io/master
volumes:
- configMap:
name: antrea-config-5c77mt4c28
name: antrea-config-mfd9dcdh6d
name: antrea-config
- name: antrea-controller-tls
secret:
Expand Down Expand Up @@ -1692,7 +1692,7 @@ spec:
operator: Exists
volumes:
- configMap:
name: antrea-config-5c77mt4c28
name: antrea-config-mfd9dcdh6d
name: antrea-config
- hostPath:
path: /etc/cni/net.d
Expand Down
2 changes: 1 addition & 1 deletion build/yamls/base/conf/antrea-agent.conf
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ featureGates:
# If PORT is empty, we default to 4739, the standard IPFIX port.
# If no PROTO is given, we consider "tcp" as default. We support "tcp" and "udp"
# L4 transport protocols.
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:tcp"
#flowCollectorAddr: "flow-aggregator.flow-aggregator.svc:4739:tcp"

# Provide flow poll interval as a duration string. This determines how often the flow exporter dumps connections from the conntrack module.
# Flow poll interval should be greater than or equal to 1s (one second).
Expand Down
1 change: 1 addition & 0 deletions build/yamls/flow-aggregator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ data:
#aggregatorTransportProtocol: "tcp"
kind: ConfigMap
metadata:
annotations: {}
labels:
app: flow-aggregator
name: flow-aggregator-configmap-kggb5829gb
Expand Down
13 changes: 8 additions & 5 deletions test/e2e/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,21 @@ func setupTestWithIPFIXCollector(tb testing.TB) (*TestData, error, bool) {
ipfixCollectorIP, err := testData.podWaitForIPs(defaultTimeout, "ipfix-collector", testNamespace)
if err != nil || len(ipfixCollectorIP.ipStrings) == 0 {
tb.Errorf("Error when waiting to get ipfix collector Pod IP: %v", err)
return nil, err, isIPv6
}
ipStr := ipfixCollectorIP.ipv4.String()
tb.Logf("Applying flow aggregator YAML with ipfix collector address: %s", ipStr)
if err := testData.deployFlowAggregator(fmt.Sprintf("%s:%s:tcp", ipStr, ipfixCollectorPort)); err != nil {

tb.Logf("Applying flow aggregator YAML with ipfix collector address: %s:%s:tcp", ipStr, ipfixCollectorPort)
faClusterIP, err := testData.deployFlowAggregator(fmt.Sprintf("%s:%s:tcp", ipStr, ipfixCollectorPort))
if err != nil {
return testData, err, isIPv6
}
tb.Logf("Deploying flow exporter")
if err := testData.deployAntreaFlowExporter(""); err != nil {
tb.Logf("Deploying flow exporter with collector address: %s:%s:tcp", faClusterIP, ipfixCollectorPort)
if err = testData.deployAntreaFlowExporter(fmt.Sprintf("%s:%s:tcp", faClusterIP, ipfixCollectorPort)); err != nil {
return testData, err, isIPv6
}
tb.Logf("Checking CoreDNS deployment")
if err := testData.checkCoreDNSPods(defaultTimeout); err != nil {
if err = testData.checkCoreDNSPods(defaultTimeout); err != nil {
return testData, err, isIPv6
}
return testData, nil, isIPv6
Expand Down
Loading

0 comments on commit 92b6976

Please sign in to comment.