File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ lazy_static! {
314314 // allocate more memory than is physically available
315315 map. insert( "/proc/sys/vm/overcommit_memory" , "1" ) ;
316316
317- // Enable automatic expiration of nodest connections
317+ // Enable automatic expiration of nodest connections in IPVS
318318 map. insert( "/proc/sys/net/ipv4/vs/expire_nodest_conn" , "1" ) ;
319319 map
320320 } ;
@@ -329,9 +329,12 @@ async fn init_vm_rootfs() -> Result<()> {
329329
330330 // Set default sysctl
331331 for sysctl in DEFAULT_SYSCTL . iter ( ) {
332+ if !Path :: new ( & sysctl. 0 ) . exists ( ) {
333+ continue ;
334+ }
332335 tokio:: fs:: write ( & sysctl. 0 , & sysctl. 1 )
333336 . await
334- . map_err ( io_error ! ( e, "failed to set cgroup hierarchy to 1 " ) ) ?;
337+ . map_err ( io_error ! ( e, "failed to write kernel parameter " ) ) ?;
335338 }
336339
337340 Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments