[armhf][sonic-installer] Fix the issue of sonic-installer list after set-default and cleanup#2479
Conversation
|
@carl-nokia @jon-nokia Please review this PR for the sonic-installer list issue on armhf platform |
b85cdb0 to
7f7a321
Compare
…the set-default and cleanup Signed-off-by: mlok <[email protected]>
7f7a321 to
9f4a2da
Compare
|
@Blueve Hi Jing, this is the second PR which is needed for addressing the issue of sonic-installer list for the armhf platform. Please review it. The change of the installer_bootloader_uboot_test.py is not applicable to 202012 and 202205 branch since this file doesn't exist these two branches. |
Will you submit PR to 202012 and 202205? |
…set-default and cleanup (#2479) What I did sonic-installer list will throw a exception when install images as the following step (onie-nos-install ) Install first image A (sonic-installer) Install Image B and not reboot it (sonic-installer) set default to back to Image A sudo sonic-installer cleanup At this time, executing sonic-installer list will throw exception How I did it Modify the get_next_image() in uboot.py to check and return index 1 when the images list contains two elements. This PR should work with sonic-net/sonic-buildimage#12609 This PR is needed by branch 202012 and 2022o5 Signed-off-by: mlok <[email protected]>
|
This commit could not be cleanly cherry-picked to 202012. Please submit another PR. |
…set-default and cleanup (sonic-net#2479) What I did sonic-installer list will throw a exception when install images as the following step (onie-nos-install ) Install first image A (sonic-installer) Install Image B and not reboot it (sonic-installer) set default to back to Image A sudo sonic-installer cleanup At this time, executing sonic-installer list will throw exception How I did it Modify the get_next_image() in uboot.py to check and return index 1 when the images list contains two elements. This PR should work with sonic-net/sonic-buildimage#12609 This PR is needed by branch 202012 and 2022o5 Signed-off-by: mlok <[email protected]> (cherry picked from commit d1ca2cd)
I have created the following PR to 202012. Please review it |
… of sonic-installer list after set-default and cleanup (#2479) (#2497) What I did sonic-installer list will throw a exception when install images as the following step (onie-nos-install ) Install first image A (sonic-installer) Install Image B and not reboot it (sonic-installer) set default to back to Image A sudo sonic-installer cleanup At this time, executing sonic-installer list will throw exception How I did it Modify the get_next_image() in uboot.py to check and return index 1 when the images list contains two elements. This PR should work with sonic-net/sonic-buildimage#12609 This PR is needed by branch 202012 and 2022o5 Signed-off-by: mlok <[email protected]> (cherry picked from commit d1ca2cd)
…set-default and cleanup (sonic-net#2479) What I did sonic-installer list will throw a exception when install images as the following step (onie-nos-install ) Install first image A (sonic-installer) Install Image B and not reboot it (sonic-installer) set default to back to Image A sudo sonic-installer cleanup At this time, executing sonic-installer list will throw exception How I did it Modify the get_next_image() in uboot.py to check and return index 1 when the images list contains two elements. This PR should work with sonic-net/sonic-buildimage#12609 This PR is needed by branch 202012 and 2022o5 Signed-off-by: mlok <[email protected]>
…set-default and cleanup (sonic-net#2479) What I did sonic-installer list will throw a exception when install images as the following step (onie-nos-install ) Install first image A (sonic-installer) Install Image B and not reboot it (sonic-installer) set default to back to Image A sudo sonic-installer cleanup At this time, executing sonic-installer list will throw exception How I did it Modify the get_next_image() in uboot.py to check and return index 1 when the images list contains two elements. This PR should work with sonic-net/sonic-buildimage#12609 This PR is needed by branch 202012 and 2022o5 Signed-off-by: mlok <[email protected]>
|
202012 branch PR merged: #2497 |
What I did
sonic-installer list will throw a exception when install images as the following step
(onie-nos-install ) Install first image A
(sonic-installer) Install Image B and not reboot it
(sonic-installer) set default to back to Image A
sudo sonic-installer cleanup
At this time, executing sonic-installer list will throw exception
How I did it
Modify the get_next_image() in uboot.py to check and return index 1 when the images list contains two elements.
This PR should work with sonic-net/sonic-buildimage#12609
This PR is needed by branch 202012 and 2022o5
How to verify it
Using the following test case to verify it
Case 1:
Case 2:
6) sonic-installer install an image C (SONIC-OS-202205.0-dirty-20221104.050348)
7) sonic-installer list. It should lis image as expected
Case 3:
8) reboot the system.
9) sonic-installer list
Case 4
10) sonic-installer install the image A.
11) it should be indicated that the image has been installed and just set to default.
case 5:
12 execute sonic-installer list
Case 6:
13) reboot the device
14) and sonic-installer list
Case 7:
15) sonic-installer set-default to image C (SONIC-OS-202205.0-dirty-20221104.050348)
16) sonic-installer list
Case 8:
17) reboot the device
18) sonic-installer list
Case 9:
19) install image B (SONiC-OS-202205.0-dirty-20221104.050857)
20) sonic-installer list
Case 10:
21) reboot the device
22) sonic-installer list
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)