mirror of
https://github.com/hanzoai/base.git
synced 2026-10-21 03:41:50 +00:00
luxfi/zap v1.2.9 and luxfi/mdns v0.2.1 fix a shutdown that never finished. zeroconf sends its goodbye packet to every interface with no write deadline, so on a host carrying an interface that takes no multicast the write parked forever, and it parked before the socket close that would have broken it. The terminate hook here called Stop and never came back: base released the HTTP listener and then sat there. Kubernetes burned the whole grace period and sent SIGKILL, cutting requests in flight and closing no database cleanly. On a single host the process kept the ZAP port and the replacement could not bind it. The plugin also held its node after Start failed, so terminate stopped a node that had never run. It drops the node instead. That path is worth reading plainly: what a failed Start costs is the INBOUND surface -- the gateway's route to /v1/base/* on this instance. Nothing in this process goes out through this node; the KMS bridge builds its own client and dials its own peer. So the instance still serves HTTP and still reaches its secrets, and taking the process down over it would turn a partial loss into a total one. It stays non-fatal, and the log now says what was actually lost instead of "failed to start ZAP node". What remains wrong is that /v1/health answers 200 either way, so an instance with no inbound ZAP still draws gateway traffic it cannot serve. Health has no seam for a plugin to report through, and inventing one that flips /v1/health to non-200 would pull instances out of rotation for a transport many deployments never use. That is a design decision, not a patch. Co-authored-by: Hanzo Dev <[email protected]>