On Mon, Aug 31, 2020 at 04:37:24PM +0000, Ruben Torrero Marijnissen wrote:
Hi,
I'm looking into the possibility of adding support for an additional backend (wicked) inside nmstate. What would be a good starting point? what things should I keep in mind when doing so? What would be the requirements that would have to be met to send a PR with chances of it being accepted?
Hi Ruben Torrero Marijnissen,
Nmstate now provides plugin support, you may refer to `libnmstate/plugins/nmstate_plugin_ovsdb.py` as an example plugin.
Currently, we are moving to nispor(via netlink) for querying kernel network state, so your plugin will only have to apply the config and some user space only state(e.g. OVS, DHCP status).
For accepting a PR, these are required besides maintainer approval:
* License LGPL 2.1+ * CI pass. * New code has test cases covered.
Besides that, we can discuss the detail in github PR.
Any suggestion is appreciated as well as pointing me in the right direction to find more documentation is appreciated (I'm already going through the contents of nmstate.io)
I will draft out an document for `Nmstate Plugin Developer Guide` for this use case before end of this week.
I am in freenode IRC #nmstate channel as Gris, ping me if you need any help on this.
Best regards!
Hi Gris,
Thanks for your reply. I've been playing and testing a little bit nmstate, first on Fedora, and after some minor troubles now I have it successfully running in Leap 15.2, and through nispor I'm able to get the state of all interfaces.
As a first step, I'd like to have wicked apply some very simple changes to an ethernet device to get a rough idea how much effort it would take us to implement the complete backend. To better understand how plugins work, I've been playing with a very simple plugin, trying to implement the `apply_changes` method (which judging what I've seen in the ovsdb plugin is what actually calls the backend to implement the changes) to just dump the parameters it gets.
So far I haven't had much luck as nmstate will complain that NetworkManager is not running and not let me test much:
2020-09-17 18:13:29,179 root WARNING NetworkManager is not running 2020-09-17 18:13:29,180 root WARNING Failed to load plugin nmstate_plugin_ovsdb: No module named 'ovs' unknown nla_type: 35 [0, 0, 0, 0] unknown nla_type: 35 [0, 0, 0, 0] unknown nla_type: 35 [0, 0, 0, 0] unknown nla_type: 35 [0, 0, 0, 0] unknown nla_type: 35 [0, 0, 0, 0] 2020-09-17 18:13:29,201 root DEBUG Interface lo is type unknown and will be ignored during the activation 2020-09-17 18:13:29,202 root DEBUG Async action: Create checkpoint started Traceback (most recent call last): File "/home/rtorrero/removeme-env/bin/nmstatectl", line 8, in <module> sys.exit(main()) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/nmstatectl/nmstatectl.py", line 70, in main return args.func(args) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/nmstatectl/nmstatectl.py", line 264, in apply ret = apply_state( File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/nmstatectl/nmstatectl.py", line 304, in apply_state checkpoint = libnmstate.apply( File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/netapplier.py", line 70, in apply checkpoints = create_checkpoints(plugins, rollback_timeout) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nmstate.py", line 189, in create_checkpoints checkpoint = plugin.create_checkpoint(timeout) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nm/plugin.py", line 219, in create_checkpoint self._checkpoint = CheckPoint.create(self._ctx, timeout) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nm/checkpoint.py", line 48, in create cp._create() File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nm/checkpoint.py", line 68, in _create self._ctx.wait_all_finish() File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nm/context.py", line 216, in wait_all_finish raise tmp_error libnmstate.error.NmstateLibnmError: Checkpoint create failed: error=nm- client-error-quark: NetworkManager is not running (1)
How could I continue without having NetworkManager running? The documentation (and example) covers the case of creating a plugin that will add additional types of interfaces, what would be the best approach?
I dropped by #nmstate today but didn't find you. What timezone are you in? If you'd rather have me ask there, please let me know!
Regards,
Rubén
On Tue, 2020-09-01 at 20:06 +0800, Gris Ge wrote:
On Mon, Aug 31, 2020 at 04:37:24PM +0000, Ruben Torrero Marijnissen wrote:
Hi,
I'm looking into the possibility of adding support for an additional backend (wicked) inside nmstate. What would be a good starting point? what things should I keep in mind when doing so? What would be the requirements that would have to be met to send a PR with chances of it being accepted?
Hi Ruben Torrero Marijnissen,
Nmstate now provides plugin support, you may refer to `libnmstate/plugins/nmstate_plugin_ovsdb.py` as an example plugin.
Currently, we are moving to nispor(via netlink) for querying kernel network state, so your plugin will only have to apply the config and some user space only state(e.g. OVS, DHCP status).
For accepting a PR, these are required besides maintainer approval:
* License LGPL 2.1+ * CI pass. * New code has test cases covered.
Besides that, we can discuss the detail in github PR.
Any suggestion is appreciated as well as pointing me in the right direction to find more documentation is appreciated (I'm already going through the contents of nmstate.io)
I will draft out an document for `Nmstate Plugin Developer Guide` for this use case before end of this week.
I am in freenode IRC #nmstate channel as Gris, ping me if you need any help on this.
Best regards!
Hello!
On Thu, Sep 17, 2020 at 7:28 PM Ruben Torrero Marijnissen rtorreromarijnissen@suse.com wrote:
Hi Gris,
Thanks for your reply. I've been playing and testing a little bit nmstate, first on Fedora, and after some minor troubles now I have it successfully running in Leap 15.2, and through nispor I'm able to get the state of all interfaces.
As a first step, I'd like to have wicked apply some very simple changes to an ethernet device to get a rough idea how much effort it would take us to implement the complete backend. To better understand how plugins work, I've been playing with a very simple plugin, trying to implement the `apply_changes` method (which judging what I've seen in the ovsdb plugin is what actually calls the backend to implement the changes) to just dump the parameters it gets.
So far I haven't had much luck as nmstate will complain that NetworkManager is not running and not let me test much:
2020-09-17 18:13:29,179 root WARNING NetworkManager is not running 2020-09-17 18:13:29,180 root WARNING Failed to load plugin nmstate_plugin_ovsdb: No module named 'ovs' unknown nla_type: 35 [0, 0, 0, 0] unknown nla_type: 35 [0, 0, 0, 0] unknown nla_type: 35 [0, 0, 0, 0] unknown nla_type: 35 [0, 0, 0, 0] unknown nla_type: 35 [0, 0, 0, 0] 2020-09-17 18:13:29,201 root DEBUG Interface lo is type unknown and will be ignored during the activation 2020-09-17 18:13:29,202 root DEBUG Async action: Create checkpoint started Traceback (most recent call last): File "/home/rtorrero/removeme-env/bin/nmstatectl", line 8, in
<module> sys.exit(main()) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/nmstatectl/nmstatectl.py", line 70, in main return args.func(args) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/nmstatectl/nmstatectl.py", line 264, in apply ret = apply_state( File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/nmstatectl/nmstatectl.py", line 304, in apply_state checkpoint = libnmstate.apply( File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/netapplier.py", line 70, in apply checkpoints = create_checkpoints(plugins, rollback_timeout) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nmstate.py", line 189, in create_checkpoints checkpoint = plugin.create_checkpoint(timeout) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nm/plugin.py", line 219, in create_checkpoint self._checkpoint = CheckPoint.create(self._ctx, timeout) File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nm/checkpoint.py", line 48, in create cp._create() File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nm/checkpoint.py", line 68, in _create self._ctx.wait_all_finish() File "/home/rtorrero/removeme-env/lib64/python3.8/site- packages/libnmstate/nm/context.py", line 216, in wait_all_finish raise tmp_error libnmstate.error.NmstateLibnmError: Checkpoint create failed: error=nm- client-error-quark: NetworkManager is not running (1)
How could I continue without having NetworkManager running? The documentation (and example) covers the case of creating a plugin that will add additional types of interfaces, what would be the best approach?
Currently NetworkManager is a must on nmstate, for using nmstate without NetworkManager you should need to create a new argument for picking the provider or modify the current NetworkManager to not fail when it is not installed/running.
I dropped by #nmstate today but didn't find you. What timezone are you in? If you'd rather have me ask there, please let me know!
Gris is not around too much until Monday, but I will be (ffmancera).
Thanks, Fernando.
Regards,
Rubén
On Tue, 2020-09-01 at 20:06 +0800, Gris Ge wrote:
On Mon, Aug 31, 2020 at 04:37:24PM +0000, Ruben Torrero Marijnissen wrote:
Hi,
I'm looking into the possibility of adding support for an additional backend (wicked) inside nmstate. What would be a good starting point? what things should I keep in mind when doing so? What would be the requirements that would have to be met to send a PR with chances of it being accepted?
Hi Ruben Torrero Marijnissen,
Nmstate now provides plugin support, you may refer to `libnmstate/plugins/nmstate_plugin_ovsdb.py` as an example plugin.
Currently, we are moving to nispor(via netlink) for querying kernel network state, so your plugin will only have to apply the config and some user space only state(e.g. OVS, DHCP status).
For accepting a PR, these are required besides maintainer approval:
* License LGPL 2.1+ * CI pass. * New code has test cases covered.
Besides that, we can discuss the detail in github PR.
Any suggestion is appreciated as well as pointing me in the right direction to find more documentation is appreciated (I'm already going through the contents of nmstate.io)
I will draft out an document for `Nmstate Plugin Developer Guide` for this use case before end of this week.
I am in freenode IRC #nmstate channel as Gris, ping me if you need any help on this.
Best regards!
nmstate-devel mailing list -- nmstate-devel@lists.fedorahosted.org To unsubscribe send an email to nmstate-devel-leave@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/nmstate-devel@lists.fedorahoste...
On Thu, Sep 17, 2020 at 05:28:06PM +0000, Ruben Torrero Marijnissen wrote:
Hi Gris,
Hi Ruben,
libnmstate.error.NmstateLibnmError: Checkpoint create failed: error=nm- client-error-quark: NetworkManager is not running (1) How could I continue without having NetworkManager running? The documentation (and example) covers the case of creating a plugin that will add additional types of interfaces, what would be the best approach?
Currently, nmstate require NM plugin been loaded as mandatory. I will try to remove that requirements before end of next week.
Please wait a little bit.
I was taking some time off recently, I will get the document done before end of next week also.
I dropped by #nmstate today but didn't find you. What timezone are you in? If you'd rather have me ask there, please let me know!
I am in UTC+8 time zone(China standard time), but I may stay up pretty late in the night. You may ping me via `Gris` on freenode.
Best regards!
On Fri, Sep 18, 2020 at 04:15:15PM +0800, Gris Ge wrote:
Currently, nmstate require NM plugin been loaded as mandatory. I will try to remove that requirements before end of next week.
Please wait a little bit.
I was taking some time off recently, I will get the document done before end of next week also.
Hi Ruben,
Sorry for the delay. I have created PR for changing NetworkManager plugin as optional: https://github.com/nmstate/nmstate/pull/1357
I will create document once that PR merged.
On Wed, Sep 30, 2020 at 04:07:18PM +0800, Gris Ge wrote:
On Fri, Sep 18, 2020 at 04:15:15PM +0800, Gris Ge wrote:
Currently, nmstate require NM plugin been loaded as mandatory. I will try to remove that requirements before end of next week.
Please wait a little bit.
I was taking some time off recently, I will get the document done before end of next week also.
Hi Ruben,
Sorry for the delay. I have created PR for changing NetworkManager plugin as optional: https://github.com/nmstate/nmstate/pull/1357
I will create document once that PR merged.
-- Gris Ge
Hi Ruben,
The PR has been merged and I have updated the document: https://www.nmstate.io/devel/plugin.html
Let me know if you any problem on coding your plugin.
Best regards!
Thanks Gris!
On Mon, 2020-10-12 at 11:55 +0800, Gris Ge wrote:
On Wed, Sep 30, 2020 at 04:07:18PM +0800, Gris Ge wrote:
On Fri, Sep 18, 2020 at 04:15:15PM +0800, Gris Ge wrote:
Currently, nmstate require NM plugin been loaded as mandatory. I will try to remove that requirements before end of next week.
Please wait a little bit.
I was taking some time off recently, I will get the document done before end of next week also.
Hi Ruben,
Sorry for the delay. I have created PR for changing NetworkManager plugin as optional: https://github.com/nmstate/nmstate/pull/1357
I will create document once that PR merged.
-- Gris Ge
Hi Ruben,
The PR has been merged and I have updated the document: https://www.nmstate.io/devel/plugin.html
Let me know if you any problem on coding your plugin.
Best regards!
nmstate-devel@lists.fedorahosted.org