sonic-mgmt
sonic-mgmt copied to clipboard
[Yang] DPU topology is using wrong dut type
Description
DPU topology is using SonicHost as dut type, please check below files:
ansible/vars/topo_dpu-1.yml
ansible/vars/topo_dpu.yml
And then we can find type is SonicHost in DEVICE_METADATA table:
admin@vlab-01:~$ sudo sonic-cfggen -d -v DEVICE_METADATA
{'localhost': {'bgp_asn': '65100', 'buffer_model': 'traditional', 'cloudtype': 'Public', 'default_bgp_status': 'up', 'default_pfcwd_status': 'disable', 'deployment_id': '1', 'docker_routing_config_mode': 'separated', 'hostname': 'vlab-01', 'hwsku': 'Force10-S6000', 'm
ac': '52:54:00:48:0f:4e', 'platform': 'x86_64-kvm_x86_64-r0', 'region': 'None', 'synchronous_mode': 'enable', 'timezone': 'UTC', 'type': 'SonicHost', 'yang_config_validation': 'disable'}}
But we don't have this type in yang models: https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-device_metadata.yang#L96
Steps to reproduce the issue:
- Setup kvm environment for dpu
- Check DEVICE_METADATA table
Describe the results you received: Find unexpected type: SonicHost.
Describe the results you expected: type should match yang definition.
Additional information you deem important:
**Output of `show version`:**
```
(paste your output here)
```
**Attach debug file `sudo generate_dump`:**
```
(paste your output here)
```
There's no DUT type in the YANG model which is appropriate for DPU, we will probably need to add one. @prsunny is it fine if we just use 'SonicHost' as DUT type for DPUs, or should we come up with a different name?
@theasianpianist can you provide ETA?
@ganglyu need to discuss offline, ETA 2023/05/03
sure, lets discuss this offline and finalize