Skip to content

Fix snabb_data_to_sysrepo data tree copy #4

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

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

wungad
Copy link

@wungad wungad commented Mar 21, 2023

When attempting to start sysrepo-snabb-plugin built for snabb-softwire-v3, an error occurs with the following message:

[INF] snabb plugin: sync sysrepo and snabb data
[INF] snabb plugin: copy snabb data to sysrepo
[INF] snabb plugin: send to socket
[INF] snabb plugin: appply snabb data to sysrepo startup datastore
[ERR] snabb plugin: failed lyd_dup_siblings_to_ctx: 5
[ERR] snabb plugin: failed to apply libyang data to sysrepo: Item not found
[ERR] snabb plugin: failed to apply snabb data to sysrepo: Item not found
[ERR] snabb plugin: failed to apply sysrepo startup data to snabb: Item not found
[ERR] sysrepo-plugind: Plugin "sysrepo-snabb-plugin" initialization failed (Item not found).

I believe the reason for this is that function lyd_dup_siblings_to_ctx tries to use non-existent schema references from target context (e.g startup) as is noted [tree_data.h]https://github.com/CESNET/libyang/blob/9a4e5b2ce30b9696116d6e654ee55caab5aafed8/src/tree_data.h#L1988-L1991)

This PR fixes this in the following way:

  • data tree created in the context of libyang is first copied to sysrepo running datastore
  • running datastore is copied to startup datastore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant