[pve-devel] [PATCH common v7 1/2] JSONSchema: refactor tag regex

2022-06-21 Thread Dominik Csapak
we'll use that elsewhere too Signed-off-by: Dominik Csapak --- src/PVE/JSONSchema.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PVE/JSONSchema.pm b/src/PVE/JSONSchema.pm index ab718f3..54c149d 100644 --- a/src/PVE/JSONSchema.pm +++ b/src/PVE/JSONSchema.pm @@ -696,

[pve-devel] [PATCH cluster v7 2/3] Cluster: add get_guest_config_properties

2022-06-21 Thread Dominik Csapak
akin to get_guest_config_property, but with a list of properties. uses the new CFS_IPC_GET_GUEST_CONFIG_PROPERTIES also adds the same NOTEs regarding parsing/permissions to the comment of get_guest_config_property Signed-off-by: Dominik Csapak --- data/PVE/Cluster.pm | 27 ++

[pve-devel] [PATCH widget-toolkit v7 2/3] add class for 'admin' tags

2022-06-21 Thread Dominik Csapak
when a tag starts with '+', we want to emphasize it, so it's clear that it's an 'admin' tag, do this by making the font bold Signed-off-by: Dominik Csapak --- src/Utils.js | 4 src/css/ext6-pmx.css | 4 2 files changed, 8 insertions(+) diff --git a/src/Utils.js b/src/Utils.js

[pve-devel] [PATCH manager v7 13/14] ui: ResourceGrid: render tags

2022-06-21 Thread Dominik Csapak
with the 'full' styling Signed-off-by: Dominik Csapak --- www/manager6/data/ResourceStore.js | 3 +++ www/manager6/grid/ResourceGrid.js | 1 + 2 files changed, 4 insertions(+) diff --git a/www/manager6/data/ResourceStore.js b/www/manager6/data/ResourceStore.js index b18f7dd8..0bfe9259 100644

[pve-devel] [PATCH manager v7 02/14] api: /version: add 'tag-style'

2022-06-21 Thread Dominik Csapak
to be able to use it in the gui directly after login Signed-off-by: Dominik Csapak --- PVE/API2.pm | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/PVE/API2.pm b/PVE/API2.pm index a4256160..26fcc02e 100644 --- a/PVE/API2.pm +++ b/PVE/API2.pm @@ -111,6 +111,11 @@ __PACKAG

[pve-devel] [PATCH common v7 2/2] JSONSchema: pve-tag: add syntax for 'admin' tags

2022-06-21 Thread Dominik Csapak
by prefixing the tag with '+' these can be useful to distinguish tags set by a 'normal' user, and an admin. This patch is only useful with additional patches that check those permissions while setting the tags though. i chose a syntax that was invalid before, but does not add unnecessary overhead

[pve-devel] [PATCH manager v7 11/14] ui: form/GlobalSearchField: display tags and allow to search for them

2022-06-21 Thread Dominik Csapak
each tag is treated like a seperate field, so it weighs more if the user searches for the exact string of a single tag Signed-off-by: Dominik Csapak --- www/manager6/form/GlobalSearchField.js | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/www/manager6/f

[pve-devel] [PATCH manager v7 10/14] ui: tree/ResourceTree: show Tags in tree

2022-06-21 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- www/manager6/lxc/Config.js| 4 +++- www/manager6/qemu/Config.js | 4 +++- www/manager6/tree/ResourceTree.js | 4 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js index 9f199

[pve-devel] [PATCH widget-toolkit v7 1/3] add tag related helpers

2022-06-21 Thread Dominik Csapak
helpers to * generate a color from a string consistently * generate a html tag for a tag * related css classes contrast is calculated according to SAPC draft: https://github.com/Myndex/SAPC-APCA which is likely to become a w3c guideline in the future and seems to be a better algorithm for this S

[pve-devel] [PATCH manager v7 06/14] ui: dc/OptionView: add editors for tag settings

2022-06-21 Thread Dominik Csapak
namely for 'tag-tree-style' and 'tag-colors'. display the tag overrides directly as they will appear as tags Signed-off-by: Dominik Csapak --- www/manager6/Utils.js | 20 + www/manager6/dc/OptionView.js | 84 +++ 2 files changed, 104 insertions(+)

[pve-devel] [PATCH manager v7 09/14] ui: {lxc, qemu}/Config: show Tags and make them editable

2022-06-21 Thread Dominik Csapak
add the tags in the status line, and add a button for adding new ones Signed-off-by: Dominik Csapak --- www/manager6/lxc/Config.js | 32 ++-- www/manager6/qemu/Config.js | 31 +-- 2 files changed, 59 insertions(+), 4 deletions(-) diff --g

[pve-devel] [PATCH manager v7 08/14] ui: add form/TagEdit.js

2022-06-21 Thread Dominik Csapak
this is a wrapper container for holding a list of (editable) tags intended to be used in the lxc/qemu status toolbar Signed-off-by: Dominik Csapak --- www/manager6/Makefile| 1 + www/manager6/form/TagEdit.js | 151 +++ 2 files changed, 152 insertions(+)

[pve-devel] [PATCH manager v7 14/14] ui: form/Tag(Edit): add drag & drop when editing tags

2022-06-21 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- www/manager6/form/Tag.js | 22 +++-- www/manager6/form/TagEdit.js | 96 +++- 2 files changed, 114 insertions(+), 4 deletions(-) diff --git a/www/manager6/form/Tag.js b/www/manager6/form/Tag.js index 91190051..dcbd9597 1006

[pve-devel] [PATCH manager v7 07/14] ui: add form/Tag

2022-06-21 Thread Dominik Csapak
displays a single tag, with the ability to edit inline on click (when the mode is set to editable). This brings up a list of globally available tags for simple selection. Also has a mode for adding a new Tag. This has a 'layoutCallback' which will be called on input, so that the parent component

[pve-devel] [PATCH cluster v7 3/3] datacenter.cfg: add option for tag-style

2022-06-21 Thread Dominik Csapak
its a property string containing 'tree-shape' and 'colors' the colors are formatted like this: :[:] Signed-off-by: Dominik Csapak --- data/PVE/DataCenterConfig.pm | 37 1 file changed, 37 insertions(+) diff --git a/data/PVE/DataCenterConfig.pm b/data/PVE/Dat

[pve-devel] [PATCH widget-toolkit v7 3/3] Toolkit: add override for Ext.dd.DragDropManager

2022-06-21 Thread Dominik Csapak
to fix selection behavior for Ext.dd.DragZone. Signed-off-by: Dominik Csapak --- src/Toolkit.js | 16 1 file changed, 16 insertions(+) diff --git a/src/Toolkit.js b/src/Toolkit.js index a1d291e..b6eacfb 100644 --- a/src/Toolkit.js +++ b/src/Toolkit.js @@ -699,6 +699,22 @@ Ext.d

[pve-devel] [PATCH manager v7 01/14] api: /cluster/resources: add tags to returned properties

2022-06-21 Thread Dominik Csapak
by querying 'lock' and 'tags' with 'get_guest_config_properties' Signed-off-by: Dominik Csapak --- PVE/API2/Cluster.pm | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 525a95a1..c1e96bd7 100644 --- a/PVE/API2/Cluster.pm

[pve-devel] [PATCH container v7 1/1] check_ct_modify_config_perm: check 'admin' tags privileges

2022-06-21 Thread Dominik Csapak
normal tags require 'VM.Config.Options' on the CT, admin tags require 'Sys.Modify' on '/' a user can set/delete/reorder tags, as long as no admin tags get added/removed Signed-off-by: Dominik Csapak --- src/PVE/LXC.pm| 31 +++ src/PVE/LXC/Config.pm | 3 ++-

[pve-devel] [PATCH common/cluster/qemu/container/wt/manager v7] add tags to ui

2022-06-21 Thread Dominik Csapak
this series brings the already existing 'tags' for ct/vms to the gui: * tags can be edited in the status toolbar of the guest * existing tags will be shown in the tree/global search/resource grids * when editing a tag, a list of existing tags will be shown * by default, the color is (consistently)

[pve-devel] [PATCH qemu-server v7 1/1] api: update: check 'admin' tags privileges

2022-06-21 Thread Dominik Csapak
normal tags require 'VM.Config.Options' on the VM, admin tags require 'Sys.Modify' on '/' a user can set/delete/reorder tags, as long as no admin tags get added/removed Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 56 ++- PVE/QemuServer.pm |

[pve-devel] [PATCH manager v7 03/14] ui: parse and save tag color overrides from /version

2022-06-21 Thread Dominik Csapak
into a global list of overrides. on update, also parse the values from the browser localstore Signed-off-by: Dominik Csapak --- www/manager6/Utils.js | 40 +++ www/manager6/Workspace.js | 13 + 2 files changed, 53 insertions(+) diff --git a/ww

[pve-devel] [PATCH manager v7 04/14] ui: tree/ResourceTree: collect tags on update

2022-06-21 Thread Dominik Csapak
into a global list, so that we have it avaiable anywhere also add the tags from the tagOverrides on update into the list Signed-off-by: Dominik Csapak --- www/manager6/Utils.js | 7 +++ www/manager6/data/ResourceStore.js | 6 ++ www/manager6/tree/ResourceTree.js | 16

[pve-devel] [PATCH manager v7 12/14] ui: form/Tag: add 'admin-tag' class to admin tags

2022-06-21 Thread Dominik Csapak
so that they are emphasized there too Signed-off-by: Dominik Csapak --- www/manager6/form/Tag.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/manager6/form/Tag.js b/www/manager6/form/Tag.js index 0a754edb..91190051 100644 --- a/www/manager6/form/Tag.js +++ b/www/man

[pve-devel] [PATCH manager v7 05/14] ui: add form/TagColorGrid

