Skip to content

[fast-reboot] Check if ASIC config has changed before warm reboot#621

Merged
daall merged 6 commits intosonic-net:masterfrom
daall:fast-reboot-asic-config-check
Sep 3, 2019
Merged

[fast-reboot] Check if ASIC config has changed before warm reboot#621
daall merged 6 commits intosonic-net:masterfrom
daall:fast-reboot-asic-config-check

Conversation

@daall
Copy link
Contributor

@daall daall commented Aug 26, 2019

- What I did
I modified the fast-reboot script to check that certain ASIC configurations haven't changed between the source and destination SONiC image before performing the warm reboot.

- How I did it
sonic-net/sonic-buildimage#3384 adds the relevant checksums at build time. I wrote a script to fetch these checksums from the filesystem and check that they match. This script is called as a pre-check in the warm reboot script.

- How to verify it
I built two SONiC images with the same checksum and verified that warm reboot proceeded normally. I also built a third image with a different checksum and verified that warm reboot was aborted when attempting to boot from one of the other two images.

- Previous command output (if the output of a command-line utility has changed)
N/A

- New command output (if the output of a command-line utility has changed)
N/A

-->
DEPENDS sonic-net/sonic-buildimage#3384

* Adds script to compare checksums for config files between SONiC images
* Adds pre-check to fast reboot script to confirm config files match before performing fast reboot

Signed-off-by: Danny Allen [email protected]
@daall daall requested review from pavel-shirshov and yxieca August 26, 2019 21:58
@daall daall marked this pull request as ready for review August 26, 2019 22:15
@daall daall changed the title [fast-reboot] Check if ASIC config has changed before fast reboot [fast-reboot] Check if ASIC config has changed before warm reboot Aug 28, 2019
@daall daall merged commit 4024019 into sonic-net:master Sep 3, 2019
@daall daall deleted the fast-reboot-asic-config-check branch September 3, 2019 21:21
yxieca pushed a commit that referenced this pull request Sep 5, 2019
[fast-reboot] Check if ASIC config has changed before fast reboot
* Adds script to compare checksums for config files between SONiC images
* Adds pre-check to fast reboot script to confirm config files match before performing fast reboot

Signed-off-by: Danny Allen <[email protected]>

* Fix formatting

* Incorporate feedback

* Add check for reboot type and override ability

* Clean up error checking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants