-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetworkUpdate: Operation not supported: can't update 'ip' section of network 'default' #87
Comments
The error you're getting seems to be coming from |
I get the same response regardless of values (tried 1, 2, 3, 4, 5, and 500):
I am using Go 1.12 and modules.
Just in case there's a specific version or something. |
Hmm. Going with your suggestion, I "widened" the net... I tried setting command, section, and flags to 4. Flags wouldn't allow it (actually gave me a flags related error). But...
Gave me:
... and as proof:
... and running it again errors out (as expected):
Is something cross-wired somewhere? Even in my code? Sadly, I'm not spotting anything. (But also admitting I'm a Go rookie, haven't touched C in 30 years, and utter neophyte with Libvirt! LOL) |
Thank you so much for posting this issue. We've just run into it with the terraform libvirt provider. Seems there has been work going on upstream to improve a situation where See:
|
At some point we will need to swap the params back once a change has made it's way through the system. digitalocean/go-libvirt#87 `command` and `section` params are reversed now and will need to be put back in order when fix flows through history: https://listman.redhat.com/archives/libvir-list/2021-March/msg00054.html merged fix: https://listman.redhat.com/archives/libvir-list/2021-March/msg00758.html
At some point we will need to swap the params back once a change has made it's way through the system. digitalocean/go-libvirt#87 `command` and `section` params are reversed now and will need to be put back in order when fix flows through history: https://listman.redhat.com/archives/libvir-list/2021-March/msg00054.html merged fix: https://listman.redhat.com/archives/libvir-list/2021-March/msg00758.html
My take on this is cfergeau@8108763 |
NetworkUpdateFixed is a wrapper over NetworkUpdate which swaps `Command` and `Section` when needed. This function must be used instead of NetworkUpdate to be sure that the NetworkUpdate call works both with older and newer libvirtd connections. libvirt on-wire protocol had a bug for a long time where Command and Section were reversed. It's been fixed in newer libvirt versions, and backported to some older versions. This helper detects what argument order libvirtd expects and makes the correct NetworkUpdate call. Ideally 'NetworkUpdate' in internal/constants/remote_protocol.gen.go could be renamed to 'networkUpdate' or such, and the new helper would be 'NetworkUpdate', but I don't know if it's possible to do this with the code generator. See https://listman.redhat.com/archives/libvir-list/2021-March/msg00054.html https://gitlab.com/libvirt/libvirt/-/commit/94741bc53e9b9a405fae8f2e96b780c2891b2ff0 https://gitlab.com/libvirt/libvirt/-/commit/b0f78d626a18bcecae3a4d165540ab88bfbfc9ee This fixes digitalocean#87
NetworkUpdateCompat is a wrapper over NetworkUpdate which swaps `Command` and `Section` when needed. This function must be used instead of NetworkUpdate to be sure that the NetworkUpdate call works both with older and newer libvirtd connections. libvirt on-wire protocol had a bug for a long time where Command and Section were reversed. It's been fixed in newer libvirt versions, and backported to some older versions. This helper detects what argument order libvirtd expects and makes the correct NetworkUpdate call. Ideally 'NetworkUpdate' in internal/constants/remote_protocol.gen.go could be renamed to 'networkUpdate' or such, and the new helper would be 'NetworkUpdate', but I don't know if it's possible to do this with the code generator. See https://listman.redhat.com/archives/libvir-list/2021-March/msg00054.html https://gitlab.com/libvirt/libvirt/-/commit/94741bc53e9b9a405fae8f2e96b780c2891b2ff0 https://gitlab.com/libvirt/libvirt/-/commit/b0f78d626a18bcecae3a4d165540ab88bfbfc9ee This fixes digitalocean#87
NetworkUpdateCompat is a wrapper over NetworkUpdate which swaps `Command` and `Section` when needed. This function must be used instead of NetworkUpdate to be sure that the NetworkUpdate call works both with older and newer libvirtd connections. libvirt on-wire protocol had a bug for a long time where Command and Section were reversed. It's been fixed in newer libvirt versions, and backported to some older versions. This helper detects what argument order libvirtd expects and makes the correct NetworkUpdate call. Ideally 'NetworkUpdate' in internal/constants/remote_protocol.gen.go could be renamed to 'networkUpdate' or such, and the new helper would be 'NetworkUpdate', but I don't know if it's possible to do this with the code generator. See https://listman.redhat.com/archives/libvir-list/2021-March/msg00054.html https://gitlab.com/libvirt/libvirt/-/commit/94741bc53e9b9a405fae8f2e96b780c2891b2ff0 https://gitlab.com/libvirt/libvirt/-/commit/b0f78d626a18bcecae3a4d165540ab88bfbfc9ee This fixes digitalocean#87
NetworkUpdateCompat is a wrapper over NetworkUpdate which swaps `Command` and `Section` when needed. This function must be used instead of NetworkUpdate to be sure that the NetworkUpdate call works both with older and newer libvirtd connections. libvirt on-wire protocol had a bug for a long time where Command and Section were reversed. It's been fixed in newer libvirt versions, and backported to some older versions. This helper detects what argument order libvirtd expects and makes the correct NetworkUpdate call. Ideally 'NetworkUpdate' in internal/constants/remote_protocol.gen.go could be renamed to 'networkUpdate' or such, and the new helper would be 'NetworkUpdate', but I don't know if it's possible to do this with the code generator. See https://listman.redhat.com/archives/libvir-list/2021-March/msg00054.html https://gitlab.com/libvirt/libvirt/-/commit/94741bc53e9b9a405fae8f2e96b780c2891b2ff0 https://gitlab.com/libvirt/libvirt/-/commit/b0f78d626a18bcecae3a4d165540ab88bfbfc9ee This fixes #87
I'm not entirely certain if this is a bug in my code or something is up with the NetworkUpdate call from this library.
I'm writing some code that will ultimately be installed into a VM in order to manage multiple VM's. The base OS layer does not have any libvirt dependencies, and this is the best solution for my needs. (So thanks for that!)
When I do a NetworkUpdate to add an IP>DHCP>Host entry, an error is generated:
Operation not supported: can't update 'ip' section of network 'default'
.What I've done:
libvirt/libvirt-go
library, and it works.virsh
command-line.Therefore, I think I've got a valid setup but haven't been able to identify what may be wrong (in either code base).
Running on Ubuntu 18.04.2.
Using this library (and it fails):
Using the
libvirt/libvirt-go
library (and it works):Using
virsh
:If it's useful, the specific usage is in the
libvirtManager
here. It's been rejiggered into the samples to work out whatever issue is occurring.Thanks for any information you may provide!
The text was updated successfully, but these errors were encountered: