diff --git a/.gitignore b/.gitignore index 5b670f2..979a9df 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,6 @@ dkms.conf cli_cfg cli_tunnel cli_service -cli_gc gue_ping_svc_auto pfc_cli_go diff --git a/src/cli/Makefile b/src/cli/Makefile index b15441d..b201188 100755 --- a/src/cli/Makefile +++ b/src/cli/Makefile @@ -1,8 +1,7 @@ USER_TARGETS := \ cli_cfg \ cli_tunnel \ - cli_service \ - cli_gc + cli_service USER_LIBS := -lz -lssl -lcrypto diff --git a/test/docker/prod.Dockerfile b/test/docker/prod.Dockerfile index 2fd2ff3..f59239c 100755 --- a/test/docker/prod.Dockerfile +++ b/test/docker/prod.Dockerfile @@ -45,7 +45,7 @@ COPY --from=builder /usr/src/pfc/src/*.sh ./ COPY --from=builder /usr/src/pfc/test/docker/*.sh ./ # Copy CLI -COPY --from=builder /usr/src/pfc/src/cli/cli_cfg /usr/src/pfc/src/cli/cli_service /usr/src/pfc/src/cli/cli_tunnel /usr/src/pfc/src/cli/cli_gc /usr/src/pfc/src/cli/cli_nat ./ +COPY --from=builder /usr/src/pfc/src/cli/cli_cfg /usr/src/pfc/src/cli/cli_service /usr/src/pfc/src/cli/cli_tunnel ./ COPY --from=builder /usr/src/pfc/test/port_*.sh ./ COPY --from=builder /usr/src/pfc/test/pfc_*.sh ./ diff --git a/test/ebpf/test_ifindex_gc_01.sh b/test/ebpf/test_ifindex_gc_01.sh index e81582a..35ac48c 100755 --- a/test/ebpf/test_ifindex_gc_01.sh +++ b/test/ebpf/test_ifindex_gc_01.sh @@ -206,10 +206,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all" -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -233,17 +229,9 @@ else # tail -n60 /sys/kernel/debug/tracing/trace fi -docker exec -it ${NODE} bash -c "cli_gc get all" -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' - echo "Waiting 3s" sleep 3 -docker exec -it ${NODE} bash -c "cli_gc get all" -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' - echo -e "\nCreating session #2" TMP=$(./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID}) if [ "${VERBOSE}" ]; then @@ -259,8 +247,6 @@ fi for (( i=1; i<10; i++ )) do echo "[$i/10] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all" - docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' sleep 1 done # <<<< diff --git a/test/ebpf/test_ifindex_gc_02.sh b/test/ebpf/test_ifindex_gc_02.sh index ccf9dde..9710742 100755 --- a/test/ebpf/test_ifindex_gc_02.sh +++ b/test/ebpf/test_ifindex_gc_02.sh @@ -206,8 +206,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -217,15 +215,6 @@ else echo "[$i] Sessions:" ./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID} > /dev/null done - - echo "Waiting ~20s for final cleanup..." - for (( i=1; i<9; i++ )) - do - echo "[$i/8] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - sleep 3 - done - docker exec -it ${NODE} bash -c "cli_gc get all" fi # <<<< diff --git a/test/ebpf/test_ifindex_gc_03.sh b/test/ebpf/test_ifindex_gc_03.sh index 4c416d0..2be9b64 100755 --- a/test/ebpf/test_ifindex_gc_03.sh +++ b/test/ebpf/test_ifindex_gc_03.sh @@ -204,8 +204,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -215,15 +213,6 @@ else echo -e "[$i/6000] Sessions:\r" ./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID} > /dev/null done - - echo -e "\nWaiting ~20s for final cleanup..." - for (( i=1; i<9; i++ )) - do - echo "[$i/8] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - sleep 3 - done - docker exec -it ${NODE} bash -c "cli_gc get all" fi # <<<< diff --git a/test/ebpf/test_ifindex_gc_04.sh b/test/ebpf/test_ifindex_gc_04.sh index 372d70b..f9eb474 100755 --- a/test/ebpf/test_ifindex_gc_04.sh +++ b/test/ebpf/test_ifindex_gc_04.sh @@ -203,8 +203,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -214,15 +212,6 @@ else echo "[$i] Sessions:" ./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID} $i > /dev/null done - - echo "Waiting ~20s for final cleanup..." - for (( i=1; i<9; i++ )) - do - echo "[$i/8] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - sleep 3 - done - docker exec -it ${NODE} bash -c "cli_gc get all" fi # <<<< diff --git a/test/ebpf/test_ifindex_gc_05.sh b/test/ebpf/test_ifindex_gc_05.sh index 32f6165..f302855 100755 --- a/test/ebpf/test_ifindex_gc_05.sh +++ b/test/ebpf/test_ifindex_gc_05.sh @@ -204,8 +204,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -215,15 +213,6 @@ else echo "[$i] Sessions:" ./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID} $i > /dev/null done - - echo "Waiting ~20s for final cleanup..." - for (( i=1; i<9; i++ )) - do - echo "[$i/8] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - sleep 3 - done - docker exec -it ${NODE} bash -c "cli_gc get all" fi # <<<< diff --git a/test/ebpf/test_ifindex_gc_06.sh b/test/ebpf/test_ifindex_gc_06.sh index 99cbf3c..76ceef1 100755 --- a/test/ebpf/test_ifindex_gc_06.sh +++ b/test/ebpf/test_ifindex_gc_06.sh @@ -204,8 +204,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -218,15 +216,6 @@ else ./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID} $i > /dev/null done done - - echo "Waiting ~20s for final cleanup..." - for (( i=1; i<9; i++ )) - do - echo "[$i/8] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - sleep 3 - done - docker exec -it ${NODE} bash -c "cli_gc get all" fi # <<<< diff --git a/test/ebpf/test_ifindex_gc_07.sh b/test/ebpf/test_ifindex_gc_07.sh index a2c24de..6714cd4 100755 --- a/test/ebpf/test_ifindex_gc_07.sh +++ b/test/ebpf/test_ifindex_gc_07.sh @@ -204,8 +204,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -218,15 +216,6 @@ else ./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID} $i > /dev/null done done - - echo "Waiting ~20s for final cleanup..." - for (( i=1; i<9; i++ )) - do - echo "[$i/8] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all" | grep 'ENCAP (' | wc -l - sleep 3 - done - docker exec -it ${NODE} bash -c "cli_gc get all" fi # <<<< diff --git a/test/ebpf/test_ses_2gw_01.sh b/test/ebpf/test_ses_2gw_01.sh index c79d507..e2432f1 100755 --- a/test/ebpf/test_ses_2gw_01.sh +++ b/test/ebpf/test_ses_2gw_01.sh @@ -134,8 +134,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -153,13 +151,6 @@ else fi fi -docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - -echo "Waiting 3s" -sleep 3 - -docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - echo -e "\nCreating session #2" TMP=$(./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID}) if [ "${VERBOSE}" ]; then @@ -172,13 +163,6 @@ else RETURN=1 fi -for (( i=1; i<10; i++ )) -do - echo "[$i/10] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - sleep 1 -done - # INFRA & PFC: cleanup topology if [ "${VERBOSE}" ]; then docker exec -it ${PROXY} bash -c "pfc_delete.sh ${GROUP_ID} ${SERVICE_ID}" diff --git a/test/ebpf/test_ses_2gw_02.sh b/test/ebpf/test_ses_2gw_02.sh index c5a2ffb..eec7425 100755 --- a/test/ebpf/test_ses_2gw_02.sh +++ b/test/ebpf/test_ses_2gw_02.sh @@ -134,8 +134,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -153,13 +151,6 @@ else fi fi -docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - -echo -e "\nWaiting 3s" -sleep 3 - -docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - echo -e "\nRefreshing session #1" TMP=$(./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID} 5555) if [ "${VERBOSE}" ]; then @@ -172,13 +163,6 @@ else RETURN=1 fi -for (( i=1; i<10; i++ )) -do - echo "[$i/10] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - sleep 1 -done - # INFRA & PFC: cleanup topology if [ "${VERBOSE}" ]; then docker exec -it ${PROXY} bash -c "pfc_delete.sh ${GROUP_ID} ${SERVICE_ID}" diff --git a/test/ebpf/test_ses_2gw_03.sh b/test/ebpf/test_ses_2gw_03.sh index 8fcce95..a065d6c 100755 --- a/test/ebpf/test_ses_2gw_03.sh +++ b/test/ebpf/test_ses_2gw_03.sh @@ -134,8 +134,6 @@ do sleep 1 done -docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - if [ ! "$(docker exec -it ${PROXY} bash -c "cli_tunnel get ${TUNNEL_ID}" | grep "TUN" | grep ${TUNNEL_ID} | grep -v "0.0.0.0:0")" ] ; then echo -e "\nGUE Ping for '${SERVICE_NAME}' \e[31mFAILED\e[0m\n" RETURN=1 @@ -153,13 +151,6 @@ else fi fi -for (( i=1; i<10; i++ )) -do - echo "[$i/10] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - sleep 1 -done - echo -e "\nRecreating session #1" TMP=$(./${SERVICE_TYPE}_check.sh ${CLIENT} ${PROXY_IP} ${PROXY_PORT} ${SERVICE_ID} 5555) if [ "${VERBOSE}" ]; then @@ -172,13 +163,6 @@ else RETURN=1 fi -for (( i=1; i<10; i++ )) -do - echo "[$i/10] Sessions:" - docker exec -it ${NODE} bash -c "cli_gc get all | grep 'ENCAP ('" - sleep 1 -done - # INFRA & PFC: cleanup topology if [ "${VERBOSE}" ]; then docker exec -it ${PROXY} bash -c "pfc_delete.sh ${GROUP_ID} ${SERVICE_ID}"