Skip to content

Commit

Permalink
Remove last bits of cli_gc
Browse files Browse the repository at this point in the history
We made it obsolete a while back but didn't fully scrape it off the
bottom of our shoe.

Signed-off-by: toby cabot <[email protected]>
  • Loading branch information
caboteria committed Dec 6, 2023
1 parent c5d4b5c commit 2abf76c
Show file tree
Hide file tree
Showing 13 changed files with 2 additions and 132 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ dkms.conf
cli_cfg
cli_tunnel
cli_service
cli_gc
gue_ping_svc_auto
pfc_cli_go

Expand Down
3 changes: 1 addition & 2 deletions src/cli/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
USER_TARGETS := \
cli_cfg \
cli_tunnel \
cli_service \
cli_gc
cli_service

USER_LIBS := -lz -lssl -lcrypto

Expand Down
2 changes: 1 addition & 1 deletion test/docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./

Expand Down
14 changes: 0 additions & 14 deletions test/ebpf/test_ifindex_gc_01.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
# <<<<
Expand Down
11 changes: 0 additions & 11 deletions test/ebpf/test_ifindex_gc_02.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
# <<<<

Expand Down
11 changes: 0 additions & 11 deletions test/ebpf/test_ifindex_gc_03.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
# <<<<

Expand Down
11 changes: 0 additions & 11 deletions test/ebpf/test_ifindex_gc_04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
# <<<<

Expand Down
11 changes: 0 additions & 11 deletions test/ebpf/test_ifindex_gc_05.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
# <<<<

Expand Down
11 changes: 0 additions & 11 deletions test/ebpf/test_ifindex_gc_06.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
# <<<<

Expand Down
11 changes: 0 additions & 11 deletions test/ebpf/test_ifindex_gc_07.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
# <<<<

Expand Down
16 changes: 0 additions & 16 deletions test/ebpf/test_ses_2gw_01.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}"
Expand Down
16 changes: 0 additions & 16 deletions test/ebpf/test_ses_2gw_02.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}"
Expand Down
16 changes: 0 additions & 16 deletions test/ebpf/test_ses_2gw_03.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}"
Expand Down

0 comments on commit 2abf76c

Please sign in to comment.