@@ -7,7 +7,6 @@ use crate::{network, vm};
77use hyper_util:: rt:: TokioIo ;
88use isolated_container_service:: isolated_container_service_server:: IsolatedContainerService ;
99use log:: info;
10- use std:: io:: Write ;
1110use std:: sync:: Arc ;
1211use std:: { collections:: HashMap , sync:: Mutex } ;
1312use std:: { fmt:: Debug , io, path:: PathBuf , time} ;
@@ -72,7 +71,7 @@ fn handle_error(e: vm::Error) -> tonic::Status {
7271async fn get_channel ( path : String ) -> Result < Channel , Error > {
7372 async fn get_channel ( path : String ) -> Result < Channel , Error > {
7473 let channel = Endpoint :: try_from ( "http://[::]:50051" )
75- . map_err ( |e | Error :: Failed ) ?
74+ . map_err ( |_ | Error :: Failed ) ?
7675 . connect_with_connector ( service_fn ( move |_: Uri | {
7776 let path = path. clone ( ) ;
7877 async move {
@@ -108,7 +107,7 @@ async fn get_channel(path: String) -> Result<Channel, Error> {
108107 }
109108 } ) )
110109 . await
111- . map_err ( |e | Error :: Failed ) ?;
110+ . map_err ( |_ | Error :: Failed ) ?;
112111 Ok ( channel)
113112 }
114113
@@ -146,10 +145,8 @@ impl IsolatedContainerService for IsolatedContainerAPI {
146145 2 ,
147146 4294967296 ,
148147 vm:: BootMode :: KernelBoot ( vm:: KernelBootMode {
149- // kernel: PathBuf::from("/usr/share/feos/vmlinuz"),
150- kernel : PathBuf :: from ( "/home/lukasfrank/dev/FeOS/target/kernel/vmlinuz" ) ,
151- initramfs : PathBuf :: from ( "/home/lukasfrank/dev/FeOS/target/initramfs.zst" ) ,
152- // initramfs: PathBuf::from("/usr/share/feos/initramfs"),
148+ kernel : PathBuf :: from ( "/usr/share/feos/vmlinuz" ) ,
149+ initramfs : PathBuf :: from ( "/usr/share/feos/initramfs" ) ,
153150 // TODO
154151 cmdline : "console=tty0 console=ttyS0,115200 intel_iommu=on iommu=pt"
155152 . to_string ( ) ,
@@ -223,7 +220,7 @@ impl IsolatedContainerService for IsolatedContainerAPI {
223220 let request = tonic:: Request :: new ( RunContainerRequest {
224221 uuid : container_id. to_string ( ) ,
225222 } ) ;
226- let response = client. run_container ( request) . await ?;
223+ client. run_container ( request) . await ?;
227224
228225 Ok ( Response :: new (
229226 isolated_container_service:: RunContainerResponse { } ,
@@ -261,8 +258,6 @@ impl IsolatedContainerService for IsolatedContainerAPI {
261258 ) -> Result < Response < isolated_container_service:: StateContainerResponse > , Status > {
262259 info ! ( "Got state_container request" ) ;
263260
264- let container_id: String = request. get_ref ( ) . uuid . clone ( ) ;
265-
266261 let vm_id: String = request. get_ref ( ) . uuid . clone ( ) ;
267262 let vm_id = Uuid :: parse_str ( & vm_id)
268263 . map_err ( |_| Status :: invalid_argument ( "failed to parse uuid" ) ) ?;
0 commit comments