-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
sysrepo config change subscription has no way of filtering augmented modules xpaths #16475
Comments
A simple workaround would be to just ignore the "unknown data path" event by replacing NB_ERR to NB_OK here: |
@choppsv1 could you take a look at this problem? |
@adaraiseh : do you have a patch about it with your suggestion ? Any pull request ? |
@vjardin would it make sense to create a PR with this as a solution? otherwise we'd need to find a way to allow daemons to subscribe to specific xpaths they need, not whole modules. |
I believe it can be ok to emit just a warning, but to return NB_OK per your suggestion. There is a similar set of behavior, according to me, for I agree that a pull request would make sense so it can be reviewed accordingly. However, along with such corner cases of pull request, it would require to add a test too : see https://github.com/FRRouting/frr/tree/master/tests in order to make sure that it won't be broken once. |
This issue is stale because it has been open 180 days with no activity. Comment or remove the |
This issue will be automatically closed in the specified period unless there is further activity. |
Is sysrepo functionality still working in the latest release? |
This issue will no longer be automatically closed. |
Description
Currently
frr_sr_subscribe_config
subscribes to config changes on all xpaths of the input yang module (the optional xpath filter is set to NULL):This becomes problematic when the yang module is augmented by multiple daemons submodules.
For example: frr-routing yang module is augmented by pimd modules (frr-pim.yang and frr-pim-rp.yang) and also is augmented by staticd modules (frr-staticd.yang).
With this situation, when running pimd daemon, its sysrepo northbound will subscribe and process changes from pimd and staticd.
So both pimd and staticd will subscribe both of the following xpaths changes:
Due to this, any config changes happening on staticd submdule xpath will have to be processed by pimd and obviously it fails:
Such problem is not limited only to frr-routing yang module, it is expected to happen to any yang module augmented by multiple daemons submodules, like frr-interface.
This will happen only for sysrepo northbound, because the yang modules in its case are complied outside frr (in sysrepo) and typically it will include all submodules augmentations (users would be installing all frr daemons yang modules into sysrepo).
Version
How to reproduce
1- compile frr with sysrepo module.
2- Install the following yang modules on sysrepo:
3- Add the following configuration sample to sysrepo:
3- start pimd daemon, sysrepo subscription will fail.
Expected behavior
pimd should subscribe only to the xpaths relevant to it.
Actual behavior
pimd subscribes to changes on both staticd and pimd augmentations xpaths on frr-routing yang module.
Additional context
No response
Checklist
The text was updated successfully, but these errors were encountered: