Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Sep 3, 2019

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 daall@microsoft.com
scripts/asic_config_check Outdated Show resolved Hide resolved
scripts/fast-reboot Outdated Show resolved Hide resolved
@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
scripts/fast-reboot Outdated Show resolved Hide resolved
@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 <daall@microsoft.com>

* 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