[pve-devel] [PATCH http-server 1/1] fix #4344: http-server: ignore unused multipart headers

2022-11-14 Thread John Hollowell
Signed-off-by: John Hollowell --- src/PVE/APIServer/AnyEvent.pm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index f397a8c..d958642 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEv

[pve-devel] [PATCH http-server 0/1] fix #4344: ignore unused multipart headers

2022-11-14 Thread John Hollowell
This fixes an issue where an upload request without a Content-Type in the file's multipart part would prevent the upload and throw missleading errors. This patch removes the requirement and ignores all multipart headers once the needed information has been extracted. I have tested these changes ag

Re: [pve-devel] [PATCH docs v2 2/2] asciidoc-pve: ignore anchor names in curly braces

2022-11-14 Thread Stefan Sterz
On 11/11/22 19:22, Thomas Lamprecht wrote: > Am 11/11/2022 um 16:05 schrieb Stefan Sterz: >> previously the scanner would detect some `onlineHelp` keys that are >> set via CBind as anchor names. this would cause it to fail, as they >> cannot be present anywhere in the documentation. no valid anchor

Re: [pve-devel] [PATCH pve-guest-common 1/1] add pre/post-snapshot hooks

2022-11-14 Thread Fiona Ebner
Am 22.09.22 um 13:54 schrieb Stefan Hanreich: > Signed-off-by: Stefan Hanreich > --- > Should there be a third hook that's called when the snapshot fails? That would allow doing cleanup in all cases. Could still be added later when actually requested by users of course. What are the common use

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

2022-11-14 Thread Dominik Csapak
its a property string containing 'tree-shape' and 'colors' the colors are formatted like this: :[:] Signed-off-by: Dominik Csapak --- changes from v8: * renamed properties data/PVE/DataCenterConfig.pm | 37 1 file changed, 37 insertions(+) diff --git a/data/

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

2022-11-14 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 4381f46..2f4a01a 100644 --- a/src/Toolkit.js +++ b/src/Toolkit.js @@ -686,6 +686,22 @@ Ext.d

[pve-devel] [PATCH manager v9 02/12] api: add /ui-options api call

2022-11-14 Thread Dominik Csapak
which contains ui relevant options, like the console preference and tag-style also contains the list of allowed tags Signed-off-by: Dominik Csapak --- changes from v8: * add 'allowed-tags' too maybe we want the 'allowed-tags' somewhere else? though we only use it for the ui at the moment and i d

[pve-devel] [PATCH qemu-server v9 1/1] api: update: improve tag privilege check

2022-11-14 Thread Dominik Csapak
'normal' tags require 'VM.Config.Options' on '/vm/', but not allowed tags (either limited with 'user-tag-access' or 'privileged-tags' in the datacenter config) require 'Sys.Modify' on '/' this patch implements the proper checks on adding/editing/deleting these permissions Signed-off-by: Dominik C

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

2022-11-14 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 tags will be shown * by default, the color is (consistently) autogener

[pve-devel] [PATCH manager v9 04/12] ui: parse and save tag infos from /ui-options

2022-11-14 Thread Dominik Csapak
stores the color-map into a global list of overrides. on update, also parse the values from the browser localstore. Also emits a GlobalEvent 'loadedUiOptions' so that e.g. the tags can listen to that and refresh their colors also saves the list of 'allowed-tags' into PVE.Utils Signed-off-by: Domi

[pve-devel] [PATCH widget-toolkit v9 1/2] add tag related helpers

2022-11-14 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 v9 07/12] ui: dc/OptionView: add editors for tag settings

2022-11-14 Thread Dominik Csapak
namely for 'tag-style' (shape & colors), 'user-tag-acces', and 'privileged tags'. display the tag overrides directly as they will appear as tags Signed-off-by: Dominik Csapak --- changes for v www/manager6/Utils.js | 20 www/manager6/dc/OptionView.js | 200 +

[pve-devel] [PATCH cluster v9 1/4] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-11-14 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

[pve-devel] [PATCH cluster v9 2/4] Cluster: add get_guest_config_properties

2022-11-14 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 manager v9 01/12] api: /cluster/resources: add tags to returned properties

2022-11-14 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 49e319a5c..34a6e08cd 100644 --- a/PVE/API2/Cluster.p

[pve-devel] [PATCH container v9 1/1] check_ct_modify_config_perm: improve tag privilege check

2022-11-14 Thread Dominik Csapak
'normal' tags require 'VM.Config.Options' on '/vm/', but not allowed tags (either limited with 'user-tag-access' or 'privileged-tags' in the datacenter config) require 'Sys.Modify' on '/' this patch implements the proper checks on adding/editing/deleting these permissions Signed-off-by: Dominik C

[pve-devel] [PATCH cluster v9 4/4] datacenter.cfg: add tag rights control to the datacenter config

2022-11-14 Thread Dominik Csapak
by adding a 'user-tag-privileges' and 'admin-tags' option. The first sets the policy by which "normal" users (with 'VM.Config.Options' on the respective guest) can create/delete tags and the second is a list of tags only settable by 'admins' ('Sys.Modify' on '/') also add a helper 'get_allowed_tag

[pve-devel] [PATCH manager v9 03/12] ui: call '/ui-options' and save the result in PVE.UIOptions

2022-11-14 Thread Dominik Csapak
and move the use of the console from VersionInfo to here, since this will be the future place for ui related backend options. Signed-off-by: Dominik Csapak --- changes from v8: * moved the logic into Utils, since we'll want to use that more regularly www/manager6/Utils.js | 12

[pve-devel] [PATCH manager v9 11/12] ui: tree/ResourceTree: show Tags in tree

2022-11-14 Thread Dominik Csapak
and update the treenodes when the tags change. since we change the vm node text (which we pass through to the config panel), we have to change how we generate the text there slightly (otherwise that would include the rendered tags) Signed-off-by: Dominik Csapak --- changes from v8: * merged the u

[pve-devel] [PATCH manager v9 06/12] ui: add PVE.form.ListField

2022-11-14 Thread Dominik Csapak
a field which contains just a list of textfields, e.g. useful for a list of simple tags Signed-off-by: Dominik Csapak --- new in v9 www/manager6/Makefile | 1 + www/manager6/form/ListField.js | 165 + 2 files changed, 166 insertions(+) create mode 1006

[pve-devel] [PATCH manager v9 10/12] ui: {lxc, qemu}/Config: show Tags and make them editable

2022-11-14 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 v9 05/12] ui: add form/TagColorGrid

2022-11-14 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 manager v9 09/12] ui: add form/TagEdit.js

2022-11-14 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 to add a new tag, we reuse the 'pmxTag' class, but overwrite some of its behaviour and css classes so that it properly adds tags also handles the drag/drop feature for the tags in

[pve-devel] [PATCH manager v9 08/12] ui: add form/Tag

2022-11-14 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. this is a basic ext component, with 'i' tags for the icons (handle and add/remove button) and a span (for the tag text) shows

[pve-devel] [PATCH manager v9 12/12] ui: add tags to ResourceGrid and GlobalSearchField

2022-11-14 Thread Dominik Csapak
also allows to search for tags in the GlobalSearchField where 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 ui: ResourceGrid: render tags with the 'full' styling Signed-off-by: Dominik Csapak

Re: [pve-devel] [PATCH docs v2 2/2] asciidoc-pve: ignore anchor names in curly braces

2022-11-14 Thread Thomas Lamprecht
Am 14/11/2022 um 09:26 schrieb Stefan Sterz: >> IIUC this indirectly raised the minimum length of references to two >> characters, >> not a deal breaker IMO as I don't really expect two characters to be used >> anytime >> soon (maybe with unicode 🤔🧠💭 x)), but maybe hint it in the commit message.

Re: [pve-devel] [PATCH docs v2 2/2] asciidoc-pve: ignore anchor names in curly braces

2022-11-14 Thread Stefan Sterz
On 11/14/22 11:07, Thomas Lamprecht wrote: > Am 14/11/2022 um 09:26 schrieb Stefan Sterz: >>> IIUC this indirectly raised the minimum length of references to two >>> characters, >>> not a deal breaker IMO as I don't really expect two characters to be used >>> anytime >>> soon (maybe with unicode

Re: [pve-devel] [PATCH docs v2 2/2] asciidoc-pve: ignore anchor names in curly braces

2022-11-14 Thread Thomas Lamprecht
Am 14/11/2022 um 11:13 schrieb Stefan Sterz: >> or move it to a single one replacing the whole non-greedy part, something >> like >> (untested): [^{}\[\]"']+ >> > should work to, yes. i used grep to test this and it worked (i did need > to do some escaping for the quotes, but the idea seems solid)

[pve-devel] [PATCH qemu] cherry-pick two fixes coming in via qemu-stable

2022-11-14 Thread Fiona Ebner
One for TCG and one for ERST devices (AFAIU from [0] the issue shouldn't be critical, but better be safe than sorry). [0]: https://lists.nongnu.org/archive/html/qemu-devel/2022-10/msg03844.html Signed-off-by: Fiona Ebner --- ...pi-erst.c-Fix-memory-handling-issues.patch | 61 ++ ...

Re: [pve-devel] [PATCH http-server 1/1] fix #4344: http-server: ignore unused multipart headers

2022-11-14 Thread Matthias Heiserer
Thanks for the patch! I must have overlooked that in my original patch. Didn't think to test with proxmoxer :) In case you haven't do so already, please submit the contributor license agreement. We require that in order to use your patch. https://www.proxmox.com/en/proxmox-ve/get-involved On

[pve-devel] [PATCH manager v3 0/2] pve fix help buttons by accounting for keys in widget toolkit

2022-11-14 Thread Stefan Sterz
this patch series fixes an issue where `onlineHelp` keys, that were only used by components in the widget toolkit, were not properly mapped to the corresponding anchors in the docs. this lead to affected help buttons only showing an error message. this series first fixes `pve-docs` by making `asci

[pve-devel] [PATCH manager v3 2/2] fix #4328: ui: add widget toolkit to dependencies of OnlineHelpInfo.js

2022-11-14 Thread Stefan Sterz
previously the widget toolkit was not scanned when creating the mapping between `onlineHelp` keys and pve-doc anchors. this could lead to cases where help buttons didn't work because the necessary mapping wasn't present in `OnlineHelpInfo.js`. Signed-off-by: Stefan Sterz --- debian/control

[pve-devel] [PATCH docs v3 1/2] asciidoc-pve: disallow certain characters in onlineHelp keys

2022-11-14 Thread Stefan Sterz
this removes the lazily evaluated part of the regex used to detect `onlineHelp` keys in order to match them with asciidoc anchors in the documentation. it uses a pattern that excludes curly braces, brackets and quotations instead. this allows for greedy matching and also removes an issue where keys

[pve-devel] [PATCH storage] fix #3004: show progress of offline migration in task log

2022-11-14 Thread Leo Nunner
dd supports a 'status' flag, which enables it to show the copied bytes, duration, and the transfer rate, which then get printed to stderr. Signed-off-by: Leo Nunner --- PVE/Storage/LVMPlugin.pm | 2 +- PVE/Storage/Plugin.pm| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --gi

Re: [pve-devel] [PATCH storage] fix #3004: show progress of offline migration in task log

2022-11-14 Thread Thomas Lamprecht
Am 14/11/2022 um 13:01 schrieb Leo Nunner: > dd supports a 'status' flag, which enables it to show the copied bytes, > duration, and the transfer rate, which then get printed to stderr. > can you post an excerpt of what it looks like and how frequent it outputs? as unlike a TTY it cannot tell th

Re: [pve-devel] [PATCH storage] fix #3004: show progress of offline migration in task log

2022-11-14 Thread Leo Nunner
On 11/14/22 13:12, Thomas Lamprecht wrote: Am 14/11/2022 um 13:01 schrieb Leo Nunner: dd supports a 'status' flag, which enables it to show the copied bytes, duration, and the transfer rate, which then get printed to stderr. can you post an excerpt of what it looks like and how frequent it ou

Re: [pve-devel] [PATCH storage] fix #3004: show progress of offline migration in task log

2022-11-14 Thread Thomas Lamprecht
Am 14/11/2022 um 13:23 schrieb Leo Nunner: > On 11/14/22 13:12, Thomas Lamprecht wrote: >> as unlike a TTY it cannot tell the console to override existing lines, so I >> guess this will do some periodic printing? > > Yes, as of right now, it prints a new line every second. Maybe one option to > m

Re: [pve-devel] [PATCH qemu-server v2 1/2] QEMU AMD SEV enable

2022-11-14 Thread Fiona Ebner
Am 11.11.22 um 15:27 schrieb Markus Frank: > This Patch is for enabling AMD SEV (Secure Encrypted > Virtualization) support in QEMU and enabling future > memory encryption technologies like INTEL MKTME > (Multi-key Total Memory Encryption) and SEV-SNP. > > Config-Example: > memory_encryption: type

Re: [pve-devel] [PATCH docs v2 2/2] added Memory Encryption documentation

2022-11-14 Thread Fiona Ebner
Am 11.11.22 um 15:27 schrieb Markus Frank: > +* if there are problems while booting (stops at blank/splash screen or > "Guest has not > +initialized the display (yet)") try to add virtio-rng and/or set "freeze: 1" > +so that you wait a few seconds before you click on *Resume* to boot. Doesn't sou

Re: [pve-devel] [PATCH cluster v9 1/4] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-11-14 Thread Wolfgang Bumiller
On Mon, Nov 14, 2022 at 10:43:45AM +0100, Dominik Csapak wrote: > 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

Re: [pve-devel] [PATCH cluster v9 4/4] datacenter.cfg: add tag rights control to the datacenter config

2022-11-14 Thread Wolfgang Bumiller
some nits On Mon, Nov 14, 2022 at 10:43:48AM +0100, Dominik Csapak wrote: > by adding a 'user-tag-privileges' and 'admin-tags' option. > The first sets the policy by which "normal" users (with > 'VM.Config.Options' on the respective guest) can create/delete tags > and the second is a list of tags

Re: [pve-devel] [PATCH container v9 1/1] check_ct_modify_config_perm: improve tag privilege check

2022-11-14 Thread Wolfgang Bumiller
nits & dedup question On Mon, Nov 14, 2022 at 10:43:50AM +0100, Dominik Csapak wrote: > 'normal' tags require 'VM.Config.Options' on '/vm/', but not > allowed tags (either limited with 'user-tag-access' or 'privileged-tags' > in the datacenter config) require 'Sys.Modify' on '/' > > this patch im

Re: [pve-devel] [PATCH qemu-server v9 1/1] api: update: improve tag privilege check

2022-11-14 Thread Wolfgang Bumiller
some nits, but really, just read the container patch response instead ;-) On Mon, Nov 14, 2022 at 10:43:49AM +0100, Dominik Csapak wrote: > 'normal' tags require 'VM.Config.Options' on '/vm/', but not > allowed tags (either limited with 'user-tag-access' or 'privileged-tags' > in the datacenter co

Re: [pve-devel] [PATCH cluster/qemu-server/container/wt/manager v9] add tags to ui

2022-11-14 Thread Aaron Lauterer
Gave it another test drive, and it works much better now. The GUI to edit the priviledged tags and the predefined tags for the users work well. Played around with a user with just VMAdmin permissions and the different options and how the drop down menu when adding a new tag is populated. I

[pve-devel] applied: [PATCH docs v3 1/2] asciidoc-pve: disallow certain characters in onlineHelp keys

2022-11-14 Thread Thomas Lamprecht
Am 14/11/2022 um 12:38 schrieb Stefan Sterz: > this removes the lazily evaluated part of the regex used to detect > `onlineHelp` keys in order to match them with asciidoc anchors in the > documentation. it uses a pattern that excludes curly braces, brackets > and quotations instead. this allows for

[pve-devel] applied: [PATCH manager v3 2/2] fix #4328: ui: add widget toolkit to dependencies of OnlineHelpInfo.js

2022-11-14 Thread Thomas Lamprecht
Am 14/11/2022 um 12:38 schrieb Stefan Sterz: > previously the widget toolkit was not scanned when creating the > mapping between `onlineHelp` keys and pve-doc anchors. this could > lead to cases where help buttons didn't work because the necessary > mapping wasn't present in `OnlineHelpInfo.js`. >