telekom / sysrepo-plugin-interfaces

BSD 3-Clause "New" or "Revised" License
10 stars 18 forks source link

Unreachable neighbor causes initialization failure #1

Closed gotthardp closed 2 years ago

gotthardp commented 2 years ago

This project looks really cool! I suspect I might have found a bug:

I have (on Ubuntu 20) a non-reachable neighbor

$ ip neigh
...
fe80::240:ffff:fe0f:4d67 dev enp0s3  router FAILED

And this seems to cause a failure when I try to start the plugin

$ ./sysrepo-plugin-interfaces
[INF] Scheduled changes not applied because of other existing connections.
[INF] Connection 80 created.
[INF] Session 282 (user "petr", CID 80) created.
[INF] PLG: No description for interface lo was found
[INF] PLG: No description for interface enp0s3 was found
[INF] PLG: start session to startup datastore
[INF] Session 283 (user "petr", CID 80) created.
[INF] PLG: running DS is empty, loading data
...
[DBG] PLG: xpath_buffer: /ietf-interfaces:interfaces/interface[name="enp0s3"]/ietf-ip:ipv6/neighbor[ip='fe80::240:ffff:fe0f:4d67']/ip = fe80::240:ffff:fe0f:4d67
[DBG] PLG: xpath_buffer: /ietf-interfaces:interfaces/interface[name="enp0s3"]/ietf-ip:ipv6/neighbor[ip='fe80::240:ffff:fe0f:4d67']/link-layer-address = none
[ERR] Unsatisfied pattern - "none" does not conform to "([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?".
[ERR] Invalid datastore edit.
[ERR] PLG: sr_set_item_str error (1): Invalid argument
[ERR] PLG: load_data error
[ERR] PLG: sr_plugin_init_cb error
[INF] PLG: plugin cleanup finished
[INF] No datastore changes to apply.
feelqah commented 2 years ago

Hi Petr, thanks for reporting this issue! I'll check it out and probably fix it today.

feelqah commented 2 years ago

It should be fixed now. Let me know if it works for you now

gotthardp commented 2 years ago

Yes, I tried it and it works. Thank you!

feelqah commented 2 years ago

Okay, great! No problem :) If you find anything else feel free to report it and I'll fix it asap