From b7444ba574982f0f169418236bf09ebac057b61d Mon Sep 17 00:00:00 2001 From: DavidZagury <32644413+DavidZagury@users.noreply.github.com> Date: Mon, 21 Jun 2021 07:25:27 +0300 Subject: [PATCH 1/3] [sonic-utilities] Submodule update (#7921) Update sonic-utilities submodule. This include the following commits: 285960d [config]: Update environment file during config reload (#1673) 3f0ecd5 [config] Remove "reset failed" print lines from config reload (#1654) a1c8751 Make the soft-reboot available in the SONiC image on master (#1681) 45e7b71 [Mellanox] Add all results from saisdkdump to the techsupport on Mellanox switches (#1660) --- src/sonic-utilities | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sonic-utilities b/src/sonic-utilities index 19615e3c0c4..45e7b71e837 160000 --- a/src/sonic-utilities +++ b/src/sonic-utilities @@ -1 +1 @@ -Subproject commit 19615e3c0c45bba1c8c8b19c02276732b70da9bc +Subproject commit 45e7b71e83728fa57db9db5c8222a267e9ec6e92 From 0b53a60412979053eae63f40421e49e3b6580aeb Mon Sep 17 00:00:00 2001 From: xumia <59720581+xumia@users.noreply.github.com> Date: Mon, 21 Jun 2021 14:12:25 +0800 Subject: [PATCH 2/3] [ci]: build rpc image for mellanox (#7905) --- .azure-pipelines/azure-pipelines-build.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml index cd56e761e2b..815aa7b9fe1 100644 --- a/.azure-pipelines/azure-pipelines-build.yml +++ b/.azure-pipelines/azure-pipelines-build.yml @@ -32,7 +32,8 @@ jobs: dbg_image: no swi_image: no raw_image: no - sync_rpc_image: no + docker_syncd_rpc_image: no + syncd_rpc_image: no platform_rpc: no ${{ if ne(parameters.jobGroups, '') }}: jobGroups: ${{ parameters.jobGroups }} @@ -44,7 +45,7 @@ jobs: - name: barefoot variables: - sync_rpc_image: yes + docker_syncd_rpc_image: yes platform_rpc: bfn swi_image: yes @@ -53,13 +54,13 @@ jobs: dbg_image: yes swi_image: yes raw_image: yes - sync_rpc_image: yes + docker_syncd_rpc_image: yes platform_rpc: brcm - name: centec variables: dbg_image: yes - sync_rpc_image: yes + docker_syncd_rpc_image: yes platform_rpc: centec - name: centec-arm64 @@ -85,13 +86,14 @@ jobs: - name: mellanox variables: dbg_image: yes - sync_rpc_image: yes + docker_syncd_rpc_image: yes + syncd_rpc_image: yes platform_rpc: mlnx - name: nephos variables: dbg_image: yes - sync_rpc_image: yes + docker_syncd_rpc_image: yes platform_rpc: nephos buildSteps: @@ -113,9 +115,13 @@ jobs: if [ $(raw_image) == yes ]; then make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).raw fi - if [ $(sync_rpc_image) == yes ]; then + if [ $(docker_syncd_rpc_image) == yes ]; then make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/docker-syncd-$(platform_rpc)-rpc.gz fi + if [ $(syncd_rpc_image) == yes ]; then + make $BUILD_OPTIONS ENABLE_SYNCD_RPC=y target/sonic-$(GROUP_NAME).bin + mv target/sonic-mellanox.bin target/sonic-$(GROUP_NAME)-rpc.bin + fi make $BUILD_OPTIONS target/sonic-$(GROUP_NAME).bin fi displayName: "Build sonic image" From 90801dc1b209967ba1a184f32e046daf6ce993cc Mon Sep 17 00:00:00 2001 From: Lijitha ck <68853062+lkunjumon@users.noreply.github.com> Date: Mon, 21 Jun 2021 12:25:02 +0530 Subject: [PATCH 3/3] Support for updating tmpfs size according to Image size (#7484) #### Why I did it while sonic upgrade, Image will be extracted to tmpfs for installation so tmpfs size should be larger than image size. Image installation will fail if image size is larger than tmpfs size. we are facing below error while installing debug image with size greater than tmpfs which is 1.5g in marvell armhf platform. sonic-installer install New image will be installed, continue? [y/N]: y Downloading image... ...99%, 1744 MB, 708 KB/s, 0 seconds left... Installing image SONiC-OS-202012.0-dirty-20210311.224845 and setting it as default... Command: bash /tmp/sonic_image tar: installer/fs.zip: Wrote only 7680 of 10240 bytes tar: installer/onie-image-arm64.conf: Cannot write: No space left on device tar: Exiting with failure status due to previous errors Verifying image checksum ... OK. Preparing image archive ... #### How I did it compare downloaded image size with tmpfs size, if size less than image size update the tmpfs size according to image size. #### How to verify it Install an Image with size larger than tmpfs. we verified by installing debug image with size 1.9gb which is larger than tmpfs size 1.5gb. --- installer/sharch_body.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/installer/sharch_body.sh b/installer/sharch_body.sh index d22fe26b699..e6289371cd5 100644 --- a/installer/sharch_body.sh +++ b/installer/sharch_body.sh @@ -25,6 +25,7 @@ fi echo " OK." +image_size_in_kb=$((($(sed -e '1,/^exit_marker$/d' "$0" | tar --to-stdout -xf - | wc -c) + 1023 ) / 1024)) # Untar and launch install script in a tmpfs cur_wd=$(pwd) export cur_wd @@ -32,6 +33,15 @@ archive_path=$(realpath "$0") tmp_dir=$(mktemp -d) if [ "$(id -u)" = "0" ] ; then mount -t tmpfs tmpfs-installer $tmp_dir || exit 1 + mount_size_in_kb=$(df $tmp_dir | tail -1 | tr -s ' ' | cut -d' ' -f4) + #checking extra 100KB space in tmp_dir, after image extraction + padding=102400 + if [ "$mount_size_in_kb" -le "$((image_size_in_kb + padding))" ]; then + image_size_in_mb=$(((image_size_in_kb + 1023) / 1024)) + #Adding extra 32MB free space for image extraction. + mount_size_in_mb=$((((image_size_in_mb + 31) / 32) * 32)) + mount -o remount,size="${mount_size_in_mb}M" -t tmpfs tmpfs-installer $tmp_dir || exit 1 + fi fi cd $tmp_dir echo -n "Preparing image archive ..."