[armhf][sonic-installer] Fix an issue of the sonic-installer install after the cleanup#12609
Conversation
…mage after sonic-installer clean Signed-off-by: mlok <[email protected]>
|
@carl-nokia @jon-nokia Please review the platform.conf change for the armhf platform installation issue |
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…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]>
|
Let's merge this PR after all sonic-utilites submodule advanced with new fix |
…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]>
|
@Blueve I've cherry-picked the utilities PR to 202205. Are you going to move utilities submodule head for master then merge this PR? |
|
Hi @mlok-nokia , can you help advance sonic-utilities submodule for master and internal branches? Then we can merge this PR and cherry-pick to 202205 |
…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)
… 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)
|
Hi Ying, This PR have NO dependency with other PR in submodule sonic-utilities. |
Hi Jing, This PR has NO dependency with other PR. They address different issues. Thanks. |
…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]>
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…mage after sonic-installer clean (sonic-net#12609) Signed-off-by: mlok <[email protected]> Signed-off-by: mlok <[email protected]>
|
Cherry-pick PR to 202205: #12977 |
…mage after sonic-installer clean (#12609) Signed-off-by: mlok <[email protected]> Signed-off-by: mlok <[email protected]>
…mage after sonic-installer clean (#12609) Signed-off-by: mlok <[email protected]> Signed-off-by: mlok <[email protected]>
…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]>
Why I did it
When using sonic-installer to set-default and cleanup image or install a third image as the following steps, issues ocur.
At this time, executing sonic-installer list will throw exception
How I did it
When install a image without rebooting, uboot setting is not able to identify which (sonic_version_ sonic_version_2) should be use for the next image installed or cleanup after the set default. Modified the platform.conf to use the current running image from /proc/cmdline to identify eother sonic_version_ or sonic_version_2 should be used for the new installation.
This PR work with sonic-net/sonic-utilities#2479
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
Which release branch to backport (provide reason below if selected)
Description for the changelog
Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)