bluegreen-deploy.sh does not update env vars in dependent services on slot flip #3

Open
opened 2026-06-29 07:23:08 -04:00 by hiveiq · 0 comments
Owner

Bug

When bluegreen-deploy.sh flips the active slot (blue → green or vice versa), it updates nginx 00-backends.conf but does not update the hardcoded backend URLs in dependent services that call the blue/green services directly (bypassing nginx).

Affected compose files

  • compose/agent-proxy.ymlINCIDENT_SERVICE_URL, SERVICES_DEVICES_URL, SERVICES_FLEET_URL
  • compose/analytics.ymlINCIDENT_SERVICE_URL, SERVICES_DEVICES_URL, SERVICES_FLEET_URL
  • compose/recon.ymlSERVICES_INCIDENT_URL
  • compose/reports.ymlINCIDENT_SERVICE_URL

Impact

Discovered 2026-06-29 after stopping the green standby instances post-maintenance-window. Agent-proxy was forwarding all agent heartbeats and journal events to the stopped hiveiq-incident-green container, silently failing (agent got 200, internal call dropped). Result: 572 AGENT_OFFLINE incidents stuck open, plus dead internal calls in analytics, recon, and reports.

Fix required

bluegreen-deploy.sh must sed the active color in all dependent compose files in addition to updating 00-backends.conf, then run docker compose up -d --no-deps on the affected containers so they pick up the corrected env vars on each slot flip.

Workaround applied 2026-06-29

Manually sed all 4 compose files (green → blue) and restarted agent-proxy, analytics, recon, reports.

## Bug When `bluegreen-deploy.sh` flips the active slot (blue → green or vice versa), it updates nginx `00-backends.conf` but does **not** update the hardcoded backend URLs in dependent services that call the blue/green services directly (bypassing nginx). ## Affected compose files - `compose/agent-proxy.yml` — `INCIDENT_SERVICE_URL`, `SERVICES_DEVICES_URL`, `SERVICES_FLEET_URL` - `compose/analytics.yml` — `INCIDENT_SERVICE_URL`, `SERVICES_DEVICES_URL`, `SERVICES_FLEET_URL` - `compose/recon.yml` — `SERVICES_INCIDENT_URL` - `compose/reports.yml` — `INCIDENT_SERVICE_URL` ## Impact Discovered 2026-06-29 after stopping the green standby instances post-maintenance-window. Agent-proxy was forwarding all agent heartbeats and journal events to the stopped `hiveiq-incident-green` container, silently failing (agent got 200, internal call dropped). Result: 572 AGENT_OFFLINE incidents stuck open, plus dead internal calls in analytics, recon, and reports. ## Fix required `bluegreen-deploy.sh` must sed the active color in all dependent compose files in addition to updating `00-backends.conf`, then run `docker compose up -d --no-deps` on the affected containers so they pick up the corrected env vars on each slot flip. ## Workaround applied 2026-06-29 Manually sed all 4 compose files (green → blue) and restarted agent-proxy, analytics, recon, reports.
hiveiq added the BugPriority/High labels 2026-06-29 07:23:08 -04:00
hiveiq self-assigned this 2026-06-29 07:23:08 -04:00
Sign in to join this conversation.
No Label Bug Priority/High
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hiveiq-src/hiveiq-ops#3