[minigraph][port_config] Consume port_config.json while loading minigraph#1705
Merged
Blueve merged 1 commit intosonic-net:masterfrom Jul 15, 2021
Merged
[minigraph][port_config] Consume port_config.json while loading minigraph#1705Blueve merged 1 commit intosonic-net:masterfrom
Blueve merged 1 commit intosonic-net:masterfrom
Conversation
5 tasks
yxieca
approved these changes
Jul 13, 2021
qiluo-msft
pushed a commit
that referenced
this pull request
Jul 15, 2021
…igraph (#1705) Signed-off-by: Jing Kan [email protected]
Contributor
|
the pr failed unit test on 202012 branch, thus reverted on 202012 branch. @Blueve , can you make sure it is tested on previous branches? |
Contributor
Author
|
Consider there is a known incompatible issue, I removed release branch tags for now. |
5 tasks
Blueve
added a commit
to Blueve/sonic-utilities
that referenced
this pull request
Jul 26, 2021
…igraph (sonic-net#1705) Signed-off-by: Jing Kan [email protected]
Blueve
added a commit
to Blueve/sonic-utilities
that referenced
this pull request
Jul 26, 2021
…igraph (sonic-net#1705) Signed-off-by: Jing Kan [email protected]
Blueve
added a commit
that referenced
this pull request
Jul 26, 2021
…igraph (#1725) * [minigraph][port_config] Consume port_config.json while reloading minigraph (#1705) * Fix build issue for 201911 Signed-off-by: Jing Kan [email protected]
Blueve
added a commit
to Blueve/sonic-utilities
that referenced
this pull request
Jul 27, 2021
…igraph (sonic-net#1705) Signed-off-by: Jing Kan [email protected]
Blueve
added a commit
that referenced
this pull request
Jul 27, 2021
… patch (#1728) * [minigraph][port_config] Consume port_config.json while reloading minigraph (#1705) * [minigraph][port_config] Use imported config.main and add conditional patch Signed-off-by: Jing Kan [email protected]
Blueve
added a commit
that referenced
this pull request
Jul 29, 2021
…igraph (#1726) * [minigraph][port_config] Consume port_config.json while reloading minigraph (#1705) * Fix build issue for 201811 * Remove unrelated change Signed-off-by: Jing Kan [email protected]
Contributor
|
why is this needed for 201911 ? is there any use-case for this ? |
Contributor
Author
This is a method for keeping port state unchanged after reload minigraph. |
raphaelt-nvidia
pushed a commit
to raphaelt-nvidia/sonic-utilities
that referenced
this pull request
Aug 10, 2021
…igraph (sonic-net#1705) Signed-off-by: Jing Kan [email protected]
stepanblyschak
pushed a commit
to stepanblyschak/sonic-utilities
that referenced
this pull request
Apr 28, 2022
1c12a4050fecabd88245c7aa64a61259bc00db3b (HEAD -> 201911, origin/201911)Allowing the first time FEC and AN configuration to be pushed to SAI (sonic-net#1705) (sonic-net#2196) Signed-off-by: Abhishek Dosi <[email protected]>
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
The port state will be reset to up if user use
config load_minigraphto recover configurations.This PR is for supporting consume
port_config.jsonwhile loading minigraph. User can put the statefulport_config.jsonwith minigraph file to keep the port state unchanged after reload minigraph.The
port_config.jsonincludes a segment ofconfig_dbPORT table(we called that segmentconfigletas well) and it will be placed on\etc\sonic\port_config.json, below is a sample:[ { "PORT": { "Ethernet112": { "admin_status": "down" }, "Ethernet116": { "admin_status": "up" } } } ]This feature will only consume the
port_config.jsonwhen the file is existed in\etc\sonic\port_config.json.Please notice that we do not leverage this feature #716 to consume the
port_config.jsondue to the configlet might contains multiple fields for an interface such asmtu,speed, ... however, we just want to consume theadmin_statushere only and there might have some side effects if we update the PORT table only.How I did it
Add code
config load_minigraphcommand to let it consumeport_config.json.How to verify it
Add UTs.
KVM SONiC test:
Before
Prepare
port_config.jsonwith below content:[ { "PORT": { "Ethernet112": { "admin_status": "down" }, "Ethernet116": { "admin_status": "up" } } } ]After
config load_minigraph:Remove
port_config.jsonand runconfig load_minigraphagain: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