[warm reboot] save config after upgrading into new image#1003
Merged
yxieca merged 3 commits intosonic-net:masterfrom Jul 11, 2019
Merged
[warm reboot] save config after upgrading into new image#1003yxieca merged 3 commits intosonic-net:masterfrom
yxieca merged 3 commits intosonic-net:masterfrom
Conversation
…ter upgrade Signed-off-by: Ying Xie <ying.xie@microsoft.com>
When new image is defined, test removed /host/config_db.json before warm rebooting. So after the device boots up, it will miss /etc/sonic/config_db.json. It is not an issue for the device to stay up. But it will be an issue when device reboot again (cold or fast). Signed-off-by: Ying Xie <ying.xie@microsoft.com>
pavel-shirshov
approved these changes
Jul 11, 2019
neethajohn
approved these changes
Jul 11, 2019
Collaborator
Author
|
Also tested with fast-reboot into new image. fast-reboot will re-generate config_db with existing minigraph. The test didn't trigger config save and still passed config_db.json detection. |
yxieca
added a commit
that referenced
this pull request
Jul 11, 2019
* [warm/fast reboot] make sure that /etc/sonic/config_db.json exsits after upgrade Signed-off-by: Ying Xie <ying.xie@microsoft.com> * [warm reboot] save config after warm reboot into new image When new image is defined, test removed /host/config_db.json before warm rebooting. So after the device boots up, it will miss /etc/sonic/config_db.json. It is not an issue for the device to stay up. But it will be an issue when device reboot again (cold or fast). Signed-off-by: Ying Xie <ying.xie@microsoft.com> * review comments
kazinator-arista
pushed a commit
to kazinator-arista/sonic-mgmt
that referenced
this pull request
Mar 4, 2026
5331ecd [vslib]: Fix MACsec bug in SCI and XPN (sonic-net#1003) ac04509 Fix build issues on gcc-10 (sonic-net#999) 1b8ce97 [pipeline] Download swss common artifact in a separated directory (sonic-net#995) 7a2e096 Change sonic-buildimage.vs artifact source from CI build to official build. (sonic-net#992) d5866a3 [vslib]: fix create MACsec SA error (sonic-net#986) f36f7ce Added Support for enum query capability of Nexthop Group Type. (sonic-net#989) 323b89b Support for MACsec statistics (sonic-net#892) 26a8a12 Prevent other notification event storms to keep enqueue unchecked and drained all memory that leads to crashing the switch router (sonic-net#968) 0cb253a Fix object availability conversion (sonic-net#974)
sdszhang
pushed a commit
to sdszhang/sonic-mgmt
that referenced
this pull request
Mar 23, 2026
… skip comparison in … (sonic-net#1003) <!-- Please make sure you've read and understood our contributing guidelines; https://github.com/sonic-net/SONiC/blob/gh-pages/CONTRIBUTING.md Please provide following information to help code review process a bit easier: --> ### Description of PR <!-- - Please include a summary of the change and which issue is fixed. - Please also include relevant motivation and context. Where should reviewer start? background context? - List any dependencies that are required for this change. --> Summary: Skip the state-db key TRANSCEIVER_STATUS_FLAG_CLEAR_TIME in test_add_rack Fixes # (issue) ### Type of change <!-- - Fill x for your type of change. - e.g. - [x] Bug fix --> - [ ] Bug fix - [ ] Testbed and Framework(new/improvement) - [ ] New Test case - [ ] Skipped for non-supported platforms - [x] Test case improvement ### Back port request - [ ] 202205 - [ ] 202305 - [ ] 202311 - [ ] 202405 - [ ] 202411 - [x] 202505 ### Approach #### What is the motivation for this PR? test_add_rack currently checks teh value of key "TRANSCEIVER_STATUS_FLAG_CLEAR_TIME|Ethernetxxx" while the value of the key contains date and time. The key is for optical transaceivers so that when we have optical transceivers we will get state db comparison failure. We need to skip the comparison for these keys error log messages _INFO helpers:helpers.py:60 /root/mars/workspace/sonic-mgmt/tests/common/configlet/utils.py:289:22:59:12 compare str failed: ['Sat Jul 26 19:49:35 2025'] != ['Sat Jul 26 19:54:27 2025'] ERROR helpers:helpers.py:60 /root/mars/workspace/sonic-mgmt/tests/common/configlet/utils.py:360:22:59:12 state-db.json: mismatch key:TRANSCEIVER_STATUS_FLAG_CLEAR_TIME|Ethernet144 ............_ #### How did you do it? skip the comparison of key "TRANSCEIVER_STATUS_FLAG_CLEAR_TIME|Ethernetxxx" in state-db #### How did you verify/test it? verified test_add_rack test on a setup with optical transceivers can pass with the PR #### Any platform specific information? #### Supported testbed topology if it's a new test case? ### Documentation <!-- (If it's a new feature, new test case) Did you update documentation/Wiki relevant to your implementation? Link to the wiki page? -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Fixes # (issue)
Type of change
Approach
How did you do it?
When new image is defined, test removed /host/config_db.json
before warm rebooting. So after the device boots up, it will
miss /etc/sonic/config_db.json. It is not an issue for the
device to stay up. But it will be an issue when device reboot
again (cold or fast).
Signed-off-by: Ying Xie ying.xie@microsoft.com
How did you verify/test it?
Invoke warm reboot test and specify a new target image with first commit only. test failed when detected missing /etc/sonic/config_db.json
Rerun test with both commits and the test passes.