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

[build_debian] Include checksum of ASIC config files in SONiC filesystem #3384

Merged
merged 9 commits into from
Sep 6, 2019

Conversation

daall
Copy link
Contributor

@daall daall commented Aug 26, 2019

- What I did
I modified the build_debian.sh script to include a checksum of ASIC configuration files in the /etc/sonic directory of the built SONiC image.

- How I did it
I wrote a script to read through a static list of configuration files (at this stage, only those found in sonic-swss/swssconfig/samples) and generate an MD5 checksum of those configuration files.

- How to verify it
Build a new SONiC image and verify that fsroot/etc/sonic contains an asic_config_checksum file.

- Description for the changelog

Include checksum of ASIC config files in SONiC filesystem.

- A picture of a cute animal (not mandatory but encouraged)
cute animal

* Adds script to generate checksums for ASIC config files
* Adds step to build_debian that copies ASIC config checksum into SONiC filesystem

Signed-off-by: Danny Allen daall@microsoft.com
@daall daall marked this pull request as ready for review August 26, 2019 23:20
@pavel-shirshov
Copy link
Contributor

The script could be exchanged to
find src/sonic-swss/swssconfig/sample/ -type f -exec openssl md5 {} +

@daall
Copy link
Contributor Author

daall commented Aug 28, 2019

The script could be exchanged to
find src/sonic-swss/swssconfig/sample/ -type f -exec openssl md5 {} +

This is actually originally how I approached this. The issue is that some of the files in sample are actually just samples, so hashing all of them may have some unintended consequences in the future.

In addition, we may include more files in the future, so it seemed a little safer to write a more general script with that in mind.

@daall
Copy link
Contributor Author

daall commented Sep 5, 2019

retest this please

@daall daall merged commit cfcf305 into sonic-net:master Sep 6, 2019
@daall daall deleted the fast-reboot-asic-config-check branch September 6, 2019 02:41
sridhar-ravindran pushed a commit to sridhar-ravindran/sonic-buildimage that referenced this pull request Sep 6, 2019
…tem (sonic-net#3384)

[build_debian] Generate checksum of ASIC config files

* Adds script to generate checksums for ASIC config files
* Adds step to build_debian that copies ASIC config checksum into SONiC filesystem

Signed-off-by: Danny Allen daall@microsoft.com
yxieca pushed a commit that referenced this pull request Sep 9, 2019
…tem (#3384)

[build_debian] Generate checksum of ASIC config files

* Adds script to generate checksums for ASIC config files
* Adds step to build_debian that copies ASIC config checksum into SONiC filesystem

Signed-off-by: Danny Allen daall@microsoft.com
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.

5 participants