hero_embedderd: bind on HERO_EMBEDDERD_ADDRESS in addition to loopback #35
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_embedder!35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_embedderd_mycelium_bind"
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?
The shell wrapper (service_embedder.nu) already injects the host's
mycelium IPv6 address as HERO_EMBEDDERD_ADDRESS, but the daemon
hardcoded 127.0.0.1, so cross-node access never worked. Now read the
env var, validate it as an IpAddr, and dual-bind: loopback (always, so
in-host tenants and the userspace HERO_EMBEDDERD_URL keep working) +
the resolved address. Wildcard (0.0.0.0 / ::) replaces loopback since
it already covers it; an explicit loopback in the env var is a no-op.
Both the early health-only phase and the real serve phase open one
listener per address. The early phase keeps a oneshot per task so all
listeners release their ports before the real binds. The real phase
shares a single tokio Notify woken by the SIGINT/SIGTERM handler so
all listeners drain gracefully on shutdown. The startup info line now
prints the comma-joined listen list instead of a single bind.