[pve-devel] [RFC PATCH http-server 1/2] add error message into http body

2025-01-08 Thread Dominik Csapak
In our rust client, we can't access the http reason phrases[0], so let's put them into the body itself if we don't specify an explicit content. our proxmox-client code in rust already uses the body as message if there is one [1], so we get that automatically. 0: https://github.com/hyperium/http/i

[pve-devel] [RFC PATCH http-server 2/2] use HTTP_INTERNAL_SERVER_ERROR were appropriate instead of '501'

2025-01-08 Thread Dominik Csapak
The http status code 501 is meant to be 'Not Implemented'[0] but that clearly does not fit here as the default error when we encounter a problem during handling an api request or upload. So instead use '500' (HTTP_INTERNAL_SERVER_ERROR) which we already use in other places where it fits. 0: https

[pve-devel] [RFC PATCH http-server 0/2] improve error handling on api errors

2025-01-08 Thread Dominik Csapak
these two patches improve the error handling for api errors: * put the error in the body (so we can access them in the rust client) * use the correct error code in some places (500 instead of 501) the second patch is not 100% necessary now IMHO, but it is more correct, than the status quo. Both p

Re: [pve-devel] [PATCH container/manager v2 0/3] Show container ip in summary and network tab

2025-01-08 Thread Gabriel Goller
Submitted a new version! ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Re: [pve-devel] [PATCH docs v2 1/2] pvesr: update the chapter and bring it into good condition

2025-01-08 Thread Daniel Kral
Thanks a lot for taking the time to rewrite this! Your changed text reads great and it feels like the right information is pointed to at the right time. I've added a few notes inline below. On 12/18/24 17:19, Alexander Zeidler wrote: * restructure and revise the introduction * add subchapter "

[pve-devel] SPAM: [PATCH pve-network v2 1/4] vnet: do not skip if no range is defined, ask for allocation inside prefix instead

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Vnets.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/PVE/Network/SDN/Vnets.pm b/src/PVE/Network/SDN/Vnets.pm index 45292e3..4e795f2 100644 --- a/src/PVE/Network/SDN/Vnets.pm +++ b/src/PVE/Netw

[pve-devel] SPAM: [PATCH pve-network v2 2/4] dhcp: always generate dhcp-range for dnsmasq

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- (configure_range is now noop) Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Dhcp.pm | 3 ++- src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 23 ++- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/PVE/Network/SDN/Dhcp.pm b/src/

[pve-devel] SPAM: [PATCH pve-network v2 2/7] ipam: nautobot: implement plain prefix allocation

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- add support for subnet allocation without ranges, where it was previously not supported. Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 68 + 1 file changed, 68 insertions(+) diff --git a/src/PVE/Network/SDN/Ipams/Nautobo

[pve-devel] SPAM: [PATCH pve-network v2 3/7] ipam: nautobot: add testing for nautobot plugin

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Signed-off-by: lou lecrivain --- src/test/ipams/nautobot/expected.add_ip | 11 + .../ipams/nautobot/expected.add_ip_notgateway | 11 + .../ipams/nautobot/expected.add_next_freeip | 11 + src/test/ipams/nautobot/expected.add_subnet | 11 +

[pve-devel] SPAM: [PATCH pve-network v2 0/7] add support for Nautobot IPAM

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Hello all, Following december's discussions related to the v1 of Nautobot Support for Proxmox SDN, please find v2 of this patch herein. I have edited the commit history to be more readable and also made the requested changes + some improvements since the last time. Document

[pve-devel] SPAM: [PATCH pve-network v2 5/7] ipam: nautobot: add checks for prefix deletion

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- check that prefix/subnet is empty (only gateway IPs should remain) before deletion. Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 60 - 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/src/PVE/Network/SDN/Ip

[pve-devel] SPAM: [PATCH pve-network v2 7/7] ipam: nautobot: systematically use namespace

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- this is needed in order to not accidentally use another subnet or IP which might be in another namespace. Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 40 + 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a

[pve-devel] SPAM: [PATCH pve-network v2 4/7] ipam: nautobot: base plugin + enhance errors

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- added error handling in helpers Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 126 ++-- 1 file changed, 113 insertions(+), 13 deletions(-) diff --git a/src/PVE/Network/SDN/Ipams/NautobotPlugin.pm b/src/PVE/Network/SDN/Ipams

[pve-devel] SPAM: [PATCH pve-network v2 4/4] update tests following changes to behaviour: - allocating IPs also when prefix-only - PVE IPAM register details for every allocation strategy

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Signed-off-by: lou lecrivain --- src/test/run_test_subnets.pl| 24 +--- src/test/run_test_vnets_blackbox.pl | 6 ++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/test/run_test_subnets.pl b/src/test/run_test_subnets.pl in

[pve-devel] SPAM: [PATCH pve-network v2 1/7] ipam: nautobot support initial commit

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- This is the initial Nautobot plugin, based on the Netbox plugin implementation. Signed-off-by: lou lecrivain --- src/PVE/API2/Network/SDN/Ipams.pm | 1 + src/PVE/Network/SDN/Ipams.pm| 3 + src/PVE/Network/SDN/Ipams/Makefile | 2 +- s

[pve-devel] SPAM: [PATCH pve-network v2 3/4] fix: register details in pve ipam db for add_next_freeip

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/PVEPlugin.pm | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Ipams/PVEPlugin.pm b/src/PVE/Network/SDN/Ipams/PVEPlugin.pm index 742f1b1..c225655 100644 --- a/src/PVE/Netwo

[pve-devel] SPAM: [PATCH pve-network v2 6/7] ipam: nautobot: add documentation

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PVE/Network/SDN/Ipams/NautobotPlugin.pm b/src/PVE/Network/SDN/Ipams/NautobotPlugin.pm index f736bad..3d60265 100644 ---

[pve-devel] SPAM: [PATCH pve-network v2 6/7] ipam: nautobot: add documentation

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PVE/Network/SDN/Ipams/NautobotPlugin.pm b/src/PVE/Network/SDN/Ipams/NautobotPlugin.pm index f736bad..3d60265 100644 ---

[pve-devel] SPAM: [PATCH pve-network v2 1/7] ipam: nautobot support initial commit

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- This is the initial Nautobot plugin, based on the Netbox plugin implementation. Signed-off-by: lou lecrivain --- src/PVE/API2/Network/SDN/Ipams.pm | 1 + src/PVE/Network/SDN/Ipams.pm| 3 + src/PVE/Network/SDN/Ipams/Makefile | 2 +- s

[pve-devel] SPAM: [PATCH pve-network v2 3/7] ipam: nautobot: add testing for nautobot plugin

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Signed-off-by: lou lecrivain --- src/test/ipams/nautobot/expected.add_ip | 11 + .../ipams/nautobot/expected.add_ip_notgateway | 11 + .../ipams/nautobot/expected.add_next_freeip | 11 + src/test/ipams/nautobot/expected.add_subnet | 11 +

[pve-devel] SPAM: [PATCH pve-network v2 0/7] add support for Nautobot IPAM

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- Re, Sorry for the previous thread, I got another patch mixed up and I didn't realized. This one is the correct one. BR Lou Lecrivain (7): ipam: nautobot support initial commit ipam: nautobot: implement plain prefix allocation ipam: nautobot: add testing for nautobot

[pve-devel] SPAM: [PATCH pve-network v2 5/7] ipam: nautobot: add checks for prefix deletion

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- check that prefix/subnet is empty (only gateway IPs should remain) before deletion. Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 60 - 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/src/PVE/Network/SDN/Ip

[pve-devel] SPAM: [PATCH pve-network v2 4/7] ipam: nautobot: base plugin + enhance errors

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- added error handling in helpers Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 126 ++-- 1 file changed, 113 insertions(+), 13 deletions(-) diff --git a/src/PVE/Network/SDN/Ipams/NautobotPlugin.pm b/src/PVE/Network/SDN/Ipams

[pve-devel] SPAM: [PATCH pve-network v2 7/7] ipam: nautobot: systematically use namespace

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- this is needed in order to not accidentally use another subnet or IP which might be in another namespace. Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 40 + 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a

[pve-devel] SPAM: [PATCH pve-network v2 2/7] ipam: nautobot: implement plain prefix allocation

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- add support for subnet allocation without ranges, where it was previously not supported. Signed-off-by: lou lecrivain --- src/PVE/Network/SDN/Ipams/NautobotPlugin.pm | 68 + 1 file changed, 68 insertions(+) diff --git a/src/PVE/Network/SDN/Ipams/Nautobo

Re: [pve-devel] [PATCH v2 pve-common 01/12] introduce PVE::Path

2025-01-08 Thread Wolfgang Bumiller
On Fri, Dec 20, 2024 at 07:51:56PM +0100, Max Carrara wrote: > The PVE::Path module concerns itself with file / directory path > operations, like getting the parent directory of a path, extracting > the file name of a path, splitting a path into its individual > components, joining path components

Re: [pve-devel] [PATCH container/manager v4 0/3] Show container ip in summary and network tab

2025-01-08 Thread Daniel Herzig
I just tested this series against an alpine container with sdn simple zone dhcp IP assignment and it seems to do what it promises. This makes a very nice streamlined experience with VM behaviour. Tested-by: Daniel Herzig Gabriel Goller writes: > Show the ip/hwaddress of the network interface

[pve-devel] [PATCH qemu] add fix for crash during live migration in combination with block flush

2025-01-08 Thread Fiona Ebner
Setting blk->root is a graph change operation and thus needs to be protected by the block graph write lock in blk_remove_bs(). The assignment to blk->root in blk_insert_bs() is already protected by the block graph write lock. In particular, the graph read lock in blk_co_do_flush() could previously

Re: [pve-devel] [PATCH v3 qemu-server 05/11] blockdev: convert cdrom media eject/insert

2025-01-08 Thread Fabian Grünbichler
> Alexandre Derumier via pve-devel hat am > 16.12.2024 10:12 CET geschrieben: > Signed-off-by: Alexandre Derumier > --- > PVE/QemuServer.pm | 15 ++- > 1 file changed, 10 insertions(+), 5 deletions(-) > > diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm > index 3b33fd7d..758c82

Re: [pve-devel] [PATCH v3 qemu-server 03/11] blockdev : convert qemu_driveadd && qemu_drivedel

2025-01-08 Thread Fabian Grünbichler
> Alexandre Derumier via pve-devel hat am > 16.12.2024 10:12 CET geschrieben: > fixme/testme : > PVE/VZDump/QemuServer.pm:eval { PVE::QemuServer::qemu_drivedel($vmid, > "tpmstate0-backup"); }; > > Signed-off-by: Alexandre Derumier > --- > PVE/QemuServer.pm | 64 +

[pve-devel] [PATCH manager v4 2/3] guest: refactor and reuse AgentIPView for containers

2025-01-08 Thread Gabriel Goller
Refactor AgentIPView to be generic over container and vms. Reuse it in the Container Summary to show the ip addresses of the container. Signed-off-by: Gabriel Goller --- www/manager6/Makefile | 2 +- www/manager6/panel/GuestStatusView.js | 140 +-

[pve-devel] [PATCH container v4 3/3] api: return all addresses of an interface

2025-01-08 Thread Gabriel Goller
Return all ip-addresses of an interface, not only the first one. Change return schema to resemble the 'agent/network-get-interfaces' qemu call reponse. This helps us making the AgentIPView more generic and display the ip on both containers and vms. Preserve old attributes so that we remain backward

[pve-devel] [PATCH container/manager v4 0/3] Show container ip in summary and network tab

2025-01-08 Thread Gabriel Goller
Show the ip/hwaddress of the network interfaces of containers in the summary tab of the container and in the network tab on a per-interface basis. This series was originally by Leo Nunner: https://lore.proxmox.com/pve-devel/20230615094333.66179-1-l.nun...@proxmox.com/ v4, thanks @Daniel: - remo

[pve-devel] [PATCH manager v4 1/3] lxc: show dynamically assigned IPs in network tab

2025-01-08 Thread Gabriel Goller
adds a call to /nodes/{node}/lxc/{vmid}/interfaces and merges the returned data with the existing configuration. This will update the IPv4 and IPv6 address, as well as the interface name (in case the container changed it). Originally-by: Leo Nunner Signed-off-by: Gabriel Goller --- www/manager6

[pve-devel] [PATCH manager] api: network: add more methods to return types

2025-01-08 Thread Dominik Csapak
i forgot to add 'loopback' and 'dhcp' to the schema, which can be returned here. Signed-off-by: Dominik Csapak --- PVE/API2/Network.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Network.pm b/PVE/API2/Network.pm index cfccdd9e..12ee6cca 100644 --- a/PVE/API2/

Re: [pve-devel] [PATCH manager v3 2/3] guest: refactor and reuse AgentIPView for containers

2025-01-08 Thread Gabriel Goller
On 08.01.2025 10:33, Gabriel Goller wrote: updateStatus: function(unsuccessful, defaulttext) { var me = this; - var text = defaulttext || gettext('No network information'); - var more = false; - if (unsuccessful) { - text = gettext('Guest Agent not running'

Re: [pve-devel] [PATCH v3 qemu-server 08/11] blockdev: convert drive_mirror to blockdev_mirror

2025-01-08 Thread Fabian Grünbichler
> Alexandre Derumier via pve-devel hat am > 16.12.2024 10:12 CET geschrieben: > Signed-off-by: Alexandre Derumier > --- > PVE/QemuMigrate.pm | 2 +- > PVE/QemuServer.pm | 106 +++-- > 2 files changed, 83 insertions(+), 25 deletions(-) > > diff --git

Re: [pve-devel] [PATCH v1 pve-qemu 1/1] add block-commit-replaces option patch

2025-01-08 Thread Fabian Grünbichler
> Alexandre Derumier via pve-devel hat am > 16.12.2024 10:12 CET geschrieben: > This is needed for external snapshot live commit, > when the top blocknode is not the fmt-node. > (in our case, the throttle-group node is the topnode) so this is needed to workaround a limitation in block-commit?

Re: [pve-devel] [PATCH v3 qemu-server 01/11] blockdev: cmdline: convert drive to blockdev syntax

2025-01-08 Thread Fabian Grünbichler
> Alexandre Derumier via pve-devel hat am > 16.12.2024 10:12 CET geschrieben: > The blockdev chain is: > -throttle-group-node (drive-(ide|scsi|virtio)x) > - format-node (fmt-drive-x) > - file-node (file-drive -x) > > fixme: implement iscsi:// path > Signed-off-by: Alexandre Derumier

Re: [pve-devel] [PATCH v3 qemu-server 04/11] blockdev: vm_devices_list : fix block-query

2025-01-08 Thread Fabian Grünbichler
> Alexandre Derumier via pve-devel hat am > 16.12.2024 10:12 CET geschrieben: > Look at qdev value, as cdrom drives can be empty > without any inserted media is this needed if we don't drive_del the cdrom drive when ejecting the medium? > > Signed-off-by: Alexandre Derumier > --- > PVE/Qe

Re: [pve-devel] [PATCH installer] fix #5984: unconfigured: do not reboot if auto-installer fails by default

2025-01-08 Thread Daniel Kral
On 12/17/24 11:26, Christoph Heiss wrote: But this still doesn't really fix the issue by honoring the `global.reboot_on_error` flag in any way, but just inverts the current behaviour? I.e. now it just always drops into the a shell, w/o ever auto-rebooting, even if `global.reboot_on_error = true`.

[pve-devel] [PATCH installer v2] fix #5984: unconfigured: do not reboot if auto-installer fails by default

2025-01-08 Thread Daniel Kral
An unintended side effect was introduced in 21ef304, which caused the auto-installer to reboot on error, even though the answer file option `general.reboot_on_error` has been set to `false`. When an error signal is received inside `unconfigured.sh` (after the trap statement `trap 'err_reboot' ERR`

[pve-devel] [PATCH http-server] fix #6503: return api handler errors in the json body

2025-01-08 Thread Dominik Csapak
similar to what we do for the extjs formatter, put the error message or status message in the 'message' property of the return object. This way client libraries can extract the error without having to parse the HTTP status reason phrase (which is not possible in all http libraries, e.g. hyperium's

[pve-devel] [PATCH container/manager v3 0/3] Show container ip in summary and network tab

2025-01-08 Thread Gabriel Goller
Show the ip/hwaddress of the network interfaces of containers in the summary tab of the container and in the network tab on a per-interface basis. This series was originally by Leo Nunner: https://lore.proxmox.com/pve-devel/20230615094333.66179-1-l.nun...@proxmox.com/ v3, thanks @Thomas, @Maximi

[pve-devel] [PATCH manager v3 2/3] guest: refactor and reuse AgentIPView for containers

2025-01-08 Thread Gabriel Goller
Refactor AgentIPView to be generic over container and vms. Reuse it in the Container Summary to show the ip addresses of the container. Signed-off-by: Gabriel Goller --- www/manager6/Makefile | 2 +- www/manager6/panel/GuestStatusView.js | 139 +-

[pve-devel] [PATCH manager v3 1/3] lxc: show dynamically assigned IPs in network tab

2025-01-08 Thread Gabriel Goller
adds a call to /nodes/{node}/lxc/{vmid}/interfaces and merges the returned data with the existing configuration. This will update the IPv4 and IPv6 address, as well as the interface name (in case the container changed it). Originally-by: Leo Nunner Signed-off-by: Gabriel Goller --- www/manager6

[pve-devel] [PATCH container v3 3/3] api: return all addresses of an interface

2025-01-08 Thread Gabriel Goller
Return all ip-addresses of an interface, not only the first one. Change return schema to resemble the 'agent/network-get-interfaces' qemu call reponse. This helps us making the AgentIPView more generic and display the ip on both containers and vms. Preserve old attributes so that we remain backward

[pve-devel] SPAM: [PATCH pve-docs] pvesdn: add documentation for Nautobot IPAM plugin

2025-01-08 Thread Lou Lecrivain via pve-devel
--- Begin Message --- From: Lou Lecrivain Signed-off-by: Lou Lecrivain Co-Authored-by: Jonatan Crystall --- pvesdn.adoc | 19 +++ 1 file changed, 19 insertions(+) diff --git a/pvesdn.adoc b/pvesdn.adoc index 5d5d27b..d4744ab 100644 --- a/pvesdn.adoc +++ b/pvesdn.adoc @@ -561,