You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deployed a two-replica fleet to Linux VMs behind a Caddy load balancer
doing active health checks. Every one of these passed the unit suite and
the dry run, and every one broke a real deploy.
setup ran deploy-user commands from root's home. sudo inherits the
caller's working directory, and setup normally runs over SSH as root
whose home is mode 700. Node's spawn() returns EACCES from an unreadable
cwd, so `pm2 startup` failed on the documented first-run path with a
message naming the node binary rather than the cause. Now runs with -H
from the target user's home.
--no-deploy-user did nothing. Commander turns it into deployUser: false,
not noDeployUser: true, so the option was read as undefined and the user
was created anyway.
Caddy was never installed on fleet replicas. Both install gates tested
app.domain, and a fleet replica deliberately has none — but it still
needs Caddy for the readiness endpoint. The first deploy died writing its
site file into a directory that was never created.
The health check required primary-pinned processes on every replica. A
placement: 'primary' worker is absent from secondary replicas by design,
so placement working correctly is what failed the health check.
configureAll wrote Caddy sites and never reloaded. Only the blue-green
path reloaded, and it does so for its own colour flip — so a frontend, a
recreate backend, and every fleet replica wrote a site that never took
effect. Pre-existing, not fleet-specific.
Also: a fleet replica now answers to the app's domain as well as its
private address. A load balancer forwards the client's Host, which
matched neither the private-address site nor anything else, so real
traffic fell through to Caddy's welcome page while the health check
passed. The domain is bound http:// only, so no replica requests a
certificate and the ACME race the design avoids stays avoided.
0 commit comments