Skip to content
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 validation fails when Buffer profiles are configured with "NULL" values #10342

Closed
dgsudharsan opened this issue Mar 24, 2022 · 3 comments
Closed
Assignees
Labels
BRCM Issue for 202111 YANG YANG model related changes

Comments

@dgsudharsan
Copy link
Collaborator

Description

Below is the sample buffer configuration. In dynamic buffer model, "NULL" is a legal value but yang model check doesn't tolerance it.

Failed to install p4-examples=1.0.1-8: Failed to install p4-examples: Data Loading Failed
Leafref "/sonic-buffer-profile:sonic-buffer-profile/sonic-buffer-profile:BUFFER_PROFILE/sonic-buffer-profile:BUFFER_PROFILE_LIST/sonic-buffer-profile:name" of value "NULL" points to a non-existing leaf.

"BUFFER_PG": {
    "Ethernet0|0": {
        "profile": "ingress_lossy_profile"
    },
    "Ethernet0|3-4": {
        "profile": "NULL"
    }

}

Issue is from the below yang model where the value can be only a leafref and so having NULL fails. We also need to check other yang models where buffer profile can be NULL

https://github.com/Azure/sonic-buildimage/blob/7eb321c376fd1fcdbc67462185b8d4a7cff5f76f/src/sonic-yang-models/yang-models/sonic-buffer-pg.yang#L58

Steps to reproduce the issue:

Describe the results you received:

Describe the results you expected:

Output of show version:

(paste your output here)

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@dgsudharsan dgsudharsan added YANG YANG model related changes BRCM labels Mar 24, 2022
@zhangyanzhao
Copy link
Collaborator

@adyeung Adam, can you please help to find someone in BRCM to take a look? Thanks.

@adyeung
Copy link
Collaborator

adyeung commented Mar 24, 2022

@AmitKaushik7 Amit from BRCM will followup

@AmitKaushik7
Copy link
Contributor

Raised a PR #10353 [Allow NULL Buffer Profile in buffer pg/queue yang files for Dynamic Buffer Model ] for this issue.

neethajohn pushed a commit that referenced this issue Mar 31, 2022
#10353)

Why I did it
To address #10342 (Yang validation fails when Buffer profiles are configured with "NULL" values)
judyjoseph pushed a commit that referenced this issue Apr 4, 2022
#10353)

Why I did it
To address #10342 (Yang validation fails when Buffer profiles are configured with "NULL" values)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BRCM Issue for 202111 YANG YANG model related changes
Projects
None yet
Development

No branches or pull requests

4 participants