Skip to content
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

Read switch_id of fabric switch from config_db #3102

Merged
merged 16 commits into from
May 30, 2024

Conversation

ysmanman
Copy link
Contributor

@ysmanman ysmanman commented Apr 5, 2024

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

@ysmanman ysmanman requested a review from prsunny as a code owner April 5, 2024 22:44
Copy link
Contributor

@judyjoseph judyjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, @saksarav-nokia f.y.i

}
else
{
SWSS_LOG_ERROR("Fabric switch id is not configured");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like its a breaking change. You are exiting orchagent if switch_id is not present in db. Is this intenational. @judyjoseph , @arlakshm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, please approve the PR

arlakshm
arlakshm previously approved these changes Apr 22, 2024
@arlakshm
Copy link
Contributor

/Azp run Azure.sonic-swss

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -579,6 +579,28 @@ int main(int argc, char **argv)
attr.value.u32 = SAI_SWITCH_TYPE_FABRIC;
attrs.push_back(attr);

//Read switch_id from config_db.
Table cfgDeviceMetaDataTable(&config_db, CFG_DEVICE_METADATA_TABLE_NAME);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if VS tests are adopted for this change for Voq?

@kenneth-arista
Copy link
Contributor

/Azwp run Azure.sonic-swss

@kenneth-arista
Copy link
Contributor

/Azpw run Azure.sonic-swss

@arlakshm
Copy link
Contributor

arlakshm commented May 8, 2024

/Azp run Azure.sonic-swss

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny
Copy link
Collaborator

prsunny commented May 8, 2024

@arlakshm , looks like its a genuine VS failure.. please check my comment

@ysmanman
Copy link
Contributor Author

@arlakshm , looks like its a genuine VS failure.. please check my comment

Thanks @prsunny . I will add switch_id in config_db of virtual chassis.

@prsunny
Copy link
Collaborator

prsunny commented May 21, 2024

Can you please fix coverage?

@ysmanman
Copy link
Contributor Author

Can you please fix coverage?

Hi @prsunny updated PR with unit test.

@ysmanman
Copy link
Contributor Author

/Azp run Azure.sonic-swss

Copy link

Commenter does not have sufficient privileges for PR 3102 in repo sonic-net/sonic-swss

@ysmanman
Copy link
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm
Copy link
Contributor

/Azp run Azure.sonic-swss

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ysmanman
Copy link
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ysmanman
Copy link
Contributor Author

@arlakshm @prsunny All checks passed. Please help reviewing and merging the PR.

@ysmanman
Copy link
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prsunny prsunny merged commit 4ae8bfa into sonic-net:master May 30, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[master][voq] fabric switch id is not read from configDb
7 participants