[pve-devel] applied: [RFC qemu-server] api: create disks: avoid adding secondary cloud-init drives

2022-09-12 Thread Thomas Lamprecht
Am 06/05/2022 um 12:11 schrieb Fabian Ebner: > This will break possibly existing workflows like > 1. add second cloud-init > 2. remove first cloud-init > to change the cloud-init storage. > > On the other hand, it avoids unintended misconfiguration of having > mutliple cloud-init drives with poten

[pve-devel] applied: [PATCH docs v2 1/3] network: remove ifup ifdown as it won't reattach guests

2022-09-12 Thread Thomas Lamprecht
Am 02/06/2022 um 11:22 schrieb Aaron Lauterer: > Mentioning 'ifup' and 'ifdown' can lead to users running into situations > where they take down one interface, for example an vmbrX. In this > situation the connection to the guests will be lost and not > reestablished automatically if the interface

[pve-devel] applied-series: [PATCH docs v2 0/3] network: update & reword

2022-09-12 Thread Thomas Lamprecht
Am 02/06/2022 um 11:22 schrieb Aaron Lauterer: > Update the network section to > - remove mentioning ifup & ifdown as it can break connections of running > guests > - ifupdown2 is default now, we can remove the verbose install guide > - rework the introduction to make a few conecpts clear to people

[pve-devel] [PATCH V2 pve-storage 1/8] add a storage_exists function

2022-09-12 Thread Stefan Hrdlicka
adds a function that can take a volume id and return the relevant storage config Signed-off-by: Stefan Hrdlicka --- PVE/Storage.pm | 9 + 1 file changed, 9 insertions(+) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index b9c53a1..9e95e3d 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm

[pve-devel] [PATCH V2 qemu-server 7/8] cleanup: shorten line

2022-09-12 Thread Stefan Hrdlicka
Signed-off-by: Stefan Hrdlicka --- PVE/QemuServer.pm | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 85b005e..558e8a9 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -2361,7 +2361,11 @@ sub destroy_vm { } e

[pve-devel] [PATCH V2 qemu-server 5/8] add ignore-storage-errors attribute for removing VM with missing storage

2022-09-12 Thread Stefan Hrdlicka
Signed-off-by: Stefan Hrdlicka --- PVE/API2/Qemu.pm | 8 PVE/QemuServer.pm | 27 --- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index d9ef201..e51f777 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @

[pve-devel] [PATCH V2 pve-storage/pve-container/qemu-server/pve-manager 0/8] fix #3711 & adapt drive detach/remove behavior

2022-09-12 Thread Stefan Hrdlicka
V1 -> V2: # overall * matched detaching/removing drives behavior for VM & containers It currently works this way: - Detach drive - drive shows up as unused - remove drive - drive will be removed without removing data (obviously) # pve-storage * added storage_exists function for matching

[pve-devel] [PATCH V2 pve-manager 8/8] fix #3711: enable removing container with non existent storage

2022-09-12 Thread Stefan Hrdlicka
Add a checkbox to the remove dialog of LXC containers and VMs to force deleting a container/VM if the storage it uses has been removed. Signed-off-by: Stefan Hrdlicka --- www/manager6/lxc/Config.js | 1 + www/manager6/qemu/Config.js | 1 + www/manager6/window/SafeDestr

[pve-devel] [PATCH V2 pve-container 2/8] fix #3711: enable delete of LXC container

2022-09-12 Thread Stefan Hrdlicka
Make it possible to delete a container whoes underlying storage is no longer available. This will just write an warning instead of dying. Without setting the option ignore-storage-errors=1 a delete will still fail, like it did before the changes. With this option set it will try to delete the volu

[pve-devel] [PATCH V2 pve-container 3/8] adapt behavior for detaching/removing a mount point

2022-09-12 Thread Stefan Hrdlicka
detach of a mount point with a removed underlying storage causes it to be labeled as a an 'unused disk' remove of a 'unused disk' with a removed underlying storage causes it to be removed from the configuration Signed-off-by: Stefan Hrdlicka --- src/PVE/LXC/Config.pm | 5 - 1 file changed, 4

[pve-devel] [PATCH V2 pve-container 4/8] cleanup: remove spaces from empty lines

2022-09-12 Thread Stefan Hrdlicka
Signed-off-by: Stefan Hrdlicka --- src/PVE/LXC.pm | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index e380b12..4e29e9b 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -668,7 +668,7 @@ sub update_lxc_config { # some init s

[pve-devel] [PATCH V2 qemu-server 6/8] adapt behavior for detaching drives to deatching container mount points

2022-09-12 Thread Stefan Hrdlicka
if a storage is not available a volume will be added to the container config as unused. before it would just disappear from the config Signed-off-by: Stefan Hrdlicka --- PVE/QemuServer.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.p

[pve-devel] applied: [PATCH firewall] fix #4018: add firewall macro for SPICE

2022-09-12 Thread Thomas Lamprecht
Am 29/06/2022 um 13:07 schrieb Oguz Bektas: > uses port 3128 (same as squid) > > although it's enabled by default for the "management" ipset, it doesn't > hurt to add it in there. > > Signed-off-by: Oguz Bektas > --- > src/PVE/Firewall.pm | 4 > 1 file changed, 4 insertions(+) > > applie

[pve-devel] applied: [PATCH widget-toolkit] fix: toolkit: make email regex pattern match pve-common

2022-09-12 Thread Thomas Lamprecht
Am 07/09/2022 um 11:37 schrieb Stefan Sterz: > `proxmoxMail` used its own regex pattern to validate emails. that > meant certain email addresses were rejected by the front-end that > were accepted by the backend that uses the functionality from > `pve-common`. examples include the following: > > -

[pve-devel] applied: [PATCH pve-flutter-frontend] fix text selection theme

2022-09-12 Thread Thomas Lamprecht
Am 12/09/2022 um 11:24 schrieb Dominik Csapak: > by default, flutter derives the text selection theme from the global > MaterialApp defined themes primary color, which is problematic in our > case, since we often have the same primary color as background for text > fields. This resulted in the curs

[pve-devel] applied: [PATCH pve-kernel-meta] proxmox-boot: re-add include of helper-functions

2022-09-12 Thread Thomas Lamprecht
Am 12/09/2022 um 15:31 schrieb Stoiko Ivanov: > this fixes ccfbe44f75316d41e271f68a725accbd90655456 > > in the patch I accidentally removed the include of the helper > functions - the code uses `warn` from there > > reported in our enterprise support portal and in our community-forum: > https://f

Re: [pve-devel] [PATCH manager v2 1/1] fix #4228: ui: Add checkbox to rollback dialog for automatically restarting VM/CT

2022-09-12 Thread Thomas Lamprecht
Am 12/09/2022 um 14:00 schrieb Stefan Hanreich: some (short) commit message body can often be nice to have, especially if not totally trivial (like a typo fix) and it definitively doesn't have to be a full essay, but I yet have to see the patch here on the list where I'd feel like I got a too leng

Re: [pve-devel] [PATCH qemu-server v2 1/1] fix #4228: add start parameter to rollback endpoint for automatic restarting of VM

2022-09-12 Thread Thomas Lamprecht
Am 12/09/2022 um 14:00 schrieb Stefan Hanreich: > Signed-off-by: Stefan Hanreich > --- > PVE/API2/Qemu.pm | 12 > 1 file changed, 12 insertions(+) > > diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm > index d9ef201..8bdda11 100644 > --- a/PVE/API2/Qemu.pm > +++ b/PVE/API2/Qemu.pm >

Re: [pve-devel] [PATCH pve-container v2 1/1] fix #4228: add start parameter to rollback endpoint for automatic restarting of CT

2022-09-12 Thread Thomas Lamprecht
Am 12/09/2022 um 14:00 schrieb Stefan Hanreich: > Signed-off-by: Stefan Hanreich > --- > src/PVE/API2/LXC/Snapshot.pm | 12 > 1 file changed, 12 insertions(+) > > diff --git a/src/PVE/API2/LXC/Snapshot.pm b/src/PVE/API2/LXC/Snapshot.pm > index 4be16ad..62adaee 100644 > --- a/src/PVE

[pve-devel] applied-series: [PATCH manager 0/2] minor improvements to pvereport

2022-09-12 Thread Thomas Lamprecht
Am 12/09/2022 um 15:37 schrieb Stoiko Ivanov: > these two patches add small improvements to pvereport > > Stoiko Ivanov (2): > report: add proxmox-boot-tool status output > report: stabilize order of guests and network > > PVE/Report.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(

Re: [pve-devel] [PATCH v2 container] fix #4192: revamp check for systemd version

2022-09-12 Thread Thomas Lamprecht
Am 12/09/2022 um 14:41 schrieb Fabian Grünbichler: >> Instead of iterating through several folders, it might just be easier to >> check the ldd output of /sbin/init and getting the version from there. >> Furthermore, the regex for checking the version has been adapted so that >> it's more precise.

[pve-devel] [PATCH manager 2/2] report: stabilize order of guests and network

2022-09-12 Thread Stoiko Ivanov
both categories have '40' as their order - leading to random swaps between those 2 categories in the actual report. I only increased the order of network, instead of renumerating all succeeding categories by 10 (mostly for better readability of the patch) Suggested-by: Aaron Lauterer Signed-off-

[pve-devel] [PATCH manager 1/2] report: add proxmox-boot-tool status output

2022-09-12 Thread Stoiko Ivanov
while needed seldomly we had a few cases recently where this would have saved the user and us one roundtrip. adding to storage, to be close to the `findmnt` output (which usually tells us if the system is booted in efi or legacy mode) Signed-off-by: Stoiko Ivanov --- alternatively could also be

[pve-devel] [PATCH manager 0/2] minor improvements to pvereport

2022-09-12 Thread Stoiko Ivanov
these two patches add small improvements to pvereport Stoiko Ivanov (2): report: add proxmox-boot-tool status output report: stabilize order of guests and network PVE/Report.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.30.2

[pve-devel] [PATCH pve-kernel-meta] proxmox-boot: re-add include of helper-functions

2022-09-12 Thread Stoiko Ivanov
this fixes ccfbe44f75316d41e271f68a725accbd90655456 in the patch I accidentally removed the include of the helper functions - the code uses `warn` from there reported in our enterprise support portal and in our community-forum: https://forum.proxmox.com/threads/.114998 reproduced with a VM: * le

Re: [pve-devel] [PATCH v2 container] fix #4192: revamp check for systemd version

2022-09-12 Thread Fabian Grünbichler
On September 12, 2022 2:25 pm, Leo Nunner wrote: > Instead of iterating through several folders, it might just be easier to > check the ldd output of /sbin/init and getting the version from there. > Furthermore, the regex for checking the version has been adapted so that > it's more precise. ldd i

[pve-devel] [PATCH v2 container] fix #4192: revamp check for systemd version

2022-09-12 Thread Leo Nunner
Instead of iterating through several folders, it might just be easier to check the ldd output of /sbin/init and getting the version from there. Furthermore, the regex for checking the version has been adapted so that it's more precise. Signed-off-by: Leo Nunner --- This solution does actually fee

[pve-devel] [PATCH qemu-server v2 1/1] fix #4228: add start parameter to rollback endpoint for automatic restarting of VM

2022-09-12 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- PVE/API2/Qemu.pm | 12 1 file changed, 12 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index d9ef201..8bdda11 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -4745,6 +4745,11 @@ __PACKAGE__->register_method({ n

[pve-devel] [PATCH manager v2 1/1] fix #4228: ui: Add checkbox to rollback dialog for automatically restarting VM/CT

2022-09-12 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- I've added a custom Window containing the dialog, since using MessageBox for this seemed a bit tricky. Maybe I could move the definition of the components outside the handler and only instantiate them there? I thought it was fine for now, since the Window is spec

[pve-devel] [PATCH pve-container v2 1/1] fix #4228: add start parameter to rollback endpoint for automatic restarting of CT

2022-09-12 Thread Stefan Hanreich
Signed-off-by: Stefan Hanreich --- src/PVE/API2/LXC/Snapshot.pm | 12 1 file changed, 12 insertions(+) diff --git a/src/PVE/API2/LXC/Snapshot.pm b/src/PVE/API2/LXC/Snapshot.pm index 4be16ad..62adaee 100644 --- a/src/PVE/API2/LXC/Snapshot.pm +++ b/src/PVE/API2/LXC/Snapshot.pm @@ -272

[pve-devel] [PATCH manager/qemu-server/pve-container v2] Add checkbox for automatic restart of CT/VM after rollback

2022-09-12 Thread Stefan Hanreich
Update to my first patch, that added a warning to the rollback dialog. As discussed in Bugzilla, I added a checkbox to toggle an automatic restart to the rollback window instead of displaying a warning. The restart functionality itself is implemented in the respective backends. One difference to t

Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd

2022-09-12 Thread Thomas Lamprecht
On 12/09/2022 11:30, Dominik Csapak wrote: > On 9/12/22 11:30, Dominik Csapak wrote:   # non systemd based containers work with pure cgroupv2   sub unified_cgroupv2_support { -my ($self) = @_; +my ($self, $conf) = @_; >>> >>> why pass the whole config if you just need th

Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd

2022-09-12 Thread Dominik Csapak
On 9/12/22 11:30, Dominik Csapak wrote: [snip]   # non systemd based containers work with pure cgroupv2   sub unified_cgroupv2_support { -    my ($self) = @_; +    my ($self, $conf) = @_; why pass the whole config if you just need the arch? Please avoid overly generic parameter in signatures i

Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd

2022-09-12 Thread Dominik Csapak
On 9/12/22 11:30, Dominik Csapak wrote: [snip]   # non systemd based containers work with pure cgroupv2   sub unified_cgroupv2_support { -    my ($self) = @_; +    my ($self, $conf) = @_; why pass the whole config if you just need the arch? Please avoid overly generic parameter in signatures i

Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd

2022-09-12 Thread Dominik Csapak
[snip] # non systemd based containers work with pure cgroupv2 sub unified_cgroupv2_support { -my ($self) = @_; +my ($self, $conf) = @_; why pass the whole config if you just need the arch? Please avoid overly generic parameter in signatures if only one specific thing is required.

[pve-devel] [PATCH pve-flutter-frontend] fix text selection theme

2022-09-12 Thread Dominik Csapak
by default, flutter derives the text selection theme from the global MaterialApp defined themes primary color, which is problematic in our case, since we often have the same primary color as background for text fields. This resulted in the cursorColor/selectionHandleColor to be the same as the back

Re: [pve-devel] [PATCH container] fix #4192: add new architecture-dependent path to check for newer versions of systemd

2022-09-12 Thread Thomas Lamprecht
Looks ok semantically, some comments for mostly code style issues inline On 09/09/2022 13:45, Leo Nunner wrote: > Signed-off-by: Leo Nunner > --- > In newer versions, libsystemd-shared-*.so is placed in an > architecture-specific folder (e.g. /usr/lib/x86_64-linux-gnu/systemd/). > I adapted the