File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ lazy_static! {
314
314
// allocate more memory than is physically available
315
315
map. insert( "/proc/sys/vm/overcommit_memory" , "1" ) ;
316
316
317
- // Enable automatic expiration of nodest connections
317
+ // Enable automatic expiration of nodest connections in IPVS
318
318
map. insert( "/proc/sys/net/ipv4/vs/expire_nodest_conn" , "1" ) ;
319
319
map
320
320
} ;
@@ -329,9 +329,12 @@ async fn init_vm_rootfs() -> Result<()> {
329
329
330
330
// Set default sysctl
331
331
for sysctl in DEFAULT_SYSCTL . iter ( ) {
332
+ if !Path :: new ( & sysctl. 0 ) . exists ( ) {
333
+ continue ;
334
+ }
332
335
tokio:: fs:: write ( & sysctl. 0 , & sysctl. 1 )
333
336
. 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 " ) ) ?;
335
338
}
336
339
337
340
Ok ( ( ) )
You can’t perform that action at this time.
0 commit comments