sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
176 stars 700 forks source link

[Yang] DPU topology is using wrong dut type #12297

Closed ganglyu closed 1 month ago

ganglyu commented 5 months ago

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:

  1. Setup kvm environment for dpu
  2. 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)
```
theasianpianist commented 5 months ago

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?

ganglyu commented 5 months ago

@theasianpianist can you provide ETA?

theasianpianist commented 5 months ago

@ganglyu need to discuss offline, ETA 2023/05/03

prsunny commented 4 months ago

sure, lets discuss this offline and finalize