Name AF_UNIX sockets by node id for self-describing debuggability

Use the node id (UUID) instead of an incrementing counter for the unix
control socket name, so each socket identifies its owning node at a glance
(one ubridge per node => node_id is unique). Falls back to the counter only
when no node id is supplied. A single UUID fits sun_path's 107-byte cap
(~69 bytes), so no project_id is needed.
This commit is contained in:
YueGuobin committed 2026-07-31 23:48:07 +08:00
1 parent 2488c42cd4
commit d729f76856
2 files changed
+13 -7

No files matched your search

+1 -1
View File
@@ -929,7 +929,7 @@ class BaseNode:
transport = self._manager.config.settings.Server.ubridge_control_transport
if not self.ubridge:
self._ubridge_hypervisor = Hypervisor(
self._project, self.ubridge_path, self.working_dir, transport, server_host
self._project, self.ubridge_path, self.working_dir, transport, server_host, self.id
)
log.info(f"Starting new uBridge hypervisor at {self._ubridge_hypervisor.endpoint}")
await self._ubridge_hypervisor.start()