Closed darshana-jk closed 6 years ago
Hi Darshana,
with the most recent devel
libyang and netopeer2-server it should work.
Regards, Michal
Thanks for the fix Michal. Unfortunately I'm stuck in an old libyang version (0.14.45) the reason is in the latest version some of the YANG deviations we use is broken (I will add an issue with more information). If possible, I will try to get the fix ported to our old libyang version.
Thanks again, Darshana.
Description
resolve_identref (..., ident_name="ianaift:fastdsl", ....) interpret the ianaift as a module eventhough its the namespace prefix.
Steps to Reproduce
[INF] (rp_dt_get_values_wrapper_with_opts:1351) Get items request running datastore, xpath: /ietf-interfaces:interfaces-state/interface[type='ianaift:fastdsl']/oper-status//., offset: 0, limit: 100 [DBG] (dm_get_data_info_internal:2689) Module ietf-interfaces already loaded [DBG] (dm_get_data_info_internal:2689) Module ietf-interfaces already loaded
[DBG] (dm_module_clb:421) CALLBACK FOR MODULE ianaift (null) [ERR] (md_get_module_info:1340) Module 'ianaift@' is not present in the dependency graph.
[ERR] (dm_module_clb:437) Module 'ianaift' was not found
[DBG] (rp_dt_xpath_requests_state_data:754) State data in subtree /ietf-interfaces:interfaces-state requested. [DBG] (rp_dt_xpath_requests_state_data:762) 1 subtrees of state data will be attempted to load in order to resolve /ietf-interfaces:interfaces-state/interface[type='ianaift:fastdsl']/oper-status//. [DBG] (pm_module_data_version_changed:582) Module 'ietf-interfaces' persist file version matches with cached value (1520246875371969400). [DBG] (pm_get_subscriptions:1306) Returning 1 subscriptions from 'ietf-interfaces' persist file cache. [DBG] (rp_dt_find_subscription_covering_subtree:821) Found match for interfaces-state with depth 0 index 0 ...
(gdb) bt
0 dm_module_clb (ctx=0x7fffe8074860, name=0x7fffe815ffb0 "ianaift", ns=0x0, options=0, user_data=0x63ef20) at /WORK/PMA.new/sysrepo/src/data_manager.c:429
1 0x00007ffff68d0b7b in resolve_identref (type=0x7fffe8099d48, ident_name=0x7fffe815c780 "ianaift:fastdsl", node=0x7ffff5320670, mod=0x7fffe8086b10, dflt=0) at /WORK/PMA.new/libyang/src/resolve.c:5506
2 0x00007ffff68e329c in lyp_parsevalue (type=0x7fffe8099d48, value=0x7ffff53206a0, xml=0x0, leaf=0x7ffff5320670, attr=0x0, local_mod=0x7fffe8086b10, store=0, dflt=0) at /WORK/PMA.new/libyang/src/parser.c:1757
3 0x00007ffff69599c3 in lyd_validate_value (node=0x7fffe8099cd0, value=0x7fffe8175e70 "ianaift:fastdsl") at /WORK/PMA.new/libyang/src/tree_data.c:4454
4 0x00007ffff6968ff7 in warn_equality_value (ctx=0x7fffe8074860, exp=0x7fffe816fb30, set=0x7ffff5320b70, val_exp=7, equal_exp=5, last_equal_exp=7) at /WORK/PMA.new/libyang/src/xpath.c:2797
5 0x00007ffff6976e58 in eval_equality_expr (exp=0x7fffe816fb30, exp_idx=0x7ffff5320b0e, repeat=1, cur_node=0x7fffe8090ac0, local_mod=0x7fffe8086b10, set=0x7ffff5320b70, options=4) at /WORK/PMA.new/libyang/src/xpath.c:7766
6 0x00007ffff69779ff in eval_expr_select (exp=0x7fffe816fb30, exp_idx=0x7ffff5320b0e, etype=LYXP_EXPR_NONE, cur_node=0x7fffe8090ac0, local_mod=0x7fffe8086b10, set=0x7ffff5320b70, options=4) at /WORK/PMA.new/libyang/src/xpath.c:7988
7 0x00007ffff6972f7b in eval_predicate (exp=0x7fffe816fb30, exp_idx=0x7ffff5320b0e, cur_node=0x7fffe8090ac0, local_mod=0x7fffe8086b10, set=0x7ffff5320b70, options=4, parent_pos_pred=1) at /WORK/PMA.new/libyang/src/xpath.c:6704
8 0x00007ffff69736c0 in eval_relative_location_path (exp=0x7fffe816fb30, exp_idx=0x7ffff5320b0e, cur_node=0x7fffe8090ac0, local_mod=0x7fffe8086b10, all_desc=0, set=0x7ffff5320b70, options=4) at /WORK/PMA.new/libyang/src/xpath.c:6831
9 0x00007ffff6973934 in eval_absolute_location_path (exp=0x7fffe816fb30, exp_idx=0x7ffff5320b0e, cur_node=0x7fffe8090ac0, local_mod=0x7fffe8086b10, set=0x7ffff5320b70, options=4) at /WORK/PMA.new/libyang/src/xpath.c:6892
10 0x00007ffff697541d in eval_path_expr (exp=0x7fffe816fb30, exp_idx=0x7ffff5320b0e, cur_node=0x7fffe8090ac0, local_mod=0x7fffe8086b10, set=0x7ffff5320b70, options=4) at /WORK/PMA.new/libyang/src/xpath.c:7272
11 0x00007ffff6977b2c in eval_expr_select (exp=0x7fffe816fb30, exp_idx=0x7ffff5320b0e, etype=LYXP_EXPR_NONE, cur_node=0x7fffe8090ac0, local_mod=0x7fffe8086b10, set=0x7ffff5320b70, options=4) at /WORK/PMA.new/libyang/src/xpath.c:8006
12 0x00007ffff6978965 in lyxp_atomize (expr=0x7fffe816e230 "/ietf-interfaces:interfaces-state/interface[type='ianaift:fastdsl']/type//.", cur_snode=0x7fffe8090ac0, cur_snode_type=LYXP_NODE_ELEM, set=0x7ffff5320b70, options=4, ctx_snode=0x0) at /WORK/PMA.new/libyang/src/xpath.c:8390
13 0x00007ffff694abd1 in lys_xpath_atomize (ctx_node=0x7fffe8090ac0, ctx_node_type=LYXP_NODE_ELEM, expr=0x7fffe816e230 "/ietf-interfaces:interfaces-state/interface[type='ianaift:fastdsl']/type//.", options=4) at /WORK/PMA.new/libyang/src/tree_schema.c:3918
14 0x00007ffff7a9a892 in rp_dt_xpath_atomize (schema_info=0x7fffe806eaf0, xpath=0x7fffe816e230 "/ietf-interfaces:interfaces-state/interface[type='ianaift:fastdsl']/type//.", atoms=0x7ffff5320c70) at /WORK/PMA.new/sysrepo/src/rp_dt_get.c:569
15 0x00007ffff7a9bc86 in rp_dt_xpath_requests_state_data (rp_ctx=0x604870, session=0x674d00, schema_info=0x7fffe806eaf0, xpath=0x675330 "/ietf-interfaces:interfaces-state/interface[type='ianaift:fastdsl']/type//.", api_variant=SR_API_VALUES, tree_depth_limit=0, state_data_ctx=0x674e18) at /WORK/PMA.new/sysrepo/src/rp_dt_get.c:702
16 0x00007ffff7aa091b in rp_dt_prepare_data (rp_ctx=0x604870, rp_session=0x674d00, xpath=0x675330 "/ietf-interfaces:interfaces-state/interface[type='ianaift:fastdsl']/type//.", api_variant=SR_API_VALUES, tree_depth_limit=0, data_tree=0x7ffff5320d88) at /WORK/PMA.new/sysrepo/src/rp_dt_get.c:1231
17 0x00007ffff7aa2ebb in rp_dt_get_values_wrapper_with_opts (rp_ctx=0x604870, rp_session=0x674d00, get_items_ctx=0x674d60, sr_mem=0x0, xpath=0x675330 "/ietf-interfaces:interfaces-state/interface[type='ianaift:fastdsl']/type//.", offset=0, limit=100, values=0x7ffff5320df8, count=0x7ffff5320e00) at /WORK/PMA.new/sysrepo/src/rp_dt_get.c:1363
18 0x00007ffff7a6dbc6 in rp_get_items_req_process (rp_ctx=0x604870, session=0x674d00, msg=0x675b40, skip_msg_cleanup=0x7ffff5320ee3) at /WORK/PMA.new/sysrepo/src/request_processor.c:821
19 0x00007ffff7a897a2 in rp_req_dispatch (rp_ctx=0x604870, session=0x674d00, msg=0x675b40, skip_msg_cleanup=0x7ffff5320ee3) at /WORK/PMA.new/sysrepo/src/request_processor.c:3390
20 0x00007ffff7a8ad28 in rp_msg_dispatch (rp_ctx=0x604870, session=0x674d00, msg=0x675b40) at /WORK/PMA.new/sysrepo/src/request_processor.c:3603
21 0x00007ffff7a8b6c7 in rp_worker_thread_execute (rp_ctx_p=0x604870) at /WORK/PMA.new/sysrepo/src/request_processor.c:3704
22 0x00007ffff77ca6ba in start_thread (arg=0x7ffff5321700) at pthread_create.c:333
23 0x00007ffff75003dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109