[updategraph] enhance update graph handling#3549
Merged
yxieca merged 1 commit intosonic-net:masterfrom Oct 2, 2019
Merged
Conversation
- after reloading minigraph, write latest version string in the DB. - if old config_db.json file exists, use it and migrate to latest version. - only reload minigraph when config_db.json doesn't exist and minigraph exists. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
prsunny
approved these changes
Oct 2, 2019
jleveque
approved these changes
Oct 2, 2019
jleveque
reviewed
Oct 2, 2019
| echo "Use config_db.json from old system..." | ||
| sonic-cfggen -j /etc/sonic/config_db.json --write-to-db | ||
|
|
||
| if [[ -x /usr/bin/db_migrator.py ]]; then |
Contributor
There was a problem hiding this comment.
Just noting the use of double square brackets here but single brackets elsewhere. I think we need to decide on one to use moving forward.
Contributor
Author
There was a problem hiding this comment.
Yes. this file has fixed use of [] and [[ ]]. We need to unify the usage. I think [[ ]] is safer for some reason I don't remember now. But it could be just a myth :-)
Contributor
Author
|
retest vs please |
yxieca
added a commit
that referenced
this pull request
Oct 2, 2019
- after reloading minigraph, write latest version string in the DB. - if old config_db.json file exists, use it and migrate to latest version. - only reload minigraph when config_db.json doesn't exist and minigraph exists. Signed-off-by: Ying Xie <ying.xie@microsoft.com>
11 tasks
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.
- What I did
exists.
Signed-off-by: Ying Xie ying.xie@microsoft.com
- How to verify it
sonic upgrade