Skip to content

Commit

Permalink
loxilb-iogh-877 Initial support for egress : updated cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Dec 26, 2024
1 parent bc725d3 commit 4c6a60c
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions cicd/egresslb/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ echo SCENARIO-egrlb
sleep 10
code=0

check_egr_conn() {
IP="$1"
if $hexec h1 curl -s --head --connect-timeout 5 http://$IP | grep -i "nginx" > /dev/null; then
echo "Connectivity to http://$IP is OK."
else
echo "Failed to connect to https://$IP"
code=1
fi
}

check_ping() {
IP="$1"
if $hexec h1 ping -c 5 -W 10 "$IP" &> /dev/null; then
Expand All @@ -17,8 +27,10 @@ check_ping() {

echo "Checking egress before HA"

IP_ADDRESS="8.8.8.8"
check_ping $IP_ADDRESS
PING_IP_ADDRESS="8.8.8.8"
CURL_IP_ADDRESS="208.67.222.222"
#check_ping $PING_IP_ADDRESS
check_egr_conn $CURL_IP_ADDRESS

$hexec llb2 curl -X 'POST' \
'http:/127.0.0.1:11111/netlox/v1/config/cistate' \
Expand All @@ -43,7 +55,8 @@ $hexec llb1 curl -X 'POST' \
sleep 10
echo "Checking egress after HA"

check_ping $IP_ADDRESS
#check_ping $IP_ADDRESS
check_egr_conn $CURL_IP_ADDRESS

if [[ $code != 0 ]];then
echo "SCENARIO-egrlb FAILED"
Expand Down

0 comments on commit 4c6a60c

Please sign in to comment.