Re: [pve-devel] [PATCH v3 storage 2/3] Incorporate wipe_disks from PVE::Ceph::Tools

2020-04-16 Thread Thomas Lamprecht
On 4/16/20 8:57 AM, Dominik Csapak wrote: > >> >> >> Thanks for clearing that up, I mostly poked at it as Dominic came to me >> asking what to do as you told him to use [0-9] and Fabian told him to go >> back again, not knowing about your suggestion. >> >> The question is, does the matching of oth

Re: [pve-devel] [PATCH v3 storage 2/3] Incorporate wipe_disks from PVE::Ceph::Tools

2020-04-16 Thread Dominik Csapak
On 4/16/20 9:35 AM, Thomas Lamprecht wrote: On 4/16/20 8:57 AM, Dominik Csapak wrote: Thanks for clearing that up, I mostly poked at it as Dominic came to me asking what to do as you told him to use [0-9] and Fabian told him to go back again, not knowing about your suggestion. The questi

Re: [pve-devel] [PATCH v3 storage 2/3] Incorporate wipe_disks from PVE::Ceph::Tools

2020-04-16 Thread Fabian Grünbichler
On April 16, 2020 8:57 am, Dominik Csapak wrote: > >> >> >> Thanks for clearing that up, I mostly poked at it as Dominic came to me >> asking what to do as you told him to use [0-9] and Fabian told him to go >> back again, not knowing about your suggestion. >> >> The question is, does the match

Re: [pve-devel] [PATCH v3 storage 2/3] Incorporate wipe_disks from PVE::Ceph::Tools

2020-04-16 Thread Thomas Lamprecht
On 4/16/20 10:07 AM, Fabian Grünbichler wrote: > On April 16, 2020 8:57 am, Dominik Csapak wrote: >> bottom line: i guess both are ok when used right, but with >> [0-9] there is no ambiguity as to what it matches >> > > fine for me as well (I prefer \d for readability/shortness, but I don't > car

[pve-devel] [PATCH storage v4 3/3] Fix #2550: Wipe disk before creating a directory

2020-04-16 Thread Dominic Jäger
Some leftovers are not detected by our "is disk in use" checks. Signed-off-by: Dominic Jäger --- v3->v4: Unchanged v2->v3: Unchanged v1->v2: Use new wipefs parameter PVE/API2/Disks/Directory.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/API2/Disks/Directory.pm b/PVE/API2/Disks/D

[pve-devel] [PATCH manager v4 1/3] Move wipe_disks to PVE::Diskmanage

2020-04-16 Thread Dominic Jäger
Move wipe_disks from PVE::Ceph::Tools to PVE::Diskmanage. Relies on the corresponding patch in pve-storage. Signed-off-by: Dominic Jäger --- v3->v4: unchanged v2->v3: unchanged v1->v2: Fix syntax To test this we need an OSD that is not managed by ceph-volume: - Create a PVE 5 VM - Install Ceph

[pve-devel] [PATCH storage v4 2/3] Incorporate wipe_disks from PVE::Ceph::Tools

2020-04-16 Thread Dominic Jäger
Move wipe_disks from PVE::Ceph::Tools to PVE::Diskmanage and improve it by - Handling invalid parameters - Adding options for wiping - Making names clearer - Adding tests Relies on the corresponding patch in pve-manager. Signed-off-by: Dominic Jäger --- v3->v4: - Die more often - More atte

[pve-devel] [PATCH widget-toolkit] open picker for all comboboxes on focus, even if they are editable

2020-04-16 Thread Dominik Csapak
when a combobox was editable, a click inside did not open the picker, but it would if the combobox was not editable. Since this is 1. inconsistent 2. inconvinient (the user has to specifically press the arrow) we already had this implemented for our ComboGrid, but not for regular comboboxes This

Re: [pve-devel] [PATCH widget-toolkit] open picker for all comboboxes on focus, even if they are editable

2020-04-16 Thread Dominik Csapak
On 4/16/20 1:13 PM, Dominik Csapak wrote: when a combobox was editable, a click inside did not open the picker, but it would if the combobox was not editable. Since this is 1. inconsistent 2. inconvinient (the user has to specifically press the arrow) typo: s/inconvinient/inconvenient/ ___

[pve-devel] [PATCH proxmox-widget-toolkit v2] form: add Proxmox.form.field.DisplayEdit

2020-04-16 Thread Thomas Lamprecht
This allows to write our often used: > { > xtype: me.isCreate ? 'someEditableField' : 'displayfield', > ... > } In a more schematic way, as it can now be controlled by either our CBind mixin or ExtJS native data binding. Use a Field container to add both, they editable and they display,

[pve-devel] applied: [PATCH widget-toolkit] open picker for all comboboxes on focus, even if they are editable

2020-04-16 Thread Thomas Lamprecht
On 4/16/20 1:13 PM, Dominik Csapak wrote: > when a combobox was editable, a click inside did not open the picker, > but it would if the combobox was not editable. > > Since this is > 1. inconsistent > 2. inconvinient (the user has to specifically press the arrow) > > we already had this implement

[pve-devel] [PATCH qemu-server 1/3] Fix test_volid call for vmstate and fix check for snapshots on migration

2020-04-16 Thread Fabian Ebner
by excluding vmstate. It is referenced by snapshots, but is not a volume containing a snapshot. Signed-off-by: Fabian Ebner --- PVE/QemuMigrate.pm | 2 ++ PVE/QemuServer.pm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMigrate.pm index 0a6277

[pve-devel] [PATCH manager 3/3] Don't block offline migration when a disk is not referenced in the current config

2020-04-16 Thread Fabian Ebner
All local disks can/will be migrated if not for a reason we don't know about yet at this stage. The disks we get from the API call as 'local_disks' are either referenced by the config or by snapshots in the config (which was not checked for and the reason one could run into the 'else if' branch).

[pve-devel] [PATCH qemu-server 2/3] Include vmstate and unused volumes in foreach_volid

2020-04-16 Thread Fabian Ebner
and refactor the test_volid closure. Like this get_replicatable_volumes doesn't need a separate loop for unused volumes anymore. For get_vm_volumes, which is used for activation/deactivation of volumes at migration and deactivation in vm_stop_cleanup, includes those volumes now. For migration it'

Re: [pve-devel] [PATCH qemu-server 2/3] Include vmstate and unused volumes in foreach_volid

2020-04-16 Thread Fabian Ebner
On 16.04.20 14:54, Fabian Ebner wrote: and refactor the test_volid closure. Like this get_replicatable_volumes doesn't need a separate loop for unused volumes anymore. For get_vm_volumes, which is used for activation/deactivation of volumes at migration and deactivation in vm_stop_cleanup, incl

Re: [pve-devel] [PATCH proxmox-widget-toolkit v2] form: add Proxmox.form.field.DisplayEdit

2020-04-16 Thread Dominik Csapak
Looks good except one issue i found, the 'editConfig' gets modified globally for the class, leading to weird side effects i changed the useredit to use this for the username it worked, but when i created a new user after editing an old one, the username field was filled with the last username i e

Re: [pve-devel] [PATCH proxmox-widget-toolkit v2] form: add Proxmox.form.field.DisplayEdit

2020-04-16 Thread Thomas Lamprecht
On 4/16/20 3:19 PM, Dominik Csapak wrote: > Looks good except one issue i found, > the 'editConfig' gets modified globally for the class, > leading to weird side effects > > i changed the useredit to use this for the username > it worked, but when i created a new user after > editing an old one, t

[pve-devel] [PATCH qemu-server 2/2] fix #2671: include CPU format in man page again

2020-04-16 Thread Stefan Reiter
Use the new register_format(3) call to use a validator (instead of a parser) for 'pve-vm-cpu-conf'. This way the $cpu_fmt hash can be used for generating the documentation, while still applying the same verification rules as before. 'pve-cpu-conf' is reduced to a simple hash-based format, which cu

[pve-devel] [PATCH common 1/2] JSONSchema: add format validator support and cleanup check_format

2020-04-16 Thread Stefan Reiter
Adds a third, optional parameter to register_format that allows specifying a function that will be called after parsing and can validate the parsed data. A validator should die on failed validation, and can also change the parsed object by returning a modified version of it. This is useful so one

[pve-devel] applied: [PATCH proxmox-widget-toolkit v2] form: add Proxmox.form.field.DisplayEdit

2020-04-16 Thread Thomas Lamprecht
On 4/16/20 2:31 PM, Thomas Lamprecht wrote: > This allows to write our often used: > >> { >> xtype: me.isCreate ? 'someEditableField' : 'displayfield', >> ... >> } > > In a more schematic way, as it can now be controlled by either our > CBind mixin or ExtJS native data binding. > > Use a

[pve-devel] [PATCH manager] HDEdit: warn when IO threads are enabled with incompatible controller

2020-04-16 Thread Stefan Reiter
The only warning displayed before was in the "VM Start" task log, rather hidden. In the wizard we already auto-selected the correct controller, but not when modifying a disk on an existing VM. Don't break existing behaviour (to allow users to disable IO threads for VMs that currently have it set b

[pve-devel] applied: [PATCH widget-toolkit] UpdateStore: fix 'undefined' interval

2020-04-16 Thread Thomas Lamprecht
On 4/15/20 4:30 PM, Dominik Csapak wrote: > in some cases, we provide a config with interval set to 'undefined', > which gets happily applied to the config, but gets interpreted as '0' > when actually starting the task, resulting in constant api requests > > Signed-off-by: Dominik Csapak > --- >

[pve-devel] [PATCH qemu-server] add virtio host_mtu feature.

2020-04-16 Thread Alexandre Derumier
This add a new "mtu" param to vm nic, and force the mtu in the guest for virtio nic only. Special value: 1 = set the same value than the bridge --- PVE/QemuServer.pm | 19 +++ 1 file changed, 19 insertions(+) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 6445508..9baa6

[pve-devel] [PATCH pve-common] read_bridge_mtu: public method instead private

2020-04-16 Thread Alexandre Derumier
--- src/PVE/Network.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/Network.pm b/src/PVE/Network.pm index 21c592c..1c7711c 100644 --- a/src/PVE/Network.pm +++ b/src/PVE/Network.pm @@ -115,7 +115,7 @@ sub tap_rate_limit { setup_tc_rate_limit($iface, $rate