Closed minhix closed 2 years ago
Is the loopback feature enabled?
sudo sysrepoctl -c ietf-if-extensions -e loopback
You can check: `sudo sysrepoctl -l Sysrepo repository: /etc/sysrepo
Module Name | Revision | Flags | Owner | Permissions | Submodules | Features ietf-if-extensions | 2020-07-29 | I | root:root | 600 | | loopback sub-interfaces`
Hi,
you didn't install the iana-if-type
YANG module, that is why you are getting the error:
[ERR] Invalid identityref "iana-if-type:softwareLoopback" value - unable to map prefix to YANG schema.
You can install it with:
sudo sysrepoctl -i ./yang/iana-if-type@2017-01-19.yang
You will also have to install the ietf-ip
module for the plugin to work:
sudo sysrepoctl -i ./yang/ietf-ip@2018-02-22.yang
It would be best to install all the necessary modules first as stated in the README doc.
In addition, if you are going to use the parent-interface node from the ietf-if-extensions
module you will have to enable the sub-interfaces
feature:
sudo sysrepoctl --change ietf-if-extensions --enable-feature sub-interfaces
Thank iffy50 and feelqah for the hints!
Unfortunately, after trying to enable the loopback feature, now I get a new error.
pi@raspberrypi:~/Dev $ sudo sysrepoctl -l -v3
[INF] Applying scheduled changes.
[ERR] Internal error (/home/pi/Dev/sysrepo/src/lyd_mods.c:1239).
[ERR] Failed to update data for the new context.
sysrepoctl error: Failed to connect (Operation failed)
Here is what I found in lyd_mods.c:1239
/* get SHM mod */
shm_mod = sr_shmmain_find_module(SR_CONN_MAIN_SHM(conn), ly_mod->name);
SR_CHECK_INT_RET(!shm_mod, err_info);
OK! I can fix the aforementioned problem by running sudo make sr_clean
in sysrepo/build
I also figured out what was the problem with my node.
The problem is that I blindly add yang models following the README from https://github.com/telekom/sysrepo-plugin-interfaces. So I added ietf-if-type
before ietf-interface
That seems to be wrong. After checking the error message, I added the ietf-interface and then ietf-if-type. Then now it works for me
So please double-check and update the README if needed
Great :) Thanks for noticing this. I'll update the README. You should have gotten an error though, because iana-if-type depends on ietf-interfaces module:
sudo sysrepoctl -i yang/iana-if-type@2017-01-19.yang
[ERR] Data model "ietf-interfaces" not found in local searchdirs.
[ERR] Loading "ietf-interfaces" module failed.
[ERR] Parsing module "iana-if-type" failed.
sysrepoctl error: Failed to install module "yang/iana-if-type@2017-01-19.yang" (libyang error)
For more details you may try to increase the verbosity up to "-v3".
I have a problem starting sysrepo-plugin-interfaces. Please help!
Interfaces on the device: