[pve-devel] [PATCH installer v2 5/6] sys: command: add option to not print process output to stdout

2024-02-13 Thread Christoph Heiss
If $noprint is set, the output of the command won't be printed to stdout of the parent process. Fully backwards-compatible again, only takes effect if the new argument is actually specified. Signed-off-by: Christoph Heiss --- Changes since v1: * added parameter documentation Proxmox/Sys/Comm

[pve-devel] [PATCH installer v2 4/6] sys: command: allow terminating the process early from log subroutine

2024-02-13 Thread Christoph Heiss
If the logging subroutine $func returns CMD_FINISHED after processing a line, the running subprocess is killed early. This mechanism can be used when e.g. only a certain part of the output of a (long-running) command is needed, avoiding the extra time it would take the command to finish properly.

[pve-devel] [PATCH installer v2 1/6] low-level: initialize UI backend for 'dump-env' subcommand too

2024-02-13 Thread Christoph Heiss
Some detection routines might try to log things and call some Proxmox::Ui functions all the way down, so just initialize it with the stdio backend to avoid errors. Signed-off-by: Christoph Heiss --- Changes since v1: * no changes proxmox-low-level-installer | 1 + 1 file changed, 1 insertion(

[pve-devel] [PATCH installer v2 6/6] fix #4872: run env: use run_command() for country detection

2024-02-13 Thread Christoph Heiss
This fixes a rather longstanding issue [0][1] with the country detection, in that it might get completely stuck and thus hangs the installation. This is due how Perl, signals and line reading interacts. A minimal reproducer, how the installer currently works, looks like this: ``` #!/usr/bin/e

[pve-devel] [PATCH installer v2 2/6] sys: command: factor out kill() + waitpid() from run_command()

2024-02-13 Thread Christoph Heiss
This moves the kill() + waitpid() combo into a separate subroutine, avoiding open-coding that sequence. wait_for_process() also handles properly unkillable process (e.g. in D-state) and avoids completely locking up the installer in such cases. See [0]. For the latter case, a timeout exists (with a

[pve-devel] [PATCH installer v2 3/6] sys: command: handle EINTR in run_command()

2024-02-13 Thread Christoph Heiss
Previously, the I/O loop would continue endlessly until the subprocess exited. This explicit handling allows run_command() to be used with e.g. alarm(). Signed-off-by: Christoph Heiss --- Changes since v1: * new patch Proxmox/Sys/Command.pm | 9 - test/run-command.pl| 11

[pve-devel] [PATCH installer v2 0/6] fix #4872: properly timeout `traceroute` command in country detection

2024-02-13 Thread Christoph Heiss
For all the details, see patch #6. TL;DR: SIGALRM does not interrupt line reading using <>, causing the installer to hang on country detection. Fix it by using Proxmox::Sys::Command::run_command(), which properly interacts with SIGALRM. Patch #1 is a rather mundane fix for some niche cases, #2 is

Re: [pve-devel] [PATCH qemu-server v8 4/7] feature #1027: virtio-fs support

2024-02-13 Thread Fiona Ebner
Am 13.02.24 um 12:52 schrieb Markus Frank: > Thanks, > > I already moved most of the code into a new PVE/QemuServer/Virtiofs.pm > module. > Great! :) > Just an clarification & question concerning the queue-size: > > On  2024-01-31 16:02, Fiona Ebner wrote: >>> +    push @$devices, '-chardev',

Re: [pve-devel] [PATCH qemu-server v8 4/7] feature #1027: virtio-fs support

2024-02-13 Thread Markus Frank
Thanks, I already moved most of the code into a new PVE/QemuServer/Virtiofs.pm module. Just an clarification & question concerning the queue-size: On 2024-01-31 16:02, Fiona Ebner wrote: + push @$devices, '-chardev', "socket,id=virtfs$i,path=/var/run/virtiofsd/vm$vmid-fs$i"; + pu

[pve-devel] [PATCH pve-manager] sdn: evpn: allow empty primary exit node in zone form

2024-02-13 Thread Alexandre Derumier
It's broken since https://git.proxmox.com/?p=pve-network.git;a=commit;h=3e3cafabaf955d53c4c2d4e346bf5c3a5c6d1852 Signed-off-by: Alexandre Derumier --- www/manager6/sdn/zones/EvpnEdit.js | 5 + 1 file changed, 5 insertions(+) diff --git a/www/manager6/sdn/zones/EvpnEdit.js b/www/manager6/sd

Re: [pve-devel] applied: [PATCH pmg_docs 1/1] Consistency of GB and GiB pmg

2024-02-13 Thread Stoiko Ivanov
Thanks for the catch! pushed a fix-up On Tue, 6 Feb 2024 13:20:51 +0100 Thomas Lamprecht wrote: > Am 22/01/2024 um 18:58 schrieb Stoiko Ivanov: > > applied this one to pmg-docs - huge thanks! > > > > > > On Mon, Jul 10, 2023 at 03:49:49PM +0200, Noel Ullreich wrote: > >> Since the actual sy

Re: [pve-devel] [PATCH v2 pve-manager 11/11] fix #4759: debian/postinst: configure ceph-crash.service and its key

2024-02-13 Thread Max Carrara
On 2/12/24 14:34, Fabian Grünbichler wrote: > On February 5, 2024 6:54 pm, Max Carrara wrote: >> This commit adds the `set_ceph_crash_conf` function, which dynamically >> adapts the host's Ceph configuration in order to allow the Ceph crash >> module's daemon to run without elevated privileges. >>

Re: [pve-devel] [PATCH v2 pve-manager 09/11] fix #4759: ceph: configure keyring for ceph-crash.service

2024-02-13 Thread Max Carrara
On 2/12/24 14:34, Fabian Grünbichler wrote: > On February 5, 2024 6:54 pm, Max Carrara wrote: >> when creating the cluster's first monitor. >> >> Signed-off-by: Max Carrara >> --- >> Changes v1 --> v2: >> * do not enable/restart `ceph-crash` anymore when creating first mon >> * drop changes to

Re: [pve-devel] [PATCH v2 pve-storage 07/11] amend! cephconfig: allow writing arbitrary sections

2024-02-13 Thread Max Carrara
On 2/12/24 14:33, Fabian Grünbichler wrote: > On February 5, 2024 6:54 pm, Max Carrara wrote: >> cephconfig: allow writing arbitrary sections >> >> This adds support for writing arbitrary sections to 'ceph.conf' while >> ensuring that already written sections are not duplicated. >> >> Sections that

[pve-devel] [PATCH v2 pve-network 4/6] ipam: phpipam: fix get_ip_from_mac

2024-02-13 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm index f3f22b5..bb9f322 100644 --- a/src/PVE/Network/

[pve-devel] [PATCH v2 pve-network 1/6] ipams : add_next_freeip : return ip not cidr

2024-02-13 Thread Alexandre Derumier
we want same result than add_next_free_range Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/NetboxPlugin.pm | 13 - src/PVE/Network/SDN/Ipams/PVEPlugin.pm | 2 +- src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 2 +- 3 files changed, 6 insertions(+), 11 deletions

[pve-devel] [PATCH v2 pve-network 0/6] external ipams fixes

2024-02-13 Thread Alexandre Derumier
multiples ipam fixes v2: add netbox ipam ip_is_gateway fix Alexandre Derumier (6): ipams : add_next_freeip : return ip not cidr sdn: add proxy support for api calls ipam: phpipam: fix subnet create ipam: phpipam: fix get_ip_from_mac ipam: phpipam: add_range_next_freeip ipam: netbox

[pve-devel] [PATCH v2 pve-network 6/6] ipam: netbox : fix ip_is_gateway

2024-02-13 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/NetboxPlugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Ipams/NetboxPlugin.pm b/src/PVE/Network/SDN/Ipams/NetboxPlugin.pm index 14a69d9..d923269 100644 --- a/src/PVE/Network/SDN/Ipams/

[pve-devel] [PATCH v2 pve-network 5/6] ipam: phpipam: add_range_next_freeip

2024-02-13 Thread Alexandre Derumier
Currently is not possible in phpipam to search in specific range, fallback to full subnet search Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 12 1 file changed, 12 insertions(+) diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PV

[pve-devel] [PATCH v2 pve-network 3/6] ipam: phpipam: fix subnet create

2024-02-13 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm b/src/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm index 7b3168d..f3f22b5 100644 --- a/src/PVE/Network/SDN/I

[pve-devel] [PATCH v2 pve-network 2/6] sdn: add proxy support for api calls

2024-02-13 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- src/PVE/Network/SDN.pm | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PVE/Network/SDN.pm b/src/PVE/Network/SDN.pm index 3af09b5..b8f27d9 100644 --- a/src/PVE/Network/SDN.pm +++ b/src/PVE/Network/SDN.pm @@ -264,10 +264,9 @@ sub

Re: [pve-devel] [PATCH v2 pve-storage 06/11] cephconfig: allow writing arbitrary sections

2024-02-13 Thread Max Carrara
On 2/12/24 14:33, Fabian Grünbichler wrote: > On February 5, 2024 6:54 pm, Max Carrara wrote: >> This adds support for writing arbitrary sections to 'ceph.conf' while >> ensuring that already written sections are not duplicated. >> >> Sections that are associated with the client, for example >> '[c

Re: [pve-devel] [PATCH v2 pve-storage 05/11] cephconfig: align our parser more with Ceph's parser

2024-02-13 Thread Max Carrara
On 2/12/24 14:33, Fabian Grünbichler wrote: > On February 5, 2024 6:54 pm, Max Carrara wrote: >> 1. Comments, irrespective of whether they start with '#' or ';' are >> now treated the same. Otherwise, sections and key-value pairs with >> a trailing comment starting with ';' are still parse

Re: [pve-devel] [PATCH v2 master ceph 01/11] debian: add patch to fix ceph crash dir permissions in postinst hook

2024-02-13 Thread Max Carrara
On 2/12/24 14:32, Fabian Grünbichler wrote: > On February 5, 2024 6:54 pm, Max Carrara wrote: >> Ceph has a postinst hook that sets the ownership of '/var/lib/ceph/*' >> to ceph:ceph (in our case), but misses out on '/var/lib/ceph/crash/posted'. >> >> This patch therefore also updates the permissio