From 4fad12c8bc6ea4f446485fe518b12cc0c71d6ee9 Mon Sep 17 00:00:00 2001 From: jester Date: Tue, 31 Mar 2026 12:07:08 +0000 Subject: [PATCH] Document hardcoded IPs in zlh-agent including compiled constant in update.go --- SCRATCH/hardcoded-ips-agent.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 SCRATCH/hardcoded-ips-agent.md diff --git a/SCRATCH/hardcoded-ips-agent.md b/SCRATCH/hardcoded-ips-agent.md new file mode 100644 index 0000000..bcf1d06 --- /dev/null +++ b/SCRATCH/hardcoded-ips-agent.md @@ -0,0 +1,30 @@ +# Hardcoded IPs in zlh-agent — Need to Fix + +## Artifact server IP (10.60.0.251:8080) — ACTION REQUIRED + +| File | Type | Fix | +|------|------|-----| +| internal/update/update.go:23 | **Compiled constant** | Code change + recompile required | +| internal/provision/common.go:35 | Fallback | Set ZLH_ARTIFACT_BASE_URL env var | +| internal/provcommon/common.go:59 | Fallback | Set ZLH_ARTIFACT_BASE_URL env var | +| scripts/devcontainer/lib/common.sh:16 | Default | Set ZLH_ARTIFACT_BASE_URL env var | +| scripts/devcontainer/dotnet/install.sh:10 | Default | Set ZLH_ARTIFACT_BASE_URL env var | +| scripts/addons/codeserver/install.sh:10 | Default | Set ZLH_ARTIFACT_BASE_URL env var | + +## Action items + +1. **Fix update.go:23** — change the hardcoded constant to read from an env var or config file + - This requires a code change and recompile + - New binary needs to be pushed to zlh-artifacts before deploying to containers + +2. **Set ZLH_ARTIFACT_BASE_URL** — all other references will follow this env var + - Set to new artifacts IP once DHCP is locked down + +## Localhost entries (safe — no changes needed) +- 127.0.0.1 in readiness.go, agent.go, update.go — internal health checks, fine +- 0.0.0.0 in codeserver install.sh + verify.go — bind address, fine + +## Notes +- Until update.go is fixed, agent self-updates will try to reach old artifacts IP +- All new container provisioning uses ZLH_ARTIFACT_BASE_URL so that's fine once env is set +- Prioritize the update.go fix before deploying agent to production containers on new host