Skip to content

[202405] Do not add switch_id in DEVICE_METADATA for chassis_packet.#1056

Merged
arlakshm merged 2 commits intoAzure:202405from
abdosi:vsfail
Apr 26, 2025
Merged

[202405] Do not add switch_id in DEVICE_METADATA for chassis_packet.#1056
arlakshm merged 2 commits intoAzure:202405from
abdosi:vsfail

Conversation

@abdosi
Copy link
Contributor

@abdosi abdosi commented Apr 25, 2025

What I did:

Do not add switch_id in DEVICE_METADATA for chassis_packet. In OA we do not pass/switch_id for chassis-packet. But their can be other application like Debug Shell which can use it when initalizing. To keep consistency just do not add this field.

How I verify:

Before

sonic-cfggen -m /etc/sonic/minigraph.xml -n asic0 -v DEVICE_METADATA
{'localhost': {'region': 'australiaeast', 'cloudtype': None, 'docker_routing_config_mode': 'separated', 'hostname': 'xxxx', 'hwsku': 'xxxxx', 'type': 'SpineRouter', 'synchronous_mode': 'enable', 'yang_config_validation': 'disable', 'bgp_asn': 'xxxxx', 'chassis_hostname': 'xxxxx', 'deployment_id': '3', 'cluster': 'xxxx', 'slice_type': 'AZNG_Production', 'subtype': 'DownstreamLC', 'asic_name': 'asic0', 'sub_role': 'FrontEnd', 'switch_type': 'chassis-packet', 'switch_id': 4}}

After

sonic-cfggen -m /etc/sonic/minigraph.xml -n asic0 -v DEVICE_METADATA
{'localhost': {'region': 'australiaeast', 'cloudtype': None, 'docker_routing_config_mode': 'separated', 'hostname': 'xxxxx', 'hwsku': 'xxxxx', 'type': 'SpineRouter', 'synchronous_mode': 'enable', 'yang_config_validation': 'disable', 'bgp_asn': 'xxxxx', 'chassis_hostname': 'xxxxx', 'deployment_id': '3', 'cluster': 'xxxxx', 'slice_type': 'AZNG_Production', 'subtype': 'DownstreamLC', 'asic_name': 'asic0', 'sub_role': 'FrontEnd', 'switch_type': 'chassis-packet'}}

@abdosi
Copy link
Contributor Author

abdosi commented Apr 25, 2025

@anamehra for viz.

@abdosi abdosi requested a review from arlakshm April 25, 2025 17:43
# switch_id = chassis_metadata.get(asic_hostname, {}).get('asic_switch_id', None)
# on Voq system each asic has a switch_id
if switch_id is not None:
if switch_id is not None and chassis_type == CHASSIS_CARD_VOQ:
Copy link
Contributor

@arlakshm arlakshm Apr 25, 2025

Choose a reason for hiding this comment

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

can we change this to chassis_type != CHASSIS_CARD_PACKET_CHASSIS? in line 2249 for fabric cards we get the switch_id from minigraph and save it for CHASSIS_CARD_FABRIC

@anamehra
Copy link
Contributor

LGTM

@arlakshm arlakshm merged commit a046fd9 into Azure:202405 Apr 26, 2025
3 checks passed
bingwang-ms pushed a commit that referenced this pull request Jan 16, 2026
…omatically (#23392)

#### Why I did it
src/sonic-swss-common
```
* fc35dd0 - (HEAD -> master, origin/master, origin/HEAD) Move SonicDbTable to sonic-dash-ha. (#1056) (3 hours ago) [dypet]
* 100e2e0 - [MSTP] Schema Support (#961) (5 hours ago) [Wajahat Razi]
* d7c661b - [trim]: Add Packet Trimming Drop Counters DB schema (#1055) (33 hours ago) [Nazarii Hnydyn]
* 465cc1c - Add test case to verify zmq reconnect behaviour (#84) (#1052) (12 days ago) [Qi Luo]
* 93af927 - Move swss-common/swss-common-testing crates from https://github.com/sonic-net/sonic-dash-ha (#1044) (13 days ago) [Qi Luo]
```
#### How I did it
#### How to verify it
#### Description for the changelog
@abdosi abdosi deleted the vsfail branch February 18, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants