[pve-devel] [PATCH manager] Revert "ui: dc: remove notify key from datacenter option view"

2024-02-09 Thread Lukas Wagner
This reverts commit c81bca2d28744616098448b81fa58e133d3ac5ed. In the first iteration of the notification system, notification routing and enabling/disabling notifications was configured via the (extended) `notify` parameter in `datacenter.cfg`. Because of that, the configuration UI for this parame

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

2024-02-09 Thread Christoph Heiss
For all the details, see patch #4. 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 an

[pve-devel] [PATCH installer 3/4] sys: command: add option to not print process output to stdout

2024-02-09 Thread Christoph Heiss
Fully backwards-compatible again, only takes effect if the new argument is actually specified. Signed-off-by: Christoph Heiss --- Proxmox/Sys/Command.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Proxmox/Sys/Command.pm b/Proxmox/Sys/Command.pm index bf67b27..a5129fd

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

2024-02-09 Thread Christoph Heiss
This is done in a entirely backwards-compatible way, i.e. existing usages don't need any modification. Signed-off-by: Christoph Heiss --- Proxmox/Sys/Command.pm | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Proxmox/Sys/Command.pm b/Proxmox/Sys/Command.pm index c3e24

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

2024-02-09 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 1/4] low-level: initialize UI backend for 'dump-env' subcommand too

2024-02-09 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 --- proxmox-low-level-installer | 1 + 1 file changed, 1 insertion(+) diff --git a/proxmox-low-level

[pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module

2024-02-09 Thread Fiona Ebner
First patch is the only change in behavior, rest is cleanups. Fiona Ebner (4): QMP client: increase default timeout for drive-mirror to 10 minutes QMP client: remove unnecessary question mark from comment QMP client: add missing use statement QMP client: code cleanup: sort commands with 10

[pve-devel] [PATCH qemu-server 3/4] QMP client: add missing use statement

2024-02-09 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- PVE/QMPClient.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm index 42e54f01..4c025b36 100644 --- a/PVE/QMPClient.pm +++ b/PVE/QMPClient.pm @@ -4,6 +4,7 @@ use strict; use warnings; use IO::Multiplex; +use IO::Socket::U

[pve-devel] [RFC qemu-server 4/4] QMP client: code cleanup: sort commands with 10 minutes timeout alphabetically

2024-02-09 Thread Fiona Ebner
Signed-off-by: Fiona Ebner --- It's kind of grouped by related operations right now, but not consistently. Making it consistent and sorting the groups is a potential alternative. PVE/QMPClient.pm | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/PVE/QMPClien

[pve-devel] [PATCH qemu-server 1/4] QMP client: increase default timeout for drive-mirror to 10 minutes

2024-02-09 Thread Fiona Ebner
like for other block operations. Reported in the community forum: https://forum.proxmox.com/threads/141238/ Signed-off-by: Fiona Ebner --- PVE/QMPClient.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm index ef5c19b3..0a35db74 100644 --- a/PVE/QMPClient

[pve-devel] [PATCH qemu-server 2/4] QMP client: remove unnecessary question mark from comment

2024-02-09 Thread Fiona Ebner
There might've been a question back when it got first added in commit 9d689077 ("use long timeouts for snapshot monitor command"). But nowadays, the value is well-established. Changing it would affect quite a few operations, so that should not be done without good reason and is likely better done f

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

2024-02-09 Thread Aaron Lauterer
Is this something I should consider for the new dump-udev subcommand as well? https://lists.proxmox.com/pipermail/pve-devel/2024-January/061433.html On 2/9/24 11:55, Christoph Heiss wrote: Some detection routines might try to log things and call some Proxmox::Ui functions all the way down, so j

[pve-devel] [PATCH manager 2/3] ui: user edit: hide key field except for legacy values

2024-02-09 Thread Fiona Ebner
It should not be possible to set new legacy values via the UI, the TFA configuration window should be used to set second factors. Existing values are only interesting to show in case it's one of the legacy values 'x!' or a legacy secret e.g. synced from LDAP. In the latter case it's kept editable

[pve-devel] [PATCH manager 1/3] ui: user edit: protect user's TFA settings again

2024-02-09 Thread Fiona Ebner
Same rationale as in 5b25580d ("Protect the user's tfa key setting."): it should not be possible to change the value when it's not an actual secret but a reference to what TFA method is used or, in case of 'x', whether TFA is used. Signed-off-by: Fiona Ebner --- www/manager6/dc/UserEdit.js | 5 +

[pve-devel] [PATCH-SERIES manager] ui: user edit: improve 'keys' field

2024-02-09 Thread Fiona Ebner
Nowadays, TFA is configured in the respective window, so only legacy values require some special treatment. The only real use case for actual legacy keys is syncing them from LDAP. I wasn't sure if it still makes sense to keep those editable, so the series is doing the changes towards a more restri

[pve-devel] [PATCH manager 3/3] ui: user edit: prohibit editing keys option

2024-02-09 Thread Fiona Ebner
by turning the field into a displayfield. The TFA configuration window should be used to set second factors. It's still worth showing the field in case it's a legacy value. Editing a secret that was originally synced from LDAP is a use case where editing the field might've still made sense, but it

[pve-devel] [PATCH container v3] pct: add keep-env option

2024-02-09 Thread Folke Gleumes
The keep-env option allows the user to define if the current environment should be kept when running 'pct enter/exec'. pct will now always set '--keep-env' or '--clear-env' when calling lxc-attach to anticipate the upcoming change in default behavior. Signed-off-by: Folke Gleumes --- changes in

[pve-devel] [PATCH v2 common] REST environment: warn helpers: also log messages to syslog

2024-02-09 Thread Fiona Ebner
for better visibility. When not in a task, warnings from these helpers are only logged to STDERR, which is particularly unhelpful in case of daemons. This is the main motivation behind this change. For tasks, warnings from these helpers are already more visible on the UI side, but when looking at

[pve-devel] applied: [PATCH container v2 2/2] pct: add keep-env option

2024-02-09 Thread Thomas Lamprecht
Am 02/02/2024 um 17:53 schrieb Thomas Lamprecht: > Am 29/01/2024 um 16:43 schrieb Folke Gleumes: >> The keep-env option allows the user to define if the current environment >> should be kept when running 'pct enter/exec'. pct will now always set >> '--keep-env' or '--discard-env' when calling lxc-a