-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Updated the API get_platform_info() to return running/detected ASIC's count #16539
Conversation
peer device's Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
higher value so that BGP learnt default route is higher priority. Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
…sis systrem" This reverts commit fcbd38d.
possible Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
What kind of issue does this fix? Is this in particular to address issues such as some fabric card may not be present, so we need the running count instead of the max possible count? |
yes that is the case. Also it's posssible some outside service can use the o/p from above commands to detect number of asic's on the system |
|
||
version_info = get_sonic_version_info() | ||
|
||
hw_info_dict['platform'] = get_platform() | ||
hw_info_dict['hwsku'] = get_hwsku() | ||
if version_info: | ||
hw_info_dict['asic_type'] = version_info.get('asic_type') | ||
hw_info_dict['asic_count'] = get_num_asics() | ||
hw_info_dict['asic_count'] = len(get_asic_presence_list()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we put this change in try/catch to ensure show version
when chassis_db is not up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arlakshm thanks. have updated accordingly.
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
… Session" This reverts commit 3cf4697.
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
@arlakshm , can you re-review with the latest change that Abhishek committed? |
Cherry-pick PR to 202205: #16828 |
…ected ASIC's count (sonic-net#16539) previously, get_num_asics() returns the maximum number of asics. however, the asic_count should be actual number of asics populated which can be get from get_asic_presence_list(). ADO: 25158825 Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Cherry-pick PR to 202211: #16829 |
…ected ASIC's count (#16539) previously, get_num_asics() returns the maximum number of asics. however, the asic_count should be actual number of asics populated which can be get from get_asic_presence_list(). ADO: 25158825 Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
2 similar comments
…ected ASIC's count (sonic-net#16539) previously, get_num_asics() returns the maximum number of asics. however, the asic_count should be actual number of asics populated which can be get from get_asic_presence_list(). ADO: 25158825 Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
Cherry-pick PR to 202305: #16890 |
…ected ASIC's count (#16539) previously, get_num_asics() returns the maximum number of asics. however, the asic_count should be actual number of asics populated which can be get from get_asic_presence_list(). ADO: 25158825 Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
3 similar comments
…ected ASIC's count (#16539) previously, get_num_asics() returns the maximum number of asics. however, the asic_count should be actual number of asics populated which can be get from get_asic_presence_list(). ADO: 25158825 Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
What I did:
Updated the API
get_platform_info()
to return running/detected ASIC's count for given systemADO: 25158825
Why I did:
In Chassis for supervisor running asic count can be <= max asic possible.
get_num_asics()
return max asic count that can be present based on staticasic.conf
file eg:sonic-buildimage/device/nokia/x86_64-nokia_ixr7250e_sup-r0/asic.conf
Line 1 in fe24c26
get_asic_presence_list()
returns how many Fabric asics are detected on Supervisor and for LC/Multi-asic system it still return max asic count as perasic.conf
fileHow I Verify:
Verified below commands on Chassis setup (multi-asic) and Pizza box with Single Asic
show version
show platform summary