bluegreen-deploy.sh cannot deploy devices, and its cutover sed corrupts the colour maps #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while deploying the devices#121 hotfix (2026-07-09). Two independent bugs in
instances/services/scripts/bluegreen-deploy.sh.1. Devices is undeployable by the script.
It derives the container as
hiveiq-${SERVICE}-${COLOR}, but the real containers arehiveiq-devices-backend-blue/green. WithSERVICE=devices,grep -o "hiveiq-devices-[a-z]*"matcheshiveiq-devices-backend, soACTIVE_COLORresolves to the literal stringbackendandSTANDBY_CONTAINERbecomeshiveiq-devices-blue— which does not exist. WithSERVICE=devices-backendthe map key becomesdevices_backend_backendand the lookup fails.2. The step-5 cutover
sedis a global replace.00-backends.confalso contains the derived colour maps, which list both colours as literal keys:A blue→green cutover rewrites the
bluekey too, producing two identical"hiveiq-incident-green:8081"keys. nginx rejects duplicate map keys, songinx -tfails — after the file has already been modified, and withset -ethe script exits leaving the config broken.Worked around by hand-editing only the
map $host $X_backenddefault line, with a backup andnginx -tbefore reload.Also, separately:
compose/recon.ymlsetsSERVICES_INCIDENT_URL=http://hiveiq-incident-blue:8081, pinning the runninghiveiq-reconto one colour instead of nginx's internal listenerhttp://hiveiq-nginx:8081. It survives cutover only because the old slot stays warm. Same pattern as the stale-backend issue fixed on 2026-06-30.hiveiq-agent-proxy-blueandhiveiq-transactions-bluecarry the same hardcoding but are currently standby.