You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently tying to use the interfaces plugin, to configure ip addresses through sysrepo. In my system, all ip addresses are lost when the system is shut down, so I want to uses the startup datastore to store ip addresses and reenable them after booting.
My problem is that when I start the interfaces plugin after booting, I would expect it to use the current configuration of the running datastore and configure the system accordingly. (The startup datastore is copied into the running datastore when sysrepo is first used.)
I see the output of Line 314 in plugin.c "Checking running datastore against system data" but the actual function that does this seems to be disabled in the line afterwards.
I then went ahead and enabled that function. Sadly, that ends in other errors.
[INF] ietf-interfaces-plugin: Checking running datastore against system data
[INF] ietf-interfaces-plugin: Checking interface list data
[INF] ietf-interfaces-plugin: Storing interface list
[ERR] srpc: /src/src/interfaces/src/plugin/api/interfaces/store.c:143 rtnl_addr_add(sk, link_ipv4_addr, 0) error (-6)
[ERR] ietf-interfaces-plugin: nl_geterror(): -6 = Object exists
[ERR] srpc: /src/src/interfaces/src/plugin/running/store.c:94 interfaces_store_interface(ctx, if_hash) error (-1)
[ERR] ietf-interfaces-plugin: Startup store callback failed for value /ietf-interfaces:interfaces/interface[name='%s']
[ERR] srpc: /src/src/interfaces/src/plugin.c:317 interfaces_running_store(ctx, running_session) error (-1)
[ERR] ietf-interfaces-plugin: Error occured while initializing the plugin (-1)
[ERR] ietf-interfaces-plugin: sr_plugin_init_cb error
[INF] No datastore changes to apply.
An alternative approach seems to be to use the SR_SUBSCR_ENABLED flag when registering the callback in Line 328. That also doesn't work. It seems like nothing is done at all. I am not even sure if the callback is triggered at all (directly after the start of the plugin).
Do you have any ideas on how to resolve this issue?
Or is the interfaces plugin only intended for systems that keep interface configurations persistent?
The text was updated successfully, but these errors were encountered:
Hi,
I am currently tying to use the interfaces plugin, to configure ip addresses through sysrepo. In my system, all ip addresses are lost when the system is shut down, so I want to uses the startup datastore to store ip addresses and reenable them after booting.
My problem is that when I start the interfaces plugin after booting, I would expect it to use the current configuration of the running datastore and configure the system accordingly. (The startup datastore is copied into the running datastore when sysrepo is first used.)
I see the output of Line 314 in plugin.c "Checking running datastore against system data" but the actual function that does this seems to be disabled in the line afterwards.
I then went ahead and enabled that function. Sadly, that ends in other errors.
[INF] ietf-interfaces-plugin: Checking running datastore against system data
[INF] ietf-interfaces-plugin: Checking interface list data
[INF] ietf-interfaces-plugin: Storing interface list
[ERR] srpc: /src/src/interfaces/src/plugin/api/interfaces/store.c:143 rtnl_addr_add(sk, link_ipv4_addr, 0) error (-6)
[ERR] ietf-interfaces-plugin: nl_geterror(): -6 = Object exists
[ERR] srpc: /src/src/interfaces/src/plugin/running/store.c:94 interfaces_store_interface(ctx, if_hash) error (-1)
[ERR] ietf-interfaces-plugin: Startup store callback failed for value /ietf-interfaces:interfaces/interface[name='%s']
[ERR] srpc: /src/src/interfaces/src/plugin.c:317 interfaces_running_store(ctx, running_session) error (-1)
[ERR] ietf-interfaces-plugin: Error occured while initializing the plugin (-1)
[ERR] ietf-interfaces-plugin: sr_plugin_init_cb error
[INF] No datastore changes to apply.
An alternative approach seems to be to use the SR_SUBSCR_ENABLED flag when registering the callback in Line 328. That also doesn't work. It seems like nothing is done at all. I am not even sure if the callback is triggered at all (directly after the start of the plugin).
Do you have any ideas on how to resolve this issue?
Or is the interfaces plugin only intended for systems that keep interface configurations persistent?
The text was updated successfully, but these errors were encountered: