Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ping source address to heal tests #7748

Merged
merged 1 commit into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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