Repository navigation
fix: retry-loop re-provisioning on upstream DB loss - #3
Merged
Merged
Conversation
tcp-over-websocket does not exit on dial error (continue in Accept loop). aldaas.sh re-provisioning was startup-only — dead after first run. Add watchdog: monitor upstream DNS, kill tunnel on failure, re-submit Argo workflow, reconnect. Exponential backoff 1s→30s max.
Alpine busybox ash (/bin/sh) does not support [[ or continue 2. Replace with POSIX-compatible [ -z and SERVICE_READY flag.
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
aldaas client (
aldaas.sh) has re-provisioning architecture (check/tmp/aldaas,argo get,argo submit), but it's startup-only — only works when the container starts fresh.tcp-over-websocket(Go,httpClient.go, unchanged since Mar 2020) doescontinueon dial error — never exits. Container stays Running (restartCount=0),aldaas.shnever re-runs, re-provisioning is dead after first start.When the upstream Argo workflow is deleted (TTL expiry / remove EventSource), the client enters an infinite retry loop to
no such host— never re-provisions a new DB.Solution
Wrap
tcp-over-websocket clientin a retry-loop with a watchdog:while trueloop — never stops, container runs foreverrm -f /tmp/aldaasbefore each re-provision — forces freshargo submittcp-over-websocketruns in background, watchdog monitors upstream DNSnslookupdetects when Service is deleted (DNS record removed)Why DNS check (not local port check)
TCP listener (
net.Listen) is called ONCE at startup and stays open even when dial fails.nc -z 127.0.0.1 $ALDAAS_PORTsucceeds even in broken state. We must check upstream DNS instead.Testing
feature/hr-backend-gatewayon Dandelion cluster (aws-central-1-04-2026)aldaas.sh(1 file)Related
specs/20260729-112813-aldaas-db-lifecycle/in 0_WORK