[pve-devel] applied-series: [PATCH storage 1/3] whitespace cleanup

2019-12-09 Thread Thomas Lamprecht
On 12/9/19 2:30 PM, Tim Marx wrote: > Signed-off-by: Tim Marx > --- > PVE/API2/Cluster.pm | 58 ++--- > 1 file changed, 29 insertions(+), 29 deletions(-) > applied series, but it would be great if you could fix the format subject prefix for your pve-manag

[pve-devel] [PATCH qemu-server 2/4] hide long commandline on vm_start/migrate failure

2019-12-09 Thread Stefan Reiter
By default run_command prints the entire commandline executed when an error occurs, but QEMU and our migrate command are not only uninteresting to the user[*] but also annoyingly long. Hide them and only print the exit code. [*] Especially our migrate command, since it can't be manually executed a

[pve-devel] [PATCH qemu-server 3/4] fix #2493: show QEMU errors in migration log

2019-12-09 Thread Stefan Reiter
QEMU usually only prints warnings and errors and stays silent otherwise, so it makes sense to just log all of it's output. Prefix it with '[]' to indicate that the output is coming from the remote node, so users know where to search for the error. Side effect is that the 'VM start' task created b

[pve-devel] [PATCH qemu-server 1/4] fix wrong punctuation in error msg

2019-12-09 Thread Stefan Reiter
...leading to ugly line info being printed. Signed-off-by: Stefan Reiter --- PVE/API2/Qemu.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index fbf036a..b28373e 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -3378,7 +3378,7 @@

[pve-devel] [PATCH qemu-server 4/4] check if QEMU version is recent enough for machine type

2019-12-09 Thread Stefan Reiter
...and show the user a more meaningful error otherwise. Signed-off-by: Stefan Reiter --- PVE/QemuServer.pm | 4 1 file changed, 4 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 4317516..0201d26 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3472,6 +3472,

[pve-devel] applied: [PATCH manager] ui: vm/HDEdit: fix backup checkbox default

2019-12-09 Thread Thomas Lamprecht
The recent change transformed this checkbox from a negative "No Backup" to a positive "Backup" did not accounted for changing the default fallback for the parseBoolean call. As this would had suggested that disk are backed-up which aren't backup, it could lead to pretty devastating results... Sig

[pve-devel] [PATCH qemu-server v2 3/3] move vmstate check to check_vm_modify_config_perm

2019-12-09 Thread Dominik Csapak
so that it gets checked before the special case of removing the vmstate Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index e7ed6e9..0c4486b 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE

[pve-devel] [PATCH qemu-server v2 1/3] refactor finding of vmstate storage

2019-12-09 Thread Dominik Csapak
we need that on another place, so refactor in its own sub Signed-off-by: Dominik Csapak --- changes from v1: * improved comments PVE/QemuConfig.pm | 18 +++--- PVE/QemuServer.pm | 24 2 files changed, 27 insertions(+), 15 deletions(-) diff --git a/PVE/QemuC

[pve-devel] [PATCH docs v2 1/1] add chapter about hibernation and vmstate storage selection

2019-12-09 Thread Dominik Csapak
and reference it also in the snapshot chapter Signed-off-by: Dominik Csapak --- new in v2 qm.adoc | 26 ++ 1 file changed, 26 insertions(+) diff --git a/qm.adoc b/qm.adoc index b13f0f4..f0d63af 100644 --- a/qm.adoc +++ b/qm.adoc @@ -1193,6 +1193,28 @@ It will be called d

[pve-devel] [PATCH manager v2 1/1] ui: make vmstatestorage configureable

2019-12-09 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- new in v2 www/manager6/qemu/Options.js | 21 + 1 file changed, 21 insertions(+) diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js index e6f279c8..da61a6a8 100644 --- a/www/manager6/qemu/Options.js +++ b/www/manager6/qem

[pve-devel] [PATCH qemu-server v2 2/3] suspend to disk: check more permissions

2019-12-09 Thread Dominik Csapak
only VM.PowerMgmt is not enough, since we allocate space on a storage, so we need VM.Config.Disk on the vm and Datastore.AllocateSpace on the storage Signed-off-by: Dominik Csapak --- changes from v1: * move priv check inside if condition in vm_susepnd and note that the caller has to check the

[pve-devel] [PATCH qemu-server/docs/manager v2] improve hibernation vmstate handling

2019-12-09 Thread Dominik Csapak
this series adds additional privilege checks for the vmstate with hibernation, also adds docs and gui support for selecting the vmstate storage changes from v1: * add docs * add gui for vmstatestorage * improve comments * remove unecessary lock from api * conditionally check privs in PVE::QemuServ

[pve-devel] applied-partial-series: [PATCH v2 manager 1/3] ui: mpedit: activate backup on MP creation

2019-12-09 Thread Thomas Lamprecht
On 12/2/19 10:58 AM, Aaron Lauterer wrote: > This patch enables the backup checkbox by default for newly created > LXC mount points. > > Hopefully this will help to avoid situations in the future where people > realize too late that the mount point has not been backed up when they > expected it to

[pve-devel] applied-series: [PATCH manager 0/5] fix #2498: gui: improve columns logic in summaries

2019-12-09 Thread Thomas Lamprecht
On 12/4/19 1:41 PM, Dominik Csapak wrote: > this series changes the summaries (lxc/qemu/node/dc) in such way that > the number of columns do not depend on the viewport (the browser width), > but on the actual size of the panel, meaning that if the tree width > changes, the number of columns can cha

[pve-devel] [PATCH storage 2/3] api: update cluster status return properties

2019-12-09 Thread Tim Marx
Signed-off-by: Tim Marx --- PVE/API2/Cluster.pm | 50 - 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 4245b88c..0020d2ea 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -550,8

[pve-devel] [PATCH storage 1/3] whitespace cleanup

2019-12-09 Thread Tim Marx
Signed-off-by: Tim Marx --- PVE/API2/Cluster.pm | 58 ++--- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 3b62953f..4245b88c 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -47,

[pve-devel] [PATCH storage 3/3] api: prevent null as return value for property type string

2019-12-09 Thread Tim Marx
Signed-off-by: Tim Marx --- PVE/API2/Cluster.pm | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 0020d2ea..ed422daa 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -636,13 +636,16 @@ __PACKAGE__->register_meth

Re: [pve-devel] [PATCH storage] Use a common find_free_diskname in all plugins

2019-12-09 Thread Fabian Grünbichler
seems like a good idea! not tested yes, but some comments/pitfalls inline.. On December 9, 2019 1:35 pm, Fabian Ebner wrote: > The local versions of find_free_diskname retrieved the relevant disk list > using > plugin-specific code and called get_next_vm_diskname. We can use list_images > instead

Re: [pve-devel] [PATCH container] Always determine the size of the volume in volume_rescan

2019-12-09 Thread Oguz Bektas
this fixes the issue however, after discussing off-list with wolfgang b., it seems like it might be a better option to disable resizing on pending mps in general (backend & gui). for example when you switch an existing mp with a new one, and you try to resize it, it's not exactly clear which mp th

[pve-devel] applied: [PATCH manager] ceph: Create symlink on standalone MGR creation

2019-12-09 Thread Thomas Lamprecht
On 12/3/19 11:52 AM, Alwin Antreich wrote: > Ceph MGR fails to start when installed on a node without existing > symlink to /etc/pve/ceph.conf. > > Signed-off-by: Alwin Antreich > --- > PVE/API2/Ceph/MGR.pm | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/PVE/API2/Ceph/MGR.pm b/PVE/API2

[pve-devel] applied: [PATCH v2 storage] When resizing a ZFS volume, align size to 1M

2019-12-09 Thread Thomas Lamprecht
On 12/9/19 8:25 AM, Fabian Ebner wrote: > The size is required to be a multiple of volblocksize. Make sure > that the requirement is always met, so ZFS won't complain when we do > things like 'qm resize 102 scsi1 +0.01G'. > > Signed-off-by: Fabian Ebner > --- > > Changes from v1: > * Always

[pve-devel] [PATCH v2 qemu-server] update disk size before local disk migration

2019-12-09 Thread Stefan Reiter
Split out 'update_disksize' from the renamed 'update_disk_config' to allow code reuse in QemuMigrate. Remove dots after messages to keep style consistent for migration log. After updating in sync_disks (phase1) of migration, write out updated config. This means that even if migration fails or is

[pve-devel] applied: [PATCH storage] calculate reasonable metadatasize for lvm thin pools on creation

2019-12-09 Thread Thomas Lamprecht
On 12/6/19 2:04 PM, Tim Marx wrote: > > Signed-off-by: Tim Marx > --- > PVE/API2/Disks/LVMThin.pm | 21 +++-- > 1 file changed, 19 insertions(+), 2 deletions(-) > applied, with Dominik's T-b and R-b tags. It would be nice to have some short background rationale in the commit me

Re: [pve-devel] [PATCH qemu-server 2/2] update disk size before local disk migration

2019-12-09 Thread Stefan Reiter
sub update_disksize { +my ($drive, $volid_hash, $log_fn) = @_; this is not a very nice interface.. maybe the logging/printing could be moved to the call site(s), by returning wantarray ? ($drive, $old, $new) : $drive; ? I did that to avoid writing the whole format_size shenanigans at

[pve-devel] [PATCH storage] Use a common find_free_diskname in all plugins

2019-12-09 Thread Fabian Ebner
The local versions of find_free_diskname retrieved the relevant disk list using plugin-specific code and called get_next_vm_diskname. We can use list_images instead to allow for a common interface and avoid having those similar methods. Signed-off-by: Fabian Ebner --- I did not test for Glusterf

Re: [pve-devel] [PATCH qemu-server 2/2] update disk size before local disk migration

2019-12-09 Thread Fabian Grünbichler
On December 9, 2019 10:51 am, Stefan Reiter wrote: > On 12/6/19 9:46 AM, Fabian Grünbichler wrote: >> On December 5, 2019 4:11 pm, Stefan Reiter wrote: >>> Split out 'update_disksize' from the renamed 'update_disk_config' to >>> allow code reuse in QemuMigrate. >>> >>> Remove dots after messages to

[pve-devel] applied-series: [PATCH qemu-server v2 1/2] cfg2cmd test: add tests for multifunction devices

2019-12-09 Thread Thomas Lamprecht
On 12/9/19 10:10 AM, Dominik Csapak wrote: > by mocking the lspci call > > the mocked lspci code is basically the same as the real one, > only difference is the source of the devices and > there is no verbose flag > > Signed-off-by: Dominik Csapak > --- > changes from v1: > * improved lspci sub

[pve-devel] applied-series: [PATCH qemu-server 1/2] cfg2cmd: minor cleanup

2019-12-09 Thread Thomas Lamprecht
On 12/4/19 1:15 PM, Stefan Reiter wrote: > We never shipped a 4.1.0 QEMU, so it makes more sense to test as 4.1.1 > > Signed-off-by: Stefan Reiter > --- > test/cfg2cmd/spice-linux-4.1.conf | 2 +- > test/run_config2command_tests.pl | 2 +- > test/snapshot-test.pm | 2 +- > 3 files c

[pve-devel] applied: [PATCH qemu-server 1/2] remove $vmid param from print_drive

2019-12-09 Thread Thomas Lamprecht
On 12/5/19 4:11 PM, Stefan Reiter wrote: > It isn't used in the sub, but suggest it is needed. No users outside > qemu-server found. > > Signed-off-by: Stefan Reiter > --- > PVE/API2/Qemu.pm | 18 +- > PVE/QemuMigrate.pm | 2 +- > PVE/QemuServer.pm | 12 ++-- > 3 file

Re: [pve-devel] [PATCH qemu-server 2/3] suspend to disk: check more permissions

2019-12-09 Thread Dominik Csapak
just for the record, here the summary of the offline discussion about this for now we should add the vmstatestorage option to the gui (to allow the user to overwrite the target storage) and as soon as we have the api calls for checking finer grained permissions on paths, we can implmement a stor

Re: [pve-devel] [PATCH qemu-server 2/2] update disk size before local disk migration

2019-12-09 Thread Stefan Reiter
On 12/6/19 9:46 AM, Fabian Grünbichler wrote: On December 5, 2019 4:11 pm, Stefan Reiter wrote: Split out 'update_disksize' from the renamed 'update_disk_config' to allow code reuse in QemuMigrate. Remove dots after messages to keep style consistent for migration log. After updating in sync_di

[pve-devel] [PATCH qemu-server v2 1/2] cfg2cmd test: add tests for multifunction devices

2019-12-09 Thread Dominik Csapak
by mocking the lspci call the mocked lspci code is basically the same as the real one, only difference is the source of the devices and there is no verbose flag Signed-off-by: Dominik Csapak --- changes from v1: * improved lspci sub (thanks @thomas) .../q35-linux-hostpci-multifunction.conf

[pve-devel] [PATCH qemu-server v2 2/2] hostpci: always check if device exists

2019-12-09 Thread Dominik Csapak
if the user set a device as hostpci with the 'shorthand' syntax: hostpciX: 00:12 we ignored it on starting and showcmd and continued. Since the user explicitly wanted to passthrough a device, we now check if there is actually a device with that id for explicitly configured devices (00:12.1), we

Re: [pve-devel] [PATCH qemu-server 1/2] cfg2cmd test: add tests for multifunction devices

2019-12-09 Thread Dominik Csapak
On 12/7/19 12:25 PM, Thomas Lamprecht wrote: On 12/6/19 2:29 PM, Dominik Csapak wrote: by mocking the lspci call the mocked lspci code is basically the same as the real one, only difference is the source of the devices and there is no verbose flag Signed-off-by: Dominik Csapak --- .../q35-l