[pve-devel] [PATCH v2 guest-common 1/2] partially fix 3111: snapshot rollback: improve removing replication snapshots

2021-06-09 Thread Fabian Ebner
Get the replicatable volumes from the snapshot config rather than the current config. And filter those volumes further to those that will actually be rolled back. Previously, a volume that only had replication snapshots (e.g. because it was added after the snapshot was taken, or the vmstate volume

[pve-devel] [PATCH v2 guest-common 2/2] fix 3111: replicate guest on rollback if there are replication jobs for it

2021-06-09 Thread Fabian Ebner
so that there will be a valid replication snapshot again. Otherwise, replication will be broken after a rollback if the last (non-replication) snapshot is removed before replication can run again. Signed-off-by: Fabian Ebner --- No changes from v1 (except rebase). Not a huge fan of this, but t

[pve-devel] applied-partially: [PATCH-SERIES] Some breaking API changes/cleanups

2021-06-09 Thread Fabian Grünbichler
applied (with some added version bumps/versioned dependency bumps), except for the two storage patches where I replied with nits. please add stuff to breaking changes and send patches for pve6to7 where appropriate! On June 4, 2021 3:49 pm, Fabian Ebner wrote: > > Of course all of the changes n

[pve-devel] [PATCH storage] api: status: fix unlink on file upload

2021-06-09 Thread Lorenz Stechauner
after an error while copying the file to its destination the local path of the destination was unlinked in every case, even when on the destination was copied to via scp. Signed-off-by: Lorenz Stechauner --- PVE/API2/Storage/Status.pm | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) di

Re: [pve-devel] applied-partially: [PATCH-SERIES] Some breaking API changes/cleanups

2021-06-09 Thread Fabian Ebner
Am 09.06.21 um 11:44 schrieb Fabian Grünbichler: applied (with some added version bumps/versioned dependency bumps), except for the two storage patches where I replied with nits. please add stuff to breaking changes and send patches for pve6to7 where appropriate! I added entries for the break

[pve-devel] [PATCH pve-eslint] set cwd of CLIEngine to process.cwd()

2021-06-09 Thread Dominik Csapak
it seems it now defaults to '/' as the current working dir, but we assume the cwd of the process Signed-off-by: Dominik Csapak --- src/app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app.js b/src/app.js index 020d552..9226234 100644 --- a/src/app.js +++ b/src/app.js @@ -284,6 +284

[pve-devel] [PATCH v3 qemu-server 2/7] cloudinit: generate cloudinit drive on offline plug

2021-06-09 Thread Alexandre Derumier
Currently when only generate it at vm start Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 10 ++ 1 file changed, 10 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 25ac052..6ddac72 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -4776,6 +4776

[pve-devel] [PATCH v3 qemu-server 3/7] cloudinit: make cloudnit options fastplug

2021-06-09 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 30 +++--- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 6ddac72..0be4c45 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -4530,9 +4530,10 @@ su

[pve-devel] [PATCH v3 qemu-server 5/7] cloudinit : add extract_cloudinit_config

2021-06-09 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- PVE/API2/Qemu.pm| 1 + PVE/QemuServer/Cloudinit.pm | 47 - 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index cc58744..8ac3ae3 100644 --- a/PVE/API2/Qemu.pm

[pve-devel] [PATCH v3 qemu-server 7/7] add cloudinit hotplug

2021-06-09 Thread Alexandre Derumier
This allow to regenerate config drive if pending values exist when we change vm options. Signed-off-by: Alexandre Derumier --- PVE/QemuServer.pm | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index ff5d473..80b81c7 10064

[pve-devel] [PATCH v3 qemu-server 4/7] api2: add cloudinit config api

2021-06-09 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- PVE/API2/Qemu.pm| 73 + PVE/CLI/qm.pm | 1 + PVE/QemuServer/Cloudinit.pm | 70 +++ 3 files changed, 144 insertions(+) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu

[pve-devel] [PATCH v3 qemu-server 1/7] cloudinit: add vm config to cloudinit drive

2021-06-09 Thread Alexandre Derumier
To have current running cloudinit config. An improvement could be to implement parsing of config drive format, and also compare cicustom snippets content Signed-off-by: Alexandre Derumier --- PVE/QemuServer/Cloudinit.pm | 10 ++ 1 file changed, 10 insertions(+) diff --git a/PVE/QemuSer

[pve-devel] [PATCH v3 qemu-server 0/7] cloudinit pending behaviour change

2021-06-09 Thread Alexandre Derumier
Hi, This is an attempt to cleanup current behaviour of cloudinit online changes. Currently, we setup cloudinit options as pending, until we generate the config drive. This is not 100% true, because some option like vm name, nic mac address can be changed, without going to pending, so user can'

[pve-devel] [PATCH v3 qemu-server 6/7] api2: add cloudinit_update

2021-06-09 Thread Alexandre Derumier
This allow to regenerate the config drive with 1 api call. This also avoid to delete drive volume first, and recreate it again. we can simply: - eject - regenerated the volume - replace it with qemu monitor Signed-off-by: Alexandre Derumier --- PVE/API2/Qemu.pm | 44 ++

[pve-devel] [PATCH v2 pve-manager 1/2] ui: cloudinit : use new cloudinit config api

2021-06-09 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- www/manager6/qemu/CloudInit.js | 85 +++--- 1 file changed, 37 insertions(+), 48 deletions(-) diff --git a/www/manager6/qemu/CloudInit.js b/www/manager6/qemu/CloudInit.js index 77ff93d4..573d2945 100644 --- a/www/manager6/qemu/Clo

[pve-devel] [PATCH v2 pve-manager 0/2] cloudinit pending behaviour change

2021-06-09 Thread Alexandre Derumier
Implement new cloudinit api from last qemu-server patch serie. I don't have tuned it yet, the rstore is polling the api each second, so extract the config from cloudinit drive each time. I need to check how to load it once or when regenerated only. Changelog v2: - rebase to last master Alexan

[pve-devel] [PATCH v2 pve-manager 2/2] ui: add cloudinit hotplug option

2021-06-09 Thread Alexandre Derumier
Signed-off-by: Alexandre Derumier --- www/manager6/Utils.js | 2 ++ www/manager6/form/HotplugFeatureSelector.js | 4 2 files changed, 6 insertions(+) diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js index d9567979..23babb8b 100644 --- a/www/manager6/Utils.js

[pve-devel] [PATCH multiple] btrfs, file system for the brave

2021-06-09 Thread Wolfgang Bumiller
This is another take at btrfs storage support. I wouldn't exactly call it great, but I guess it works (although I did manage to break a few... Then again I also manged to do that with ZFS (it just took a few years longer there...)). This one's spread over quite a few repositories, so let's go thro

[pve-devel] [PATCH common] Syscalls/Tools: add renameat2

2021-06-09 Thread Wolfgang Bumiller
Mostly for the ability to atomically swap files. Signed-off-by: Wolfgang Bumiller --- src/PVE/Syscall.pm | 1 + src/PVE/Tools.pm | 10 ++ 2 files changed, 11 insertions(+) diff --git a/src/PVE/Syscall.pm b/src/PVE/Syscall.pm index 2d5019f..10e185d 100644 --- a/src/PVE/Syscall.pm +++

[pve-devel] [PATCH container 1/2] migration: fix snapshots boolean accounting

2021-06-09 Thread Wolfgang Bumiller
Signed-off-by: Wolfgang Bumiller --- src/PVE/LXC/Migrate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/LXC/Migrate.pm b/src/PVE/LXC/Migrate.pm index b5917e9..4370a3d 100644 --- a/src/PVE/LXC/Migrate.pm +++ b/src/PVE/LXC/Migrate.pm @@ -144,7 +144,7 @@ sub phase1 {

[pve-devel] [PATCH storage 1/4] fix find_free_disk_name invocations

2021-06-09 Thread Wolfgang Bumiller
The interface takes the storeid now, not the image dir. Signed-off-by: Wolfgang Bumiller --- PVE/Storage/GlusterfsPlugin.pm | 4 ++-- PVE/Storage/Plugin.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/Storage/GlusterfsPlugin.pm b/PVE/Storage/GlusterfsPlug

[pve-devel] [PATCH container 2/2] enable btrfs support via subvolumes

2021-06-09 Thread Wolfgang Bumiller
Signed-off-by: Wolfgang Bumiller --- src/PVE/LXC.pm | 4 +++- src/PVE/LXC/Migrate.pm | 7 --- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index bb1cbdb..9407d24 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1871,7 +1871,9 @@ su

[pve-devel] [PATCH qemu-server] allow migrating raw btrfs volumes

2021-06-09 Thread Wolfgang Bumiller
Signed-off-by: Wolfgang Bumiller --- PVE/QemuMigrate.pm | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 6375a15..5b07c20 100644 --- a/PVE/QemuMigrate.pm +++ b/PVE/QemuMigrate.pm @@ -502,7 +502,10 @@ sub scan_local_volumes {

[pve-devel] [PATCH storage 4/4] btrfs: add 'btrfs' import/export format

2021-06-09 Thread Wolfgang Bumiller
Signed-off-by: Wolfgang Bumiller --- PVE/CLI/pvesm.pm | 2 +- PVE/Storage.pm | 2 +- PVE/Storage/BTRFSPlugin.pm | 248 +++-- 3 files changed, 240 insertions(+), 12 deletions(-) diff --git a/PVE/CLI/pvesm.pm b/PVE/CLI/pvesm.pm index b22f75

[pve-devel] [PATCH storage 3/4] update import/export storage API

2021-06-09 Thread Wolfgang Bumiller
This bumps APIVER, but also APIAGE, see below. The import methods (volume_import, volume_import_formats): This additionally gets the '$snapshot' parameter which is already present on the export side as an informational piece to know which of the snapshots is the *current* one. The current

[pve-devel] [PATCH storage 2/4] add BTRFS storage plugin

2021-06-09 Thread Wolfgang Bumiller
This is mostly the same as a directory storage, with 2 major differences: * 'subvol' volumes are actual btrfs subvolumes and therefore allow snapshots * 'raw' files are placed *into* a subvolume and therefore also allow snapshots, the raw file for volume `btrstore:100/vm-100-disk-1.raw` can

Re: [pve-devel] [RFC series 0/2] Show more vlan infos

2021-06-09 Thread Aaron Lauterer
bump, just in case this has been overlooked :) On 4/12/21 3:14 PM, Aaron Lauterer wrote: The main motivation here is to make the VLAN tags configured for an interface better visible. The approach taken in this RFC is to use the already existing vlan-id and vlan-raw-device values. These were only

[pve-devel] [PATCH storage] Revert "workaround zfs create -V error for unaligned sizes"

2021-06-09 Thread Aaron Lauterer
https://github.com/zfsonlinux/zfs/issues/8541 is solved and part of openzfs 2.0 with [0]. Since we ship only ZFS 2.0 with PVE 7 we should be okay to remove our workaround [0] https://github.com/openzfs/zfs/commit/47c9299fcc9e5fb91d0b1636bfacc03bd3e98439 This reverts commit cdef3abb25984c36957162

Re: [pve-devel] [RFC storage 2/7] add disk rename feature

2021-06-09 Thread Aaron Lauterer
Thanks for the review :) On 6/2/21 10:36 AM, Fabian Ebner wrote: Am 01.06.21 um 18:10 schrieb Aaron Lauterer: Functionality has been added for the following storage types: diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 93d09ce..6936abd 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -

[pve-devel] applied: [PATCH pve-eslint] set cwd of CLIEngine to process.cwd()

2021-06-09 Thread Thomas Lamprecht
On 09.06.21 13:49, Dominik Csapak wrote: > it seems it now defaults to '/' as the current working dir, but we > assume the cwd of the process > > Signed-off-by: Dominik Csapak > --- > src/app.js | 1 + > 1 file changed, 1 insertion(+) > > applied, thanks!