Re: [pve-devel] [PATCH proxmox v2] worker_task: write result message manually, bypassing tracing

2025-02-18 Thread Gabriel Goller
On 18.02.2025 16:05, Wolfgang Bumiller wrote: On Tue, Feb 18, 2025 at 03:52:26PM +0100, Gabriel Goller wrote: diff --git a/proxmox-log/src/lib.rs b/proxmox-log/src/lib.rs index 8c74e42b618d..755d1b4a850c 100644 --- a/proxmox-log/src/lib.rs +++ b/proxmox-log/src/lib.rs @@ -191,3 +191,20 @@ pub fn

[pve-devel] [PATCH storage v2 2/2] btrfs: forcefully set image to readwrite

2025-02-18 Thread Maximiliano Sandoval
When a subvolume is transferred via btrfs send/receive the resulting image contains the received_uuid property set. This property is required to do incremental snapshots. A downside though is that once the received_uuid property is set, it is not possible to make the image readwrite again without

[pve-devel] [PATCH storage v2 1/2] fix #3873: btrfs: check for correct subvolume taking snapshot

2025-02-18 Thread Maximiliano Sandoval
Suppose we are taking a snapshot of VM 100's disk-0. The dir_glob_foreach runs over $path=/subvolume/images/100, lists all snapshot names and appends their names to the path of the disk, e.g. /subvolume/images/vm-100-disk-0@SNAP_NAME, but the original directory $path might contain a second disk `vm

Re: [pve-devel] [PATCH storage 1/2] fix #3873: btrfs: check for correct subvolume taking snapshot

2025-02-18 Thread Maximiliano Sandoval
Fiona Ebner writes: > Am 09.07.24 um 13:51 schrieb Maximiliano Sandoval: >> Suppose we are doing a snapshot of disk 0 for VM 100. The >> dir_glob_foreach runs over $path=/subvolume/images/100, lists all >> snapshot names and appends their names to the path of the disk, e.g. >> /subvolume/images

Re: [pve-devel] [PATCH proxmox{, -backup, -perl-rs} 0/4] Introduce builder for logging initialization

2025-02-18 Thread Gabriel Goller
wrong list again. sorry for the noise :( ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [PATCH proxmox-backup 1/1] log: use new builder initializer

2025-02-18 Thread Gabriel Goller
Use new logger builder to initialize the logging in each component. Signed-off-by: Gabriel Goller --- pbs-tape/src/bin/pmt.rs | 5 +++-- pbs-tape/src/bin/pmtx.rs | 5 +++-- proxmox-backup-client/src/main.rs | 6 -- proxmox-file-restore/src/main.rs | 7 +-- pxar-bi

[pve-devel] [PATCH proxmox 2/2] log: add layer for pve workertasks in perlmod crates

2025-02-18 Thread Gabriel Goller
Add a layer that outputs messages to stderr in a specific format. In PVE, stderr is rerouted to the tasklog if the we are within a workertask. Therefore, ensure the stderr output is formatted appropriately. Reported-by: Lukas Wagner Signed-off-by: Gabriel Goller --- proxmox-log/src/builder.rs

[pve-devel] [PATCH proxmox 1/2] log: introduce logging builder

2025-02-18 Thread Gabriel Goller
Add a builder-like struct to compose a tracing logger using different layers. Instead of having an init function per product/binary or super-specific init functions that describe the logger, have a dynamic builder. The builder improves the usability and makes the logging initialization more self-ex

[pve-devel] [PATCH proxmox{, -backup, -perl-rs} 0/4] Introduce builder for logging initialization

2025-02-18 Thread Gabriel Goller
To move away from product-specific logging functions or overly long and descriptive initialization functions, add a builder-type structure. This structure will combine layers and compose a logger more descriptively. The is backwards compatible as the old functions have not been removed and are onl

[pve-devel] [PATCH proxmox-perl-rs 1/1] log: use new logging builder, print to stderr and journald

2025-02-18 Thread Gabriel Goller
Use the new builder. Print the logs to stderr and journald always. Remove the log dependency. Suggested-by: Lukas Wagner Signed-off-by: Gabriel Goller --- common/src/logger.rs | 7 ++- pmg-rs/Cargo.toml| 1 - pmg-rs/src/lib.rs| 2 +- pve-rs/Cargo.toml| 1 - 4 files changed, 7 in

Re: [pve-devel] [PATCH proxmox v2] worker_task: write result message manually, bypassing tracing

2025-02-18 Thread Wolfgang Bumiller
On Tue, Feb 18, 2025 at 03:52:26PM +0100, Gabriel Goller wrote: > The workertasks currently get their status from parsing the log > messages in the task-log file. The problem is that if these messages are > filtered – which is now possible using the PBS_LOG env variable – some > workertasks will en

Re: [pve-devel] [PATCH proxmox v2] worker_task: write result message manually, bypassing tracing

2025-02-18 Thread Gabriel Goller
Wrong mailing list, please ignore :( ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

[pve-devel] [PATCH proxmox v2] worker_task: write result message manually, bypassing tracing

2025-02-18 Thread Gabriel Goller
The workertasks currently get their status from parsing the log messages in the task-log file. The problem is that if these messages are filtered – which is now possible using the PBS_LOG env variable – some workertasks will end up with a "stopped: unknown" status. This is not desirable so write th

Re: [pve-devel] [PATCH manager v13 10/12] ui: add resource mapping view for directories

2025-02-18 Thread Fiona Ebner
Am 22.01.25 um 11:08 schrieb Markus Frank: > + }, > + { > + header: gettext('Comment'), > + dataIndex: 'description', > + renderer: function(value, _meta, record) { > + return value ?? record.data.comment; Needs to be HTML encoded, see how it is done for

[pve-devel] applied-series: [PATCH-SERIES qemu-server v3 0/3] fix #6007: fix PBS template backup for certain configurations

2025-02-18 Thread Fabian Grünbichler
including my follow-ups with Fiona's R-B On February 12, 2025 12:04 pm, Fiona Ebner wrote: > Changes in v3: > * actually decouple config data and control flow by using a blessed object > > Changes in v2: > * add comment about decoupling config data and metadata > > Fiona Ebner (3): > backup: a

[pve-devel] applied: [PATCH qemu-server] resume: error out if VM is a template

2025-02-18 Thread Thomas Lamprecht
Am 18.02.25 um 12:03 schrieb Fabian Grünbichler: > template VMs might be started in prelaunch state when creating a backup, but > they must never be actually started fully, to avoid modifying their disks. > > Signed-off-by: Fabian Grünbichler > --- > PVE/QemuServer.pm | 3 +++ > 1 file changed,

[pve-devel] applied-series: [PATCH manager/nvidia-vgpu-helper v5 0/5] reduce setup steps for nvidia vgpu drivers

2025-02-18 Thread Thomas Lamprecht
Am 13.02.25 um 09:15 schrieb Hannes Duerr: > Changes in v5: > in commits > > Changes in v4: > in commits > > Changes in v3: > * install headers for every installed kernel version by default > * additionally add patch to only install headers for running kernel > version and newer ones, this requ

Re: [pve-devel] [PATCH qemu-server] resume: error out if VM is a template

2025-02-18 Thread Fiona Ebner
Am 18.02.25 um 12:03 schrieb Fabian Grünbichler: > template VMs might be started in prelaunch state when creating a backup, but > they must never be actually started fully, to avoid modifying their disks. > > Signed-off-by: Fabian Grünbichler > --- > PVE/QemuServer.pm | 3 +++ > 1 file changed,

Re: [pve-devel] [PATCH qemu 1/2] vm-network-scripts: move scripts to /usr/libexec

2025-02-18 Thread Maximiliano Sandoval
Fabian Grünbichler writes: > I think we do need to ship the file in both places before 9.0 and switch > over to using the new location (i.e., almost what this patch does), and > then we can drop the old location with 9.0 since we know that no > reference to the old location should still be in us

[pve-devel] [PATCH qemu-server v2 2/2] test: Adapt to changes in network scripts location

2025-02-18 Thread Maximiliano Sandoval
>From the previous commit. Signed-off-by: Maximiliano Sandoval --- test/cfg2cmd/bootorder-empty.conf.cmd| 2 +- test/cfg2cmd/bootorder-legacy.conf.cmd | 2 +- test/cfg2cmd/bootorder.conf.cmd | 2 +- test/cfg2cmd/efidisk-on-rbd.conf.c

[pve-devel] [PATCH qemu-server v2 1/2] vm-network-scripts: move scripts to /usr/libexec

2025-02-18 Thread Maximiliano Sandoval
Moves the network scripts from /var/lib/qemu-server into /usr/libexec/qemu-server. /usr/libexec is described as binaries run by programs which are not intended to be directly executed by the user on [FHS 4.7]. On the other hand /var/lib corresponds to variable state information, which does not fit

[pve-devel] [PATCH qemu-server 0/2] follow-ups for "v3 fix #6007: fix PBS template backup for certain configurations"

2025-02-18 Thread Fabian Grünbichler
two patches as suggestions for follow-ups after some off-list discussion Fabian Grünbichler (2): config: revamp NoWrite interface config: make attempts at writing out NoWrite configs fatal PVE/QemuConfig/NoWrite.pm | 7 ++- PVE/QemuServer.pm | 4 +++- 2 files changed, 5 insertion

Re: [pve-devel] [PATCH qemu-server 0/2] follow-ups for "v3 fix #6007: fix PBS template backup for certain configurations"

2025-02-18 Thread Fiona Ebner
Am 18.02.25 um 14:08 schrieb Fabian Grünbichler: > two patches as suggestions for follow-ups after some off-list discussion Both sound sensible to me :) > > Fabian Grünbichler (2): > config: revamp NoWrite interface > config: make attempts at writing out NoWrite configs fatal > > PVE/QemuC

[pve-devel] [PATCH qemu-server 1/2] config: revamp NoWrite interface

2025-02-18 Thread Fabian Grünbichler
instead of blessing a passed-in config and returning it, explicitly only bless without returning to make it more obvious to callers that this affects the argument. Signed-off-by: Fabian Grünbichler --- PVE/QemuConfig/NoWrite.pm | 4 +--- PVE/QemuServer.pm | 4 +++- 2 files changed, 4 ins

[pve-devel] [PATCH qemu-server 2/2] config: make attempts at writing out NoWrite configs fatal

2025-02-18 Thread Fabian Grünbichler
attempting to write such a config is already a bug, and execution should not continue in this case. very often a write of the config will be followed by reloading it, expecting changes to be persisted and possibly missing re-checking of the original reason for marking the config as NoWrite. Signed

Re: [pve-devel] [PATCH qemu-server/manager/docs 0/3] close #5291: support disabling KSM for specific VMs

2025-02-18 Thread Friedrich Weber
On 17/02/2025 16:04, Fiona Ebner wrote: > KSM exposes a guest's virtual memory to side-channel attacks. Add a VM > configuration option to disable KSM for specific VMs that need to be > protected against such attacks. This makes it possible to still > benefit from KSM for other processes on the hos

Re: [pve-devel] [PATCH guest-common v13 2/12] add dir mapping section config

2025-02-18 Thread Fiona Ebner
Am 22.01.25 um 11:08 schrieb Markus Frank: > Adds a config file for directories by using a 'map' property string for > each node mapping. > > Next to node & path, there is the optional announce-submounts parameter > which forces virtiofsd to report a different device number for each > submount it

[pve-devel] [RFC cluster 2/2] cluster files: support registering UTF-8 configuration file

2025-02-18 Thread Fiona Ebner
A configuration file registered as UTF-8 will be automatically decoded from UTF-8 to Perl's internal string format after reading and encoded in the other direction before writing. Signed-off-by: Fiona Ebner --- Tested a bit with the virtiofs directory mapping config opting into this, which could

[pve-devel] [RFC common 1/2] section config: prepare for supporting UTF-8 encoded configurations

2025-02-18 Thread Fiona Ebner
Configurations registered as UTF-8 will be decoded after reading to Perl's internal string format and then contain wide characters. The Digest::SHA::sha1_hex() function croaks on wide characters, so encode again before calling the function if there are wide characters. Signed-off-by: Fiona Ebner

[pve-devel] [RFC common/cluster] cluster files: support registering UTF-8 configuration file

2025-02-18 Thread Fiona Ebner
A configuration file registered as UTF-8 will be automatically decoded from UTF-8 to Perl's internal string format after reading and encoded in the other direction before writing. common: Fiona Ebner (1): section config: prepare for supporting UTF-8 encoded configurations src/PVE/SectionConfi

Re: [pve-devel] [PATCH proxmox-i18n v2 2/2] make: add proxmox-datacenter-manager translations

2025-02-18 Thread Maximiliano Sandoval
Maximiliano Sandoval writes: > Maximiliano Sandoval writes: > >> Maximiliano Sandoval writes: >> >>> Maximiliano Sandoval writes: >>> The catalog-{lang}.mo files are generated only with strings that are relevant to the proxmox-datacenter-manager instead of the whole {lang}.po

Re: [pve-devel] StorPool storage plugin concerns

2025-02-18 Thread Ivaylo Markov via pve-devel
--- Begin Message --- Hello, On 14/02/2025 13:42, Fabian Grünbichler wrote: AFAICT from the description above (not looking at code or actually testing anything), issues on your storage layer should be ruled out. But it still leaves issues with anything else, e.g. any long running task (either

[pve-devel] [PATCH manager v4 7/9] ui: remove warning about entropy starvation of /dev/random

2025-02-18 Thread Filip Schauer
Remove the warning about entropy-starvation when using /dev/random as the entropy source. This concern no longer applies since the removal of the blocking entropy pool in kernel version 5.6. [1] [2] [1] https://git.kernel.org/torvalds/c/acd77500aa8a337baa6d853568c4b55aca48e20f [2] https://lwn.net/

[pve-devel] [PATCH qemu-server v4 3/9] add helpers for VirtIO RNG command line arguments

2025-02-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 18 +- PVE/QemuServer/RNG.pm | 30 ++ 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 09d2b3a8..70518924 100644 --- a/PVE/QemuServer.pm

Re: [pve-devel] [PATCH cluster/guest-common/manager/qemu-server v3 00/11] fix #5657: allow configuring RNG device as non-root user

2025-02-18 Thread Filip Schauer
Superseded by: https://lore.proxmox.com/pve-devel/2025021802.40055-1-f.scha...@proxmox.com/ On 11/02/2025 13:34, Fabian Grünbichler wrote: do we expect other hardware RNG device paths in the future? No, not in the near future at least. There is a patch [1] for this from 2016, but this was

[pve-devel] [PATCH qemu-server v4 1/9] remove outdated /dev/random entropy-starvation warnings

2025-02-18 Thread Filip Schauer
Remove mentions about entropy-starvation, when using /dev/random as the entropy source, from the descriptions of the rng parameters. This concern no longer applies since the removal of the blocking entropy pool in kernel version 5.6. [1] [2] [1] https://git.kernel.org/torvalds/c/acd77500aa8a337baa

[pve-devel] [PATCH qemu-server v4 2/9] refactor: move rng related code into its own module

2025-02-18 Thread Filip Schauer
Move code related to VirtIO RNG configuration for a VM to its own module. Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 60 +--- PVE/QemuServer/Makefile | 1 + PVE/QemuServer/RNG.pm | 86 + 3 files changed, 89 insert

[pve-devel] [PATCH manager v4 8/9] ui: permissions: add ACL path for hardware RNG

2025-02-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- www/manager6/data/PermPathStore.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/manager6/data/PermPathStore.js b/www/manager6/data/PermPathStore.js index 8785a1d7..8212b17d 100644 --- a/www/manager6/data/PermPathStore.js +++ b/www/manager6/data/PermPat

[pve-devel] [PATCH manager/qemu-server v4 0/9] fix #5657: allow configuring RNG device as non-root user

2025-02-18 Thread Filip Schauer
Allow users with the VM.Config.HWType privilege to configure VirtIO RNG devices on VMs with either /dev/urandom or /dev/random as the entropy source. Users with the Mapping.Use privilege on the /mapping/hwrng ACL path may also configure /dev/hwrng as an entropy source. Changes since v3: * Remove h

[pve-devel] [PATCH qemu-server v4 6/9] allow non-root users to set /dev/hwrng as an RNG source

2025-02-18 Thread Filip Schauer
Allow users with the Mapping.Use privilege on the /mapping/hwrng path to configure /dev/hwrng as an entropy source for VirtIO RNG devices. Signed-off-by: Filip Schauer --- PVE/API2/Qemu.pm | 2 +- PVE/QemuServer.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/API2/

[pve-devel] [PATCH manager v4 9/9] ui: let non-root users configure VirtIO RNG devices

2025-02-18 Thread Filip Schauer
Allow non-root users with the VM.Config.HWType privilege to configure /dev/urandom & /dev/random as an entropy source for a VirtIO RNG device. Users with the Mapping.Use privilege on the /mapping/hwrng ACL path may also configure /dev/hwrng as an entropy source. Signed-off-by: Filip Schauer ---

[pve-devel] [PATCH qemu-server v4 5/9] allow non-root users to set /dev/u?random as an RNG source

2025-02-18 Thread Filip Schauer
Allow non-root users with the VM.Config.HWType privilege to configure /dev/urandom & /dev/random as an entropy source for a VirtIO RNG device. /dev/hwrng remains restricted to the root user. Signed-off-by: Filip Schauer --- PVE/API2/Qemu.pm | 29 + PVE/QemuServer.pm

[pve-devel] [PATCH qemu-server v4 4/9] refactor: check_mapping_access: move root user check to the top

2025-02-18 Thread Filip Schauer
Signed-off-by: Filip Schauer --- PVE/QemuServer.pm | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 70518924..6c842924 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -6378,12 +6378,14 @@ sub check_bridge_access { sub

[pve-devel] [PATCH qemu-server] resume: error out if VM is a template

2025-02-18 Thread Fabian Grünbichler
template VMs might be started in prelaunch state when creating a backup, but they must never be actually started fully, to avoid modifying their disks. Signed-off-by: Fabian Grünbichler --- PVE/QemuServer.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServe

Re: [pve-devel] [PATCH qemu-server v3 2/3] config: add special class that prevents writing the configuration

2025-02-18 Thread Wolfgang Bumiller
On Wed, Feb 12, 2025 at 12:04:26PM +0100, Fiona Ebner wrote: > To be used in the context of template backup, where a minimized > temporary configuration is created to start the VM in 'prelaunch' > mode. Issue a warning, so that code paths where this happens will be > noted and can be evaluated and

Re: [pve-devel] [PATCH qemu-server v2 2/2] config: add AMD SEV-SNP support.

2025-02-18 Thread Daniel Kral
On 2/17/25 15:06, Philipp Giersfeld wrote: This patch is for enabling AMD SEV-SNP support. Where applicable, it extends support for existing SEV(-ES) variables to SEV-SNP. This means that it retains no-debug and kernel-hashes options, but the no-key-sharing option is removed. The default policy

Re: [pve-devel] [PATCH qemu-server v2 1/2] Convert policy calculation

2025-02-18 Thread Daniel Kral
On 2/17/25 15:06, Philipp Giersfeld wrote: Convert policy calcucalation to use shift operators and OR operation instead of binary numbers and addition. Signed-off-by: Philipp Giersfeld Nice to see that you implemented the suggestion, IMO it's more readable now for future adaptation and cross

Re: [pve-devel] [PATCH pve-manager v2 1/1] Add configuration options for AMD SEV-SNP

2025-02-18 Thread Markus Frank
Thank you for your effort to make amd sev snp support possible. For this patch I have some comments inline below. For the rest of the patch series, it is still working fine. If the qemu-server and edk2-firmware patches do not change, you can add this there: Tested-by: Markus Frank On 2025-02