-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[YANG]sonic-dot1p-tc-map.yang would cause failed deployment via mgmt-framework #10386
Comments
When sonic-dot1p-tc-map.yang was uploaded to sonic-yang-models, the community didn't agreed to use CVL extension "map-list". In review, it was told to remove this extension from yang. So this PR (sonic-net/sonic-mgmt-common#51) was raised which removes the support of CVL extension "map-list" support from CVL. This PR is still not merged. To fix this issue, either sonic yang should be allowed with "map-list" extension, or PR (sonic-net/sonic-mgmt-common#51) to be merged. |
Venkat will help to review this issue. Thanks. |
@ljyfree SONiC YANG models present https://github.com/Azure/sonic-mgmt-common/tree/master/models/yang/sonic and https://github.com/Azure/sonic-buildimage/tree/master/src/sonic-yang-models/yang-models are not same, we still honor map-list in mgmt-common repo, please continue to use it, if sonic-net/sonic-mgmt-common#51 is merged, you can migrate to newer model. |
@maheshwari-mayank |
@ljyfree |
@ljyfree - We are not deployed dot1p-to-tc or any qos maps with sonic-yang with restconf. We defined YANG models for qos maps and we did not sing up for testing YANG with restconf etc with sonic yang's. Defining YANG models does not mean it will work from mgmt-common for RESTconf unless YANG and DB formats is same. Here YANG model and DB formats are different. In YANG, key is "dot1p"; and values is leaf "tc". But in DB, everything is field and value pairs. May be mgmt-common needs special handling to convert YANG to DB format and vice versa. |
@ljyfree can you please check if this issue still there? or any other info do you need? Thanks. |
Hi @zhangyanzhao |
CVL failure is not fixed yet, need BRCM to help. But this is not YANG issue. @adyeung |
Description
There are nested LISTs in ./yang-models/sonic-dot1p-tc-map.yang as follows:
The target configuration into configDB as follows:
It means dot1p-1 maps to tc-2 and dot1p-3 maps to tc-4.
However,mgmt-framework's CVL function would check if field(here is "1" and "3") exist in the schema sourced from yang.
It would definitely failed.
Same issue for dscp-to-tc-map.
I found similar description in SONiC_YANG_Model_Guidelines , which use "map-list ".
https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md#11-mapping-tables-in-redis-are-defined-using-nested-list-use-sonic-extmap-list-true-to-indicate-that-the-list-is-used-for-mapping-table-the-outer-list-is-used-for-multiple-instances-of-mapping-the-inner-list-is-used-for-mapping-entries-for-each-outer-list-instance
But "map-list" was removed in sonic-net/sonic-mgmt-common#51 .
@ohu1
@maheshwari-mayank
Steps to reproduce the issue:
1.compile mgmt-framework with ./yang-models/sonic-dot1p-tc-map.yang
2.Modify xlate_to_db.go to support nested list
3.try to deploy dot1p-to-tc
Describe the results you received:
CVL failed
Describe the results you expected:
dot1p-to-tc configuration should be
Output of
show version
:Output of
show techsupport
:Additional information you deem important (e.g. issue happens only occasionally):
The text was updated successfully, but these errors were encountered: