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

[config] config apply-patch generates a log error when op is set to remove #21674

Open
gpunathilell opened this issue Feb 7, 2025 · 3 comments
Assignees
Labels
Triaged this issue has been triaged YANG YANG model related changes

Comments

@gpunathilell
Copy link
Contributor

This issue is seen with test_forced_mgmt_routes_update if there is a remove operation for the config apply-patch we see the following log error:
ERR sonic_yang: Data Loading Failed:Invalid JSON data (unexpected value). This issue is not seen with the replace operation, only with removal from the configuration

Method to reproduce

Remove a field from the config db.
Example: rem.json

[
    {
        "path": "/MGMT_INTERFACE/eth0|f0f0::f0f0:aaee:eeee:1ee1~164/forced_mgmt_routes",
        "op": "remove"
    }
]

Run config apply-patch rem.json
The operation executes without issues (configuration is removed from CONFIG_DB and patch is applied successfully) but the log error is seen in the syslog

@bingwang-ms bingwang-ms added Triaged this issue has been triaged YANG YANG model related changes labels Feb 12, 2025
@xincunli-sonic
Copy link
Contributor

Hi @gpunathilell , can you please share more details, like which version, and is there config dump? If so, can you please share it? Thanks!

@gpunathilell
Copy link
Contributor Author

Hi @xincunli-sonic Issue was detected in 202411 version of the image, I will check if config dump can be shared

@gpunathilell
Copy link
Contributor Author

This is the part of the sonic-mgmt code from which the issue is being seen (the config removal using apply-patch) https://github.com/sonic-net/sonic-mgmt/blob/c063c1d3f62590b91c67aa19d028176ddcaee8c3/tests/generic_config_updater/test_mgmt_interface.py#L48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged this issue has been triaged YANG YANG model related changes
Projects
None yet
Development

No branches or pull requests

5 participants