spike(OPS50): probe gateway via /proc/net/route
Some checks failed
Spike — service postgres via gateway do bridge / probe (push) Failing after 37s
Some checks failed
Spike — service postgres via gateway do bridge / probe (push) Failing after 37s
This commit is contained in:
parent
ef7ae55f2e
commit
9506251cb4
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
- name: Probe gateway
|
||||
run: |
|
||||
set -uo pipefail
|
||||
GW=$(ip route | awk '/default/ {print $3; exit}')
|
||||
GW=$(awk '$2 == "00000000" {split($3, h, ""); ip=""; for (i=1; i<=8; i+=2) ip=ip strtonum("0x" h[i] h[i+1]) (i<8 ? "." : ""); print ip; exit}' /proc/net/route)
|
||||
echo "gateway=$GW"
|
||||
for i in $(seq 1 15); do
|
||||
if (echo > /dev/tcp/"$GW"/5433) 2>/dev/null; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue