Skip to content

Commit

Permalink
move go-ipfix to v0.4.3 and fix destinationServicePort warnings
Browse files Browse the repository at this point in the history
The commit is for bumping go-ipfix to v0.4.3, with fixes on issue #1747 and changes for
exporting process and collecting process input. It also fixes issue #1820, which is about
unexpected number of warnings for destinationServicePort mismatch.
  • Loading branch information
zyiou authored and Yongming Ding committed Feb 9, 2021
1 parent 5e087f8 commit 9c3b9c1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ci/jenkins/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ function deliver_antrea {
docker tag "${DOCKER_REGISTRY}/antrea/sonobuoy-systemd-logs:v0.3" "sonobuoy/systemd-logs:v0.3"
fi
DOCKER_REGISTRY=${DOCKER_REGISTRY} make
DOCKER_REGISTRY=${DOCKER_REGISTRY} make flow-aggregator-ubuntu

echo "====== Delivering Antrea to all the Nodes ======"
echo "=== Fill serviceCIDRv6 and serviceCIDR ==="
Expand All @@ -311,10 +312,13 @@ function deliver_antrea {

cp -f build/yamls/*.yml $WORKDIR
docker save -o antrea-ubuntu.tar projects.registry.vmware.com/antrea/antrea-ubuntu:latest
docker save -o flow-aggregator.tar projects.registry.vmware.com/antrea/flow-aggregator:latest

kubectl get nodes -o wide --no-headers=true | awk -v role="$CONTROL_PLANE_NODE_ROLE" '$3 != role {print $6}' | while read IP; do
rsync -avr --progress --inplace -e "ssh -o StrictHostKeyChecking=no" antrea-ubuntu.tar jenkins@[${IP}]:${WORKDIR}/antrea-ubuntu.tar
rsync -avr --progress --inplace -e "ssh -o StrictHostKeyChecking=no" flow-aggregator.tar jenkins@[${IP}]:${WORKDIR}/flow-aggregator.tar
ssh -o StrictHostKeyChecking=no -n jenkins@${IP} "docker images | grep 'antrea-ubuntu' | awk '{print \$3}' | xargs -r docker rmi ; docker load -i ${WORKDIR}/antrea-ubuntu.tar ; docker images | grep '<none>' | awk '{print \$3}' | xargs -r docker rmi" || true
ssh -o StrictHostKeyChecking=no -n jenkins@${IP} "docker images | grep 'flow-aggregator' | awk '{print \$3}' | xargs -r docker rmi ; docker load -i ${WORKDIR}/flow-aggregator.tar ; docker images | grep '<none>' | awk '{print \$3}' | xargs -r docker rmi" || true
if [[ "${DOCKER_REGISTRY}" != "" ]]; then
ssh -o StrictHostKeyChecking=no -n jenkins@${IP} "docker pull ${DOCKER_REGISTRY}/antrea/sonobuoy-systemd-logs:v0.3 ; docker tag ${DOCKER_REGISTRY}/antrea/sonobuoy-systemd-logs:v0.3 sonobuoy/systemd-logs:v0.3"
fi
Expand Down
2 changes: 1 addition & 1 deletion ci/kind/test-e2e-kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ if $np; then
manifest_args="$manifest_args --np --tun vxlan"
fi

COMMON_IMAGES_LIST=("gcr.io/kubernetes-e2e-test-images/agnhost:2.8" "projects.registry.vmware.com/library/busybox" "projects.registry.vmware.com/antrea/nginx" "projects.registry.vmware.com/antrea/perftool" "projects.registry.vmware.com/antrea/ipfix-collector:v0.4.2")
COMMON_IMAGES_LIST=("gcr.io/kubernetes-e2e-test-images/agnhost:2.8" "projects.registry.vmware.com/library/busybox" "projects.registry.vmware.com/antrea/nginx" "projects.registry.vmware.com/antrea/perftool" "projects.registry.vmware.com/antrea/ipfix-collector:v0.4.3")
for image in "${COMMON_IMAGES_LIST[@]}"; do
docker pull $image
done
Expand Down
6 changes: 4 additions & 2 deletions test/e2e/flowaggregator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"time"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"
networkingv1 "k8s.io/api/networking/v1"
Expand Down Expand Up @@ -208,8 +207,11 @@ func checkRecordsForFlows(t *testing.T, data *TestData, srcIP string, dstIP stri
if err != nil {
_, logStdout, _, _ := provider.RunCommandOnNode(controlPlaneNodeName(), fmt.Sprintf("kubectl -n %s logs -l app=flow-aggregator", "flow-aggregator"))
t.Logf("Flow aggregator logs: %s", logStdout)
_, collectorOutput, _, _ := provider.RunCommandOnNode(controlPlaneNodeName(), fmt.Sprintf("kubectl logs --since=%v ipfix-collector -n antrea-test", time.Since(timeStart).String()))
t.Logf("Collector output: %s", collectorOutput)
t.Errorf("IPFIX collector did not receive expected number of data records and timed out. srcIP: %s, dstIP: %s, isIPv6: %v", srcIP, dstIP, isIPv6)
}
require.NoError(t, err, "IPFIX collector did not receive expected number of data records and timed out.")
// require.NoError(t, err, "IPFIX collector did not receive expected number of data records and timed out.")

rc, collectorOutput, _, err := provider.RunCommandOnNode(controlPlaneNodeName(), fmt.Sprintf("kubectl logs --since=%v ipfix-collector -n antrea-test", time.Since(timeStart).String()))
if err != nil || rc != 0 {
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const (
busyboxImage = "projects.registry.vmware.com/library/busybox"
nginxImage = "projects.registry.vmware.com/antrea/nginx"
perftoolImage = "projects.registry.vmware.com/antrea/perftool"
ipfixCollectorImage = "projects.registry.vmware.com/antrea/ipfix-collector:v0.4.2"
ipfixCollectorImage = "projects.registry.vmware.com/antrea/ipfix-collector:v0.4.3"
ipfixCollectorPort = "4739"

nginxLBService = "nginx-loadbalancer"
Expand Down

0 comments on commit 9c3b9c1

Please sign in to comment.