Skip to content

Commit 28651da

Browse files
authored
[CI] : add logs for e2e tests for easier debugging (#374)
* add logs for e2e tests for easier debugging * run test a bit longer to see if it helps with timeout errors
1 parent c982307 commit 28651da

File tree

8 files changed

+57
-8
lines changed

8 files changed

+57
-8
lines changed

e2e/test/lb-http-body-health-check/chainsaw-test.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ spec:
3838
3939
nbid=$(KUBECONFIG=$KUBECONFIG NAMESPACE=$NAMESPACE LINODE_TOKEN=$LINODE_TOKEN ../scripts/get-nb-id.sh)
4040
41-
for i in {1..10}; do
41+
echo "Nodebalancer ID: $nbid"
42+
43+
for i in {1..20}; do
4244
nbconfig=$(curl -s \
4345
-H "Authorization: Bearer $LINODE_TOKEN" \
4446
-H "Content-Type: application/json" \
@@ -58,6 +60,12 @@ spec:
5860
echo "All conditions met"
5961
break
6062
fi
63+
echo "Conditions not met, retrying in 15 seconds..."
64+
echo "check: $port_80_check"
65+
echo "path: $port_80_path"
66+
echo "body: $port_80_body"
67+
echo "protocol: $port_80_protocol"
68+
echo "up_nodes: $port_80_up_nodes"
6169
sleep 15
6270
done
6371
check:

e2e/test/lb-http-status-health-check/chainsaw-test.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ spec:
3737
set -e
3838
3939
nbid=$(KUBECONFIG=$KUBECONFIG NAMESPACE=$NAMESPACE LINODE_TOKEN=$LINODE_TOKEN ../scripts/get-nb-id.sh)
40+
echo "Nodebalancer id: $nbid"
4041
41-
for i in {1..10}; do
42+
for i in {1..20}; do
4243
nbconfig=$(curl -s \
4344
-H "Authorization: Bearer $LINODE_TOKEN" \
4445
-H "Content-Type: application/json" \
@@ -57,6 +58,11 @@ spec:
5758
echo "All conditions met"
5859
break
5960
fi
61+
echo "Conditions not met, retrying in 15 seconds..."
62+
echo "check: $port_80_check"
63+
echo "path: $port_80_path"
64+
echo "protocol: $port_80_protocol"
65+
echo "up_nodes: $port_80_up_nodes"
6066
sleep 15
6167
done
6268
check:

e2e/test/lb-passive-health-check/chainsaw-test.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ spec:
3838
3939
nbid=$(KUBECONFIG=$KUBECONFIG NAMESPACE=$NAMESPACE LINODE_TOKEN=$LINODE_TOKEN ../scripts/get-nb-id.sh)
4040
41-
for i in {1..10}; do
41+
echo "Nodebalancer ID: $nbid"
42+
43+
for i in {1..20}; do
4244
nbconfig=$(curl -s \
4345
-H "Authorization: Bearer $LINODE_TOKEN" \
4446
-H "Content-Type: application/json" \
@@ -56,6 +58,10 @@ spec:
5658
echo "All conditions met"
5759
break
5860
fi
61+
echo "Conditions not met, retrying in 15 seconds..."
62+
echo "port_80_check: $port_80_check"
63+
echo "port_80_passive: $port_80_passive"
64+
echo "port_80_up_nodes: $port_80_up_nodes"
5965
sleep 15
6066
done
6167
check:

e2e/test/lb-tcp-connection-health-check/chainsaw-test.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ spec:
3838
3939
nbid=$(KUBECONFIG=$KUBECONFIG NAMESPACE=$NAMESPACE LINODE_TOKEN=$LINODE_TOKEN ../scripts/get-nb-id.sh)
4040
41-
for i in {1..10}; do
41+
echo "Nodebalancer ID: $nbid"
42+
43+
for i in {1..20}; do
4244
nbconfig=$(curl -s \
4345
-H "Authorization: Bearer $LINODE_TOKEN" \
4446
-H "Content-Type: application/json" \
@@ -59,6 +61,13 @@ spec:
5961
echo "All conditions met"
6062
break
6163
fi
64+
echo "Conditions not met, retrying in 15 seconds..."
65+
echo "check: $port_80_check"
66+
echo "interval: $port_80_interval"
67+
echo "timeout: $port_80_timeout"
68+
echo "attempts: $port_80_attempts"
69+
echo "protocol: $port_80_protocol"
70+
echo "up_nodes: $port_80_up_nodes"
6271
sleep 15
6372
done
6473
check:

e2e/test/lb-updated-with-nb-id/chainsaw-test.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,16 @@ spec:
5454
kubectl annotate svc svc-test -n $NAMESPACE service.beta.kubernetes.io/linode-loadbalancer-nodebalancer-id=$nbid
5555
sleep 5
5656
57-
for i in {1..10}; do
57+
for i in {1..20}; do
5858
nbid2=$(KUBECONFIG=$KUBECONFIG NAMESPACE=$NAMESPACE LINODE_TOKEN=$LINODE_TOKEN ../scripts/get-nb-id.sh)
5959
6060
if [[ $nbid == $nbid2 ]]; then
6161
echo "Condition met"
6262
break
6363
fi
64+
echo "Condition not met, waiting for 10 seconds and retrying..."
65+
echo "nbid: $nbid"
66+
echo "nbid2: $nbid2"
6467
sleep 10
6568
done
6669
check:

e2e/test/lb-with-http-to-https/chainsaw-test.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,16 @@ spec:
7272
content: |
7373
set -e
7474
IP=$(kubectl get svc svc-test -n $NAMESPACE -o json | jq -r .status.loadBalancer.ingress[0].ip)
75+
echo "loadbalancer ip: $IP"
7576
76-
for i in {1..10}; do
77+
for i in {1..20}; do
7778
port_80=$(curl -s $IP:80 | grep "test-" || true)
7879
port_443=$(curl --resolve linode.test:443:$IP --cacert ../certificates/ca.crt -s https://linode.test:443 | grep "test-" || true)
7980
8081
if [[ -z $port_80 || -z $port_443 ]]; then
82+
echo "pod not reachable on port 80 or 443, retrying..."
83+
echo "port 80: $port_80"
84+
echo "port 443: $port_443"
8185
sleep 20
8286
else
8387
echo "all pods responded"

e2e/test/lb-with-multiple-http-https-ports/chainsaw-test.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,20 @@ spec:
6464
content: |
6565
set -e
6666
IP=$(kubectl get svc svc-test -n $NAMESPACE -o json | jq -r .status.loadBalancer.ingress[0].ip)
67+
echo "loadbalancer ip: $IP"
6768
68-
for i in {1..10}; do
69+
for i in {1..20}; do
6970
port_80=$(curl -s $IP:80 | grep "test-" || true)
7071
port_8080=$(curl -s $IP:8080 | grep "test-" || true)
7172
port_443=$(curl --resolve linode.test:443:$IP --cacert ../certificates/ca.crt -s https://linode.test:443 | grep "test-" || true)
7273
port_8443=$(curl --resolve linode.test:8443:$IP --cacert ../certificates/ca.crt -s https://linode.test:8443 | grep "test-" || true)
7374
7475
if [[ -z $port_80 || -z $port_8080 || -z $port_443 || -z $port_8443 ]]; then
76+
echo "pod not reachable on all ports, retrying in 15 seconds..."
77+
echo "port 80: $port_80"
78+
echo "port 8080: $port_8080"
79+
echo "port 443: $port_443"
80+
echo "port 8443: $port_8443"
7581
sleep 15
7682
else
7783
echo "all pods responded"

e2e/test/lb-with-node-addition/chainsaw-test.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ spec:
3737
3838
nbid=$(KUBECONFIG=$KUBECONFIG NAMESPACE=$NAMESPACE LINODE_TOKEN=$LINODE_TOKEN ../scripts/get-nb-id.sh)
3939
40+
echo "Nodebalancer ID: $nbid"
41+
4042
for i in {1..10}; do
4143
nbconfig=$(curl -s \
4244
-H "Authorization: Bearer $LINODE_TOKEN" \
@@ -53,6 +55,8 @@ spec:
5355
echo "all nodes up"
5456
break
5557
fi
58+
echo "Condition not met, waiting for all nodes to be ready"
59+
echo "port_80_up_nodes: $port_80_up_nodes"
5660
sleep 15
5761
done
5862
check:
@@ -71,8 +75,9 @@ spec:
7175
sleep 180
7276
7377
nbid=$(KUBECONFIG=$KUBECONFIG NAMESPACE=$NAMESPACE LINODE_TOKEN=$LINODE_TOKEN ../scripts/get-nb-id.sh)
78+
echo "Nodebalancer ID: $nbid"
7479
75-
for i in {1..10}; do
80+
for i in {1..20}; do
7681
nbconfig=$(curl -s \
7782
-H "Authorization: Bearer $LINODE_TOKEN" \
7883
-H "Content-Type: application/json" \
@@ -88,6 +93,8 @@ spec:
8893
echo "all nodes up"
8994
break
9095
fi
96+
echo "Condition not met, waiting for all nodes to be ready"
97+
echo "port_80_up_nodes: $port_80_up_nodes"
9198
sleep 20
9299
done
93100

0 commit comments

Comments
 (0)