Read switch_id of fabric switch from config_db#3102
Read switch_id of fabric switch from config_db#3102prsunny merged 16 commits intosonic-net:masterfrom
Conversation
judyjoseph
left a comment
There was a problem hiding this comment.
LGTM, @saksarav-nokia f.y.i
| } | ||
| else | ||
| { | ||
| SWSS_LOG_ERROR("Fabric switch id is not configured"); |
There was a problem hiding this comment.
Seems like its a breaking change. You are exiting orchagent if switch_id is not present in db. Is this intenational. @judyjoseph , @arlakshm
There was a problem hiding this comment.
@prsunny We have the same condition for linecard asics. In latest SAI, switch_id was made mandatory on switch create of fabric asic opencomputeproject/SAI#1793. So, we need this change to pass the correct switch-id. The configuration is expected to have switch_id for both linecard asic and fabric asic.
There was a problem hiding this comment.
ok, please approve the PR
|
/Azp run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| attrs.push_back(attr); | ||
|
|
||
| //Read switch_id from config_db. | ||
| Table cfgDeviceMetaDataTable(&config_db, CFG_DEVICE_METADATA_TABLE_NAME); |
There was a problem hiding this comment.
Can you check if VS tests are adopted for this change for Voq?
|
/Azwp run Azure.sonic-swss |
|
/Azpw run Azure.sonic-swss |
|
/Azp run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@arlakshm , looks like its a genuine VS failure.. please check my comment |
99e732e to
e52eea9
Compare
a9e746a to
c25aa1d
Compare
|
Can you please fix coverage? |
c25aa1d to
47dc4db
Compare
Hi @prsunny updated PR with unit test. |
|
/Azp run Azure.sonic-swss |
|
Commenter does not have sufficient privileges for PR 3102 in repo sonic-net/sonic-swss |
|
/azpw run Azure.sonic-swss |
|
/AzurePipelines run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/Azp run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azpw run Azure.sonic-swss |
|
/AzurePipelines run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
4f62b62 to
066fc9a
Compare
3073b2f to
94a9cba
Compare
This check will work even if process is auto-restarted after crash.
|
/azpw run Azure.sonic-swss |
|
/AzurePipelines run Azure.sonic-swss |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* Read switch_id of fabric switch from config_db. * Validate fabric switch_id before create fabric switch. * Add fabric switch_id for virtual chassis * Add unit test for handling fabric switch_id.
What I did
Read switch_id of fabric switch from config_db
Why I did it
Fix sonic-net/sonic-buildimage#18558
How I verified it
Details if related