-
Notifications
You must be signed in to change notification settings - Fork 664
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
[minigraph][port_config] Consume port_config.json while loading minigraph #1705
Conversation
…igraph (#1705) Signed-off-by: Jing Kan jika@microsoft.com
the pr failed unit test on 202012 branch, thus reverted on 202012 branch. @Blueve , can you make sure it is tested on previous branches? |
Consider there is a known incompatible issue, I removed release branch tags for now. |
…igraph (sonic-net#1705) Signed-off-by: Jing Kan jika@microsoft.com
…igraph (sonic-net#1705) Signed-off-by: Jing Kan jika@microsoft.com
…igraph (sonic-net#1705) Signed-off-by: Jing Kan jika@microsoft.com
why is this needed for 201911 ? is there any use-case for this ? |
This is a method for keeping port state unchanged after reload minigraph. |
…igraph (sonic-net#1705) Signed-off-by: Jing Kan jika@microsoft.com
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 <abdosi@microsoft.com>
What I did
The port state will be reset to up if user use
config load_minigraph
to recover configurations.This PR is for supporting consume
port_config.json
while loading minigraph. User can put the statefulport_config.json
with minigraph file to keep the port state unchanged after reload minigraph.The
port_config.json
includes a segment ofconfig_db
PORT table(we called that segmentconfiglet
as well) and it will be placed on\etc\sonic\port_config.json
, below is a sample:This feature will only consume the
port_config.json
when 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.json
due to the configlet might contains multiple fields for an interface such asmtu
,speed
, ... however, we just want to consume theadmin_status
here only and there might have some side effects if we update the PORT table only.How I did it
Add code
config load_minigraph
command to let it consumeport_config.json
.How to verify it
Add UTs.
KVM SONiC test:
Before
Prepare
port_config.json
with below content:After
config load_minigraph
:Remove
port_config.json
and runconfig load_minigraph
again: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