Open Karl-ZhangBD opened 1 year ago
Did you do some manual changes to the files? Run make sr_clean
to completely reset sysrepo state and it should fix this.
Hi, michalvasko I installed a YANG model that I defined myself, and then uninstalled it and got an error, and I can't tell why through v3. root@ubuntu:/home/karl/work/YANG/Qbv# sysrepoctl -u Qbv-Protocol -v3 [INF] Connection 36 created. [INF] Module "Qbv-Protocol" removed. [ERR] Internal error (/home/karl/work/sysrepo/src/lyd_mods.c:860). sysrepoctl error: Failed to uninstall modules (Internal error)
Can you please share the YANG (and all other required for installing it) and the exact steps to reproduce this? Starting from make sr_clean
.
The problem has been solved, probably I changed the yang model in an incorrect way after installing it, which caused the error. I have another problem. I downloaded two YANG models from the IEEE official website, one is named: ieee802-dot1q-types.yang and one is named: ieee802-dot1q-sched.yang where ieee802-dot1q-sched.yang references the identity defined in ieee802-dot1q-types.yang as shown below import ieee802-dot1q-types { prefix dot1q-types; } identity set-gate-states { base dot1q-types:type-of-operation; description "Operation to set the gate states."; } So I started by installing ieee802-dot1q-types.yang,but when I installed ieee802-dot1q-sched.yang, I got the following error message : root@ubuntu:/home/karl/work/YANG# sysrepoctl -i ieee802-dot1q-sched.yang -v3 [INF] Connection 15 created. [ERR] Unable to find base (dot1q-types:type-of-operation) of identity "set-gate-states". (Path "/ieee802-dot1q-sched:{identity='set-gate-states'}".) sysrepoctl error: Failed to install modules (libyang error)
I checked ieee802-dot1q-types.yang and found that it did contain the following: identity type-of-operation { description "Represents the operation type (name)."; } How can I fix it?
In order to use identities defined in another module, that module which is "providing" them has to be installed, not only imported. Check the output of sysrepoctl --list
and review the Flags
column,and if it says just i
(imported) and not I
(installed) for ieee802-dot1q-types.yang
, install it explicitly.
What sysrepo and libyang version are you using? I have tried installing these modules and encountered no issues.
I solved the problem as jktjkt said above, and it was indeed a problem with install and import. By the way, what are the differences between install and import in the process of using them?
As per the RFC.
Can you help me figure out how to fix this error? Thanks! karl@ubuntu:~$ sysrepoctl -l -v3 [ERR] JSON DS file: Opening "/dev/shm/sr_ietf-netconf-acm.running" failed (File exists). [ERR] Callback "init" of plugin "JSON DS file" for module "ietf-netconf-acm" failed. sysrepoctl error: Failed to connect (System function call failed)