File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ create_disk() {
339339 # The partition is the rootfs content
340340 info " Creating partitions"
341341 parted -s -a optimal " ${image} " -- \
342- mklabel msdos \
342+ mklabel gpt \
343343 mkpart primary " ${fs_type} " " ${part_start} " M " ${rootfs_end} " M
344344
345345 OK " Partitions created"
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