Compare commits
2 Commits
89d8036c6a
...
9112b279d9
| Author | SHA1 | Date | |
|---|---|---|---|
| 9112b279d9 | |||
| 6f4b297733 |
@@ -208,8 +208,19 @@ for CID in $(docker ps -q -f "name=dshackle"); do
|
||||
RC=1
|
||||
continue
|
||||
fi
|
||||
sleep "$SETTLE"
|
||||
# Poll for the handler's completion line instead of sleeping SETTLE: the reload itself
|
||||
# takes ~10-30 ms, but the fixed 3 s sleep was the window in which a removed upstream
|
||||
# was already gone while the gateway still held the old announcements (operator
|
||||
# 2026-09-19). SETTLE is now the upper bound only.
|
||||
DONE_MARK="Reloading config has been completed"
|
||||
LOGS=""
|
||||
for _ in $(seq 1 $(( SETTLE * 20 ))); do
|
||||
LOGS=$(docker logs --since "$T0" "$CID" 2>&1)
|
||||
if echo "$LOGS" | grep -qF "$DONE_MARK" || echo "$LOGS" | grep -qF "$FAIL_MARK" || echo "$LOGS" | grep -qF "$DROP_MARK"; then
|
||||
break
|
||||
fi
|
||||
sleep 0.05
|
||||
done
|
||||
REASON=""
|
||||
if echo "$LOGS" | grep -qF "$FAIL_MARK"; then
|
||||
REASON=$(echo "$LOGS" | grep -F "$FAIL_MARK" | head -1)
|
||||
|
||||
Reference in New Issue
Block a user