File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
crates/sandchest-node/src Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,11 @@ impl JailerConfig {
107107 }
108108
109109 /// Host-visible vsock socket path for a jailed VM.
110+ ///
111+ /// Firecracker creates the host-side UDS at `{uds_path}_{guest_cid}`.
112+ /// Guest CID is always 3, so the actual file is `vsock.sock_3`.
110113 pub fn host_vsock_path ( & self , sandbox_id : & str ) -> PathBuf {
111- self . chroot_root ( sandbox_id) . join ( "vsock.sock " )
114+ self . chroot_root ( sandbox_id) . join ( "vsock.sock_3 " )
112115 }
113116
114117 /// Convert a host-absolute path to a chroot-relative path.
@@ -401,7 +404,7 @@ mod tests {
401404 let path = config. host_vsock_path ( "sb_test123" ) ;
402405 assert_eq ! (
403406 path,
404- PathBuf :: from( "/var/sandchest/jailer/firecracker/sb_test123/root/vsock.sock " )
407+ PathBuf :: from( "/var/sandchest/jailer/firecracker/sb_test123/root/vsock.sock_3 " )
405408 ) ;
406409 }
407410
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ impl SandboxManager {
124124 let dir = format ! ( "{}/sandboxes/{}" , self . node_config. data_dir, sandbox_id) ;
125125 SandboxPaths {
126126 api_socket : format ! ( "{}/api.sock" , dir) ,
127- vsock : format ! ( "{}/vsock.sock " , dir) ,
127+ vsock : format ! ( "{}/vsock.sock_3 " , dir) ,
128128 chroot_root : None ,
129129 data_dir : dir. clone ( ) ,
130130 dir,
You can’t perform that action at this time.
0 commit comments