This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

spindle/engines/microvm: set vsock to use host cid explicitly

Signed-off-by: dawn <dawn@tangled.org>

author
dawn
date (Jul 26, 2026, 1:20 AM +0300) commit cee20dfb parent 566697c6 change-id vxnyyksk
+7 -4
+1 -1
cmd/spindle-microvm-run/main_linux.go
··· 137 137 if mib := cmd.Uint("memory-mib"); mib > 0 { 138 138 imageSpec.MemoryMiB = int(mib) 139 139 } 140 - ln, err := vsock.Listen(port, nil) 140 + ln, err := vsock.ListenContextID(vsock.Host, port, nil) 141 141 if err != nil { 142 142 return fmt.Errorf("listen on vsock port %d: %w", port, err) 143 143 }
+4 -1
spindle/engines/microvm/agent.go
··· 28 28 } 29 29 30 30 func newAgentHub(port uint32, l *slog.Logger) (*agentHub, error) { 31 - ln, err := vsock.Listen(port, nil) 31 + // bind the host context explicitly. if the local CID resolves to the 32 + // loopback CID (which happens on some systems when vsock_loopback is active), 33 + // Listen() would bind loopback and never see guest VMs 34 + ln, err := vsock.ListenContextID(vsock.Host, port, nil) 32 35 if err != nil { 33 36 return nil, fmt.Errorf("listen for agent on vsock port %d: %w", port, err) 34 37 }
+1 -1
spindle/engines/microvm/read_cache_proxy.go
··· 195 195 if err != nil { 196 196 return nil, 0, err 197 197 } 198 - ln, err := vsock.Listen(port, nil) 198 + ln, err := vsock.ListenContextID(vsock.Host, port, nil) 199 199 if err == nil { 200 200 return ln, port, nil 201 201 }
+1 -1
spindle/engines/microvm/upload_cache_proxy.go
··· 142 142 if err != nil { 143 143 return nil, 0, err 144 144 } 145 - ln, err := vsock.Listen(port, nil) 145 + ln, err := vsock.ListenContextID(vsock.Host, port, nil) 146 146 if err == nil { 147 147 return ln, port, nil 148 148 }