2022-06-21 Thread Dominik Csapak
this provides a basic grid to edit a list of tag color overrides. We'll use this for editing the datacenter.cfg overrides and the browser storage overrides. Signed-off-by: Dominik Csapak --- www/css/ext6-pve.css | 5 + www/manager6/Makefile | 1 + www/manager6/Utils.

[pve-devel] [PATCH cluster v7 1/3] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-06-21 Thread Dominik Csapak
for getting multiple properties from the in memory config of the guests in one go. Keep the existing IPC call as is for backward compatibility and add this as separate, new one. It basically behaves the same as CFS_IPC_GET_GUEST_CONFIG_PROPERTY, but takes a list of properties instead and returns m

Re: [pve-devel] [PATCH v6 qemu-server 3/9] migration: test targetnode min version for cloudinit section

2022-06-21 Thread Fabian Ebner
Am 20.06.22 um 12:44 schrieb Alexandre Derumier: > Signed-off-by: Alexandre Derumier > --- > PVE/QemuMigrate.pm| 10 +- > PVE/QemuServer/Helpers.pm | 26 ++ > 2 files changed, 35 insertions(+), 1 deletion(-) > > diff --git a/PVE/QemuMigrate.pm b/PVE/QemuMi

Re: [pve-devel] [PATCH v6 qemu-server 0/9] cloudinit pending behaviour change

2022-06-21 Thread Fabian Ebner
Am 20.06.22 um 12:44 schrieb 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 ma

Re: [pve-devel] [PATCH v6 qemu-server 7/9] api2: add cloudinit config api

2022-06-21 Thread Fabian Ebner
Am 20.06.22 um 12:45 schrieb Alexandre Derumier: > diff --git a/PVE/QemuServer/Cloudinit.pm b/PVE/QemuServer/Cloudinit.pm > index cdaf4e5..2355953 100644 > --- a/PVE/QemuServer/Cloudinit.pm > +++ b/PVE/QemuServer/Cloudinit.pm > @@ -632,4 +633,81 @@ sub dump_cloudinit_config { > } > } > > +s

Re: [pve-devel] [PATCH v6 qemu-server 4/9] cloudinit: add cloudinit section for current generated config.

2022-06-21 Thread Fabian Ebner
Am 20.06.22 um 12:44 schrieb Alexandre Derumier: > Instead using vm pending options for pending cloudinit generated config, > > write current generated cloudinit config in a new [special:cloudinit] SECTION. > > Currently, some options like vm name, nic mac address can be hotplugged, > so they are

[pve-devel] [PATCH qemu-server] fix #3577: prevent vms with pci passthrough to suspend to disk

2022-06-21 Thread Dominik Csapak
while it may work to suspend, resume will most likely not work, because we do/can not save/restore the hardware state of the devices instead, prevent the user from suspending the vm at all. Signed-off-by: Dominik Csapak --- PVE/API2/Qemu.pm | 9 - 1 file changed, 8 insertions(+), 1 dele

[pve-devel] [PATCH manager 2/2] VM start Timeout "Options" parameter in the GUI

2022-06-21 Thread Daniel Tschlatscher
The qemu config in the backend already allows specifying a timeout value. This patch introduces a text field in the Options submenu when a VM is selected, through which the VM start timeout can be set in the config. Signed-off-by: Daniel Tschlatscher --- www/manager6/qemu/Options.js | 18 +++

[pve-devel] [PATCH qemu-server 1/1] make the timeout value editable when the VM is locked

2022-06-21 Thread Daniel Tschlatscher
In some cases the VM could no longer start when the timeout value was set to a very low value and afterwards, for example, hibernated. In this case the VM is somewhat soft locked, because the API would not allow changing the timeout value anymore. (The only way out here would be to change the value

[pve-devel] [PATCH qemu-server 1/2] fix #3502: VM start timeout config parameter

2022-06-21 Thread Daniel Tschlatscher
It was already possible to set the timeout parameter for the VM config via the API. However, the value was not considered when the function config_aware_timeout() was called. Now, if the timeout parameter is set, it will override the heuristic calculation of the VM start timeout. During testing I

Re: [pve-devel] [PATCH qemu-server 1/2] fix #3502: VM start timeout config parameter

2022-06-21 Thread Thomas Lamprecht
fix #3502: add start timeout config parameter Am 21/06/2022 um 17:20 schrieb Daniel Tschlatscher: > It was already possible to set the timeout parameter for the VM config > via the API. However, the value was not considered when the function > config_aware_timeout() was called. but you only add t

Re: [pve-devel] [PATCH qemu-server 1/2] fix #3502: VM start timeout config parameter

2022-06-21 Thread Thomas Lamprecht
Am 21/06/2022 um 17:52 schrieb Thomas Lamprecht: > 24h is already really big enough, so please use 86000, better to go lower > (but still reasonable) first, we can always easily relax it, but not really > make it stricter without breaking existing setups. Obv. meant 86400 here, sorry. __