Skip to content

Commit

Permalink
Add ping source address for heal tests (#7748)
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
  • Loading branch information
glazychev-art authored Nov 15, 2022
1 parent 14c2971 commit 9f92298
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions examples/heal/dataplane-interrupt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ NSE=$(kubectl get pods -l app=nse-kernel -n ns-dataplane-interrupt --template '{

Ping from NSC to NSE:
```bash
kubectl exec ${NSC} -n ns-dataplane-interrupt -- ping -c 4 172.16.1.100
kubectl exec ${NSC} -n ns-dataplane-interrupt -- ping -c 4 172.16.1.100 -I 172.16.1.101
```

Ping from NSE to NSC:
```bash
kubectl exec ${NSE} -n ns-dataplane-interrupt -- ping -c 4 172.16.1.101
kubectl exec ${NSE} -n ns-dataplane-interrupt -- ping -c 4 172.16.1.101 -I 172.16.1.100
```

Run a pinger process in the background. The pinger will run until it encounters missing packets.
Expand All @@ -52,7 +52,7 @@ PINGER_PATH=/tmp/done-${RANDOM}
kubectl exec ${NSC} -n ns-dataplane-interrupt -- sh -c '
PINGER_PATH=$1; rm -f "$PINGER_PATH"
seq=0
ping -i 0.2 172.16.1.100 | while :; do
ping -i 0.2 172.16.1.100 -I 172.16.1.101 | while :; do
read -t 1 line || { echo ping timeout; touch $PINGER_PATH; break; }
seq1=$(echo $line | sed -n "s/.* seq=\([0-9]\+\) .*/\1/p")
[ "$seq1" ] || continue
Expand All @@ -76,12 +76,12 @@ kubectl exec ${NSC} -n ns-dataplane-interrupt -- sh -c 'timeout 10 sh -c "while

Ping from NSC to NSE:
```bash
kubectl exec ${NSC} -n ns-dataplane-interrupt -- ping -c 4 172.16.1.100
kubectl exec ${NSC} -n ns-dataplane-interrupt -- ping -c 4 172.16.1.100 -I 172.16.1.101
```

Ping from NSE to NSC:
```bash
kubectl exec ${NSE} -n ns-dataplane-interrupt -- ping -c 4 172.16.1.101
kubectl exec ${NSE} -n ns-dataplane-interrupt -- ping -c 4 172.16.1.101 -I 172.16.1.100
```

## Cleanup
Expand Down
10 changes: 5 additions & 5 deletions examples/heal/local-nse-death/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ NSE=$(kubectl get pods -l app=nse-kernel -n ns-local-nse-death --template '{{ran

Ping from NSC to NSE:
```bash
kubectl exec ${NSC} -n ns-local-nse-death -- ping -c 4 172.16.1.100
kubectl exec ${NSC} -n ns-local-nse-death -- ping -c 4 172.16.1.100 -I 172.16.1.101
```

Ping from NSE to NSC:
```bash
kubectl exec ${NSE} -n ns-local-nse-death -- ping -c 4 172.16.1.101
kubectl exec ${NSE} -n ns-local-nse-death -- ping -c 4 172.16.1.101 -I 172.16.1.100
```

Stop NSE pod:
Expand All @@ -52,7 +52,7 @@ kubectl scale deployment nse-kernel -n ns-local-nse-death --replicas=0
```

```bash
kubectl exec ${NSC} -n ns-local-nse-death -- ping -c 4 172.16.1.100 2>&1 | egrep "100% packet loss|Network unreachable"
kubectl exec ${NSC} -n ns-local-nse-death -- ping -c 4 172.16.1.100 -I 172.16.1.101 2>&1 | egrep "100% packet loss|Network unreachable|can't set multicast source"
```

Apply patch:
Expand Down Expand Up @@ -80,12 +80,12 @@ Ping should pass with newly configured addresses.

Ping from NSC to new NSE:
```bash
kubectl exec ${NSC} -n ns-local-nse-death -- ping -c 4 172.16.1.102
kubectl exec ${NSC} -n ns-local-nse-death -- ping -c 4 172.16.1.102 -I 172.16.1.103
```

Ping from new NSE to NSC:
```bash
kubectl exec ${NEW_NSE} -n ns-local-nse-death -- ping -c 4 172.16.1.103
kubectl exec ${NEW_NSE} -n ns-local-nse-death -- ping -c 4 172.16.1.103 -I 172.16.1.102
```

## Cleanup
Expand Down

0 comments on commit 9f92298

Please sign in to comment.