[pve-devel] applied: [PATCH qemu-server 1/2] api: vm clone: remove cloned FW conf in error cleanup path

2020-01-14 Thread Thomas Lamprecht
We clone the source VM firewall config before forking the "realcmd" worker, but did not mind cleaning it up again if the clone failed somewhere in the worker. Signed-off-by: Thomas Lamprecht --- PVE/API2/Qemu.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PVE/API2/Qemu.pm

[pve-devel] applied: [PATCH qemu-server 2/2] api: vm clone: unlink zombie target config at end of error cleanup

2020-01-14 Thread Thomas Lamprecht
This is the guarantee that this call operates on it's created config. A VMID cannot be reused afterall. So only remove the guarantee at the last step, just before throwing up the error message about the clone failure. Signed-off-by: Thomas Lamprecht --- PVE/API2/Qemu.pm | 4 ++-- 1 file

Re: [pve-devel] [PATCH v5 qemu-server] vmconfig_apply_pending: remove redundant write/load config calls

2020-01-14 Thread Fabian Grünbichler
On January 14, 2020 5:36 pm, Oguz Bektas wrote: > since we handle errors gracefully now, we don't need to write & save > config every time we change a setting. > > Signed-off-by: Oguz Bektas > --- > v4 -> v5: > > changed some stuff according to the feedback from fabian and thomas, > thanks a

[pve-devel] [PATCH v2 docs] rewrite and extend pct documentation

2020-01-14 Thread Oguz Bektas
* rephrase some parts. * update old information * add info about pending changes and other "new" features Co-Authored-by: Aaron Lauterer Signed-off-by: Oguz Bektas --- v1->v2: changed some of the writing in terms of phrasing and style, with feedback from aaron. thanks! pct.adoc | 442

[pve-devel] [PATCH v5 qemu-server] vmconfig_apply_pending: remove redundant write/load config calls

2020-01-14 Thread Oguz Bektas
since we handle errors gracefully now, we don't need to write & save config every time we change a setting. Signed-off-by: Oguz Bektas --- v4 -> v5: changed some stuff according to the feedback from fabian and thomas, thanks a lot! * remove forgotten load_config call * some style changes (if

[pve-devel] [PATCH v2 qemu-server 2/2] add timeout parameter to vm_start api endpoint

2020-01-14 Thread Tim Marx
Signed-off-by: Tim Marx --- changes: * squashed patch 2 & 4 PVE/API2/Qemu.pm | 13 ++--- PVE/QemuServer.pm | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 5bae513..2dee3f1 100644 --- a/PVE/API2/Qemu.pm +++

[pve-devel] [PATCH v2 qemu-server 1/2] add new helper to calculate timeout based on vm config

2020-01-14 Thread Tim Marx
Signed-off-by: Tim Marx --- changed: * squashed patch 1 & 3 * pass config hash * adapated comment PVE/QemuServer.pm | 4 ++-- PVE/QemuServer/Helpers.pm | 22 ++ 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm

[pve-devel] applied: [PATCH pve-cluster] Fix #2553: Prevent the Deadlock by aligning the lockorder

2020-01-14 Thread Thomas Lamprecht
On 1/14/20 12:48 PM, Kevin Greßlehner wrote: > Kevin Greßlehner (1): > Fix #2553: Fix for Deadlock by aligning the lockorder - Lock > >mutex in memdb_read and refer to a new method > "memdb_read_nolock" in memdb.c which doesn't handle locks by itself. > This method then handles the

[pve-devel] [PATCH qemu-server 3/4] make use of new helper config aware timeout

2020-01-14 Thread Tim Marx
Signed-off-by: Tim Marx --- PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index a7aff07..992cc7d 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -41,7 +41,7 @@ use PVE::Tools qw(run_command lock_file

[pve-devel] [PATCH qemu-server 1/4] add new helper to calculate timeout based on vm config

2020-01-14 Thread Tim Marx
Signed-off-by: Tim Marx --- PVE/QemuServer/Helpers.pm | 21 + 1 file changed, 21 insertions(+) diff --git a/PVE/QemuServer/Helpers.pm b/PVE/QemuServer/Helpers.pm index fcc9392..86bf3d9 100644 --- a/PVE/QemuServer/Helpers.pm +++ b/PVE/QemuServer/Helpers.pm @@ -11,6 +11,7 @@

[pve-devel] [PATCH qemu-server 2/4] add timeout parameter to vm start sub

2020-01-14 Thread Tim Marx
Signed-off-by: Tim Marx --- PVE/QemuServer.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 2b68d81..a7aff07 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -5196,7 +5196,7 @@ sub vmconfig_update_disk { sub

[pve-devel] [PATCH qemu-server 4/4] add timeout parameter to vm_start api endpoint

2020-01-14 Thread Tim Marx
Signed-off-by: Tim Marx --- PVE/API2/Qemu.pm | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 5bae513..2dee3f1 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -1993,7 +1993,13 @@ __PACKAGE__->register_method({

[pve-devel] [PATCH pve-cluster] Fix #2553: Prevent the Deadlock by aligning the lockorder

2020-01-14 Thread Kevin Greßlehner
Kevin Greßlehner (1): Fix #2553: Fix for Deadlock by aligning the lockorder - Lock >mutex in memdb_read and refer to a new method "memdb_read_nolock" in memdb.c which doesn't handle locks by itself. This method then handles the stuff which was originally in memdb_read. Therefore

[pve-devel] applied: [PATCH v2 access-control 07/23] refactor acl transformation code

2020-01-14 Thread Thomas Lamprecht
On 11/21/19 3:43 PM, Fabian Grünbichler wrote: > pull it into helper sub, since we need this one more time for token ACL > members. > > Signed-off-by: Fabian Grünbichler > --- > > Notes: > v1->v2: > - rename helper and variable > - also merge propagate/non-propagate loops > >

[pve-devel] applied: [PATCH v2 access-control 06/23] auth: pull username REs into variables

2020-01-14 Thread Thomas Lamprecht
On 11/21/19 3:43 PM, Fabian Grünbichler wrote: > for reusage in API token ID format/verification > > Signed-off-by: Fabian Grünbichler > --- > PVE/Auth/Plugin.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/PVE/Auth/Plugin.pm b/PVE/Auth/Plugin.pm > index

[pve-devel] applied: [PATCH v2 access-control 05/23] rpcenv: drop unused roles()

2020-01-14 Thread Thomas Lamprecht
On 11/21/19 3:43 PM, Fabian Grünbichler wrote: > it was useful for test-cases to verify the behaviour when pools where > introduced, but it is not used anywhere else in the code base and those > tests can also just check on permission-level. > > Signed-off-by: Fabian Grünbichler > --- > >

Re: [pve-devel] [PATCH v6 qemu-server 05/12] Add overrides and convenience functions to CPUConfig

2020-01-14 Thread Thomas Lamprecht
On 11/21/19 3:53 PM, Stefan Reiter wrote: > Add two overrides to avoid writing redundant information to the config > file. > > get_custom_model is used to retrieve a custom model configuration by > name. > > Signed-off-by: Stefan Reiter > --- merge this into 04/12 ? >

Re: [pve-devel] [PATCH v6 qemu-server 04/12] Adapt CPUConfig to handle custom models

2020-01-14 Thread Thomas Lamprecht
On 11/21/19 3:53 PM, Stefan Reiter wrote: > Turn CPUConfig into a SectionConfig with parsing/writing support for > custom CPU models. IO is handled using cfs. > > Namespacing will be provided using "custom-" prefix for custom model > names (in VM config only, cpu-models.conf will contain

Re: [pve-devel] [PATCH v6 qemu-server 03/12] Add CPUConfig file and migrate some helpers

2020-01-14 Thread Thomas Lamprecht
On 11/21/19 3:53 PM, Stefan Reiter wrote: > The package will be used for custom CPU models as a SectionConfig, hence > the name. For now we simply move some CPU related helper functions and > declarations over from QemuServer to reduce clutter there. > > Exports are to avoid changing all call

[pve-devel] applied: [PATCH v6 manager 12/12] Broadcast supported CPU flags

2020-01-14 Thread Thomas Lamprecht
On 11/21/19 3:53 PM, Stefan Reiter wrote: > pvestatd will check if the KVM version has changed using > kvm_user_version (which automatically clears its cache if QEMU/KVM > updates), and if it has, query supported CPU flags and broadcast them as > key-value pairs to the cluster. > > If detection

[pve-devel] applied: [PATCH v6 qemu-server 02/12] Add QEMU CPU flag querying helpers

2020-01-14 Thread Thomas Lamprecht
On 11/21/19 3:53 PM, Stefan Reiter wrote: > * query_understood_cpu_flags returns all flags that QEMU/KVM knows about > * query_supported_cpu_flags returns all flags that QEMU/KVM can use on > this particular host. > > To get supported flags, a temporary VM is started with QEMU, so we can >

[pve-devel] applied: [PATCH v4 qemu-server 1/2] vmconfig_apply_pending: add error handling

2020-01-14 Thread Thomas Lamprecht
On 1/7/20 4:55 PM, Oguz Bektas wrote: > wrap around code which can possibly fail in evals to handle them > gracefully, and log errors. > > Signed-off-by: Oguz Bektas > --- > > v3 -> v4: > * use $errors parameter while calling vmconfig_apply_pending > applied with the commit message "note"

Re: [pve-devel] [PATCH v4 qemu-server 2/2] vmconfig_apply_pending: remove redundant write/load config calls

2020-01-14 Thread Thomas Lamprecht
On 1/7/20 4:55 PM, Oguz Bektas wrote: > since we handle errors gracefully now, we don't need to write & save > config every time we change a setting. > > note: this results in a change of behavior in the API. since errors are > handled gracefully instead of "die"ing, when there is a pending

Re: [pve-devel] [PATCH v4 qemu-server 2/2] vmconfig_apply_pending: remove redundant write/load config calls

2020-01-14 Thread Thomas Lamprecht
On 1/7/20 4:55 PM, Oguz Bektas wrote: > since we handle errors gracefully now, we don't need to write & save > config every time we change a setting. > > note: this results in a change of behavior in the API. since errors are > handled gracefully instead of "die"ing, when there is a pending

Re: [pve-devel] [PATCH v4 qemu-server 2/2] vmconfig_apply_pending: remove redundant write/load config calls

2020-01-14 Thread Fabian Grünbichler
I haven't checked in detail whether patch #1 makes sense in isolation, but this one here is not yet 100% there ;) On January 7, 2020 4:55 pm, Oguz Bektas wrote: > since we handle errors gracefully now, we don't need to write & save > config every time we change a setting. > > note: this results

[pve-devel] applied: [PATCH] correct link to vma spec to new repository url

2020-01-14 Thread Thomas Lamprecht
On 1/13/20 12:59 PM, Tim Marx wrote: > Signed-off-by: Tim Marx > --- > backup.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/backup.txt b/backup.txt > index 0605250..97e10fc 100644 > --- a/backup.txt > +++ b/backup.txt > @@ -108,7 +108,7 @@ files. > > We have

[pve-devel] applied: [PATCH manager v2] fix #2552: ui: allow to collapse notes panel from guest summary

2020-01-14 Thread Thomas Lamprecht
Allow to collapse and expand the "Notes" panel on the virtual guests summary panel. Further add a browser setting to control the default behavior, one can chose from: * expand on show (default) * collapse on show * collapse if there are no notes This way users can make slightly better use of

Re: [pve-devel] [PATCH storage 1/3] Lock storage when calling volume_import

2020-01-14 Thread Fabian Grünbichler
On January 13, 2020 12:56 pm, Fabian Ebner wrote: > Could I get some feedback for this? The same locking is done for > 'vdisk_alloc' and 'vdisk_clone' already (among others), so I thought it > makes sense for 'volume_import' as well. the main user of this is storage_migrate via 'pvesm import'.

Re: [pve-devel] [PATCH manager] fix #2552: ui: allow to collapse notes panel from guest summary

2020-01-14 Thread Thomas Lamprecht
On 1/14/20 10:53 AM, Stefan Reiter wrote: > On 1/10/20 4:12 PM, Thomas Lamprecht wrote: >> Allow to collapse and expand the "Notes" panel on the virtual guests >> summary panel. >> >> Further add a browser setting to control the default behavior, one >> can chose from: >>   * expand on show

[pve-devel] applied: [PATCH manager] network reload: check if recent enough PVE ifupdown2 version is present

2020-01-14 Thread Thomas Lamprecht
We need a recent version *and* our patches on top of the vanilla ifupdown2: 0001-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch 0004-don-t-remove-bridge-is-tap-veth-are-still-plugged.patch So check for at least 1.2.8 and the pve string in the version output. Signed-off-by: Thomas

Re: [pve-devel] [PATCH manager] fix #2552: ui: allow to collapse notes panel from guest summary

2020-01-14 Thread Stefan Reiter
On 1/10/20 4:12 PM, Thomas Lamprecht wrote: Allow to collapse and expand the "Notes" panel on the virtual guests summary panel. Further add a browser setting to control the default behavior, one can chose from: * expand on show (default) * collapse on show * collapse if there are no notes