-
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] Unable to apply config from sonic-telemetry_client.yang #16356
Comments
@qiluo-msft can you please check the yang guidelines |
@faraazbrcm Could you check which branches are impacted? |
Create a modification PR on this: #16861 |
qiluo-msft
pushed a commit
that referenced
this issue
Dec 16, 2023
### Why I did it Github issue: #16356. The YANG definition breaks GCU feature. We can either update sonic_yang and GCU's search algorithm to enable the same key count case or simply update YANG model to solve the issue. The pros for update YANG model are it could solve the issue directly and we don't need to handle the complicate search algorithm in sonic_yang and GCU. This is the only YANG model that has this issue. ### How I did it Combine two list into one. The previous YANG validation unit tests are still applicable. #### How to verify it Unit test and E2E test
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this issue
Jan 4, 2024
### Why I did it Github issue: sonic-net#16356. The YANG definition breaks GCU feature. We can either update sonic_yang and GCU's search algorithm to enable the same key count case or simply update YANG model to solve the issue. The pros for update YANG model are it could solve the issue directly and we don't need to handle the complicate search algorithm in sonic_yang and GCU. This is the only YANG model that has this issue. ### How I did it Combine two list into one. The previous YANG validation unit tests are still applicable. #### How to verify it Unit test and E2E test
11 tasks
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this issue
Feb 2, 2024
### Why I did it Github issue: sonic-net#16356. The YANG definition breaks GCU feature. We can either update sonic_yang and GCU's search algorithm to enable the same key count case or simply update YANG model to solve the issue. The pros for update YANG model are it could solve the issue directly and we don't need to handle the complicate search algorithm in sonic_yang and GCU. This is the only YANG model that has this issue. ### How I did it Combine two list into one. The previous YANG validation unit tests are still applicable. #### How to verify it Unit test and E2E test
mssonicbld
pushed a commit
that referenced
this issue
Feb 2, 2024
### Why I did it Github issue: #16356. The YANG definition breaks GCU feature. We can either update sonic_yang and GCU's search algorithm to enable the same key count case or simply update YANG model to solve the issue. The pros for update YANG model are it could solve the issue directly and we don't need to handle the complicate search algorithm in sonic_yang and GCU. This is the only YANG model that has this issue. ### How I did it Combine two list into one. The previous YANG validation unit tests are still applicable. #### How to verify it Unit test and E2E test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
sonic-telemetry_client.yang defines a Table level container with one container Global for static key(This is fine), but it also has two lists TELEMETRY_CLIENT_DS_LIST and TELEMETRY_CLIENT_SUB_LIST with same key count, this pattern is not recommended. As per the guideline we can only split the tables with lists with distinct number of keys (not with pattern and type).
Even sonic-utilities is failing to apply the configs.
Steps to reproduce the issue:
Describe the results you received:
Failed application of JsonPatch, unable to write the configs
Describe the results you expected:
Successful application of JsonPatch
Additional Information
The SONiC YANG guideline currently lacks specific rules concerning multiple LIST elements within a table-level container. At present, sonic-utility selects the first LIST found within such a container. This approach works correctly only when the number of keys for each LIST differs, as seen in sonic-interface. However, it fails when the LISTs have the same number of keys, as is the case in sonic-telemetry_client.yang.
To safeguard against future application issues, I've updated the guideline to include a new point specifically addressing TABLE keys when the content is divided into multiple lists. The changes are available in this PR.
The text was updated successfully, but these errors were encountered: