Re: [pve-devel] New API endpoint to manage snippets / bugzilla 2208 / updated patch but missing something, need help

2022-04-08 Thread Laurent GUERBY
> Hi, > > I've tried to adapt the patch to current PVE 7.1-12 (see below) but I > still get > > proxmoxer.core.ResourceException: 501 Not Implemented: upload failed > - > {'errors': b''} > > When I try to upload a snippet. > > My proxmoxer setup works for iso, the following succeeds: > > proxm

[pve-devel] [PATCH pve-docs] pvesdn: langauge and formatting fixup

2022-04-08 Thread Dylan Whyte
Mostly improves langauge with some minor formatting fixes. Signed-off-by: Dylan Whyte --- pvesdn.adoc | 464 +++- 1 file changed, 238 insertions(+), 226 deletions(-) diff --git a/pvesdn.adoc b/pvesdn.adoc index 1f32a8e..be62769 100644 --- a/pvesdn

[pve-devel] [POC qemu] vma: allow partial restore

2022-04-08 Thread Fabian Ebner
Putting this out here to ask for feedback for the approach. Better viewed with -w. Treat target path "/dev/null" in a special way to allow skipping (writes) for restore. Alternative would be to add a new possible option 'skip' to the map line, and re-work the handling of 'path'. A valid line co

Re: [pve-devel] [PATCH cluster/widget-toolkit/manager v5] add tags to ui

2022-04-08 Thread Matthias Heiserer
A few usability things: * When adding tags in the guest view, one can add an empty tag that won't be saved, but will be displayed until view is reloaded. Should be discarded on creation. * The hitbox of the ✓ is rather small * Options/Tag colors could mention that it only manages the overrid

Re: [pve-devel] [PATCH manager v5 05/11] ui: add form/TagColorGrid

2022-04-08 Thread Matthias Heiserer
On 08.04.2022 09:45, Dominik Csapak wrote: 8< + +setValue: function(value) { + let me = this; + me.setColor(value); + if (value && value.length === 6) { + me.picker.value = value[0] !== '#' ? `#${value}` : value; + } +}, + +setColor: function(value) {

Re: [pve-devel] [RFC manager 0/4] Ceph add basic erasure code pool mgmt support

2022-04-08 Thread Aaron Lauterer
One thing I forgot to mention is that due to quite a few $rados->mon_commands that are introduced here, there will be rebases needed when we apply the changes to librados2-perl. Similar to this patch [0] of that other series. [0] https://lists.proxmox.com/pipermail/pve-devel/2022-March/052290.h

[pve-devel] [PATCH manager 4/4] ceph pools: allow to create erasure code pools

2022-04-08 Thread Aaron Lauterer
When using erasure coded pools for RBD storages, the main use case in this patch, we need a replicated pool that will hold the RBD omap and other metadata. The EC pool itself will only hold the data objects. The coupling happens when an RBD image is created by adding the --data-pool parameter. Thi

[pve-devel] [RFC manager 2/4] pveceph: add management for erasure code rules

2022-04-08 Thread Aaron Lauterer
Allow to set 'k' and 'm' values and optionally the device class and failure domains. Implemented in a way that also exposes the functionality via the API. Signed-off-by: Aaron Lauterer --- PVE/API2/Ceph.pm| 6 + PVE/API2/Ceph/ECProfiles.pm | 249

[pve-devel] [PATCH manager 1/4] api: ceph: $get_storages check if data-pool too

2022-04-08 Thread Aaron Lauterer
When removing a pool, we check against any storage that might have that pool configured. We need to check if that pool is used as data-pool too. Signed-off-by: Aaron Lauterer --- This check should have been added when we added basic support for EC pools on the storage side [0]. [0] https://git.

[pve-devel] [RFC manager 0/4] Ceph add basic erasure code pool mgmt support

2022-04-08 Thread Aaron Lauterer
This RFC series adds basic support to create erasure coded (EC) pools with the PVE tooling. We need to first manage EC profiles as they are the important part when someone wants to use EC pools. They define how the data is split up and how much coding/parity one wants. The actual creation of the

[pve-devel] [RFC manager 3/4] ceph tools: add check if erasure code profile exists

2022-04-08 Thread Aaron Lauterer
Signed-off-by: Aaron Lauterer --- PVE/Ceph/Tools.pm | 10 ++ 1 file changed, 10 insertions(+) diff --git a/PVE/Ceph/Tools.pm b/PVE/Ceph/Tools.pm index 36d7788a..91aa6ce5 100644 --- a/PVE/Ceph/Tools.pm +++ b/PVE/Ceph/Tools.pm @@ -531,4 +531,14 @@ sub ceph_cluster_status { return $sta

Re: [pve-devel] [PATCH cluster v5 1/3] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-04-08 Thread Matthias Heiserer
On 08.04.2022 09:45, Dominik Csapak wrote: 8< +// checks the conf for lines starting with the given props and +// writes the pointers into the correct positions into the 'found' array +// afterwards, whithout initial whitespace(s), we only deal with the format whithout -> without _

Re: [pve-devel] New API endpoint to manage snippets / bugzilla 2208 / updated patch but missing something, need help

2022-04-08 Thread Laurent GUERBY
On Thu, 2022-04-07 at 12:27 +0200, Patryk Ściborek wrote: > Hi Guys! > > I'm using Terraform to manage VMs running on Proxmox. I need to be > able to > upload snippets with custom cloud-init configuration. Right now I > have to > use scp/sftp to upload snippets so I have to use a system account. I

Re: [pve-devel] [PATCH cluster v3 1/2] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-04-08 Thread Fabian Grünbichler
On April 8, 2022 10:40 am, Fabian Grünbichler wrote: > On March 17, 2022 12:44 pm, Dominik Csapak wrote: >> for getting multiple properties from the in memory config of the >> guests. I added a new CSF_IPC_ call to maintain backwards compatibility. >> >> It basically behaves the same as >> CFS_IPC

Re: [pve-devel] [PATCH cluster v3 1/2] add CFS_IPC_GET_GUEST_CONFIG_PROPERTIES method

2022-04-08 Thread Fabian Grünbichler
On March 17, 2022 12:44 pm, Dominik Csapak wrote: > for getting multiple properties from the in memory config of the > guests. I added a new CSF_IPC_ call to maintain backwards compatibility. > > It basically behaves the same as > CFS_IPC_GET_GUEST_CONFIG_PROPERTY, but takes a list of properties >

Re: [pve-devel] [PATCH v2 storage] rbd: alloc image: fix #3970 avoid ambiguous rbd path

2022-04-08 Thread Fabian Grünbichler
On April 6, 2022 1:46 pm, Aaron Lauterer wrote: > If two RBD storages use the same pool, but connect to different > clusters, we cannot say to which cluster the mapped RBD image belongs to > if krbd is used. To avoid potential data loss, we need to verify that no > other storage is configured that

[pve-devel] [PATCH manager v5 07/11] ui: add form/Tag

2022-04-08 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 manager v5 06/11] ui: dc/OptionView: add editors for tag settings

2022-04-08 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 | 43 ++- 2 files changed, 62 insertio

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

2022-04-08 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 v5 04/11] ui: tree/ResourceTree: collect tags on update

2022-04-08 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 v5 03/11] ui: parse and save tag color overrides from /version

2022-04-08 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 | 41 +++ www/manager6/Workspace.js | 13 + 2 files changed, 54 insertions(+) diff --git a/ww

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

2022-04-08 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 718a8eb9..01a21c9e 100644 --- a/PVE/API2/Cluster.pm

[pve-devel] [PATCH manager v5 02/11] api: /version: add 'tag-colors' and 'tag-tree-style'

2022-04-08 Thread Dominik Csapak
to be able to get them in the gui directly after login Signed-off-by: Dominik Csapak --- PVE/API2.pm | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/PVE/API2.pm b/PVE/API2.pm index a4256160..0592d4de 100644 --- a/PVE/API2.pm +++ b/PVE/API2.pm @@ -111,6 +111,16 @@

[pve-devel] [PATCH cluster v5 3/3] datacenter.cfg: add option for tag-tree-style and tag-colors

2022-04-08 Thread Dominik Csapak
Signed-off-by: Dominik Csapak --- data/PVE/DataCenterConfig.pm | 18 ++ 1 file changed, 18 insertions(+) diff --git a/data/PVE/DataCenterConfig.pm b/data/PVE/DataCenterConfig.pm index 6c0fa5b..c21dbb7 100644 --- a/data/PVE/DataCenterConfig.pm +++ b/data/PVE/DataCenterConfig.pm @@

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

2022-04-08 Thread Dominik Csapak
for getting multiple properties from the in memory config of the guests. I added a new CSF_IPC_ call to maintain backwards compatibility. It basically behaves the same as CFS_IPC_GET_GUEST_CONFIG_PROPERTY, but takes a list of properties instead. The old way of getting a single property is now als

[pve-devel] [PATCH manager v5 05/11] ui: add form/TagColorGrid

2022-04-08 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/form/T

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

2022-04-08 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 v5 08/11] ui: add form/TagEdit.js

2022-04-08 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 | 131 +++ 2 files changed, 132 insertions(+)

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

2022-04-08 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 v5 10/11] ui: tree/ResourceTree: show Tags in tree

2022-04-08 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 cluster/widget-toolkit/manager v5] add tags to ui

2022-04-08 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 * when editing a tag, a list of existing tags will be shown * by default, the color is (consistently) autogenerated b

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

2022-04-08 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 ++

Re: [pve-devel] [PATCH-SERIES] move jobs from pve-manager

2022-04-08 Thread Fabian Grünbichler
On March 22, 2022 8:34 am, Hannes Laimer wrote: > The VZDump plugin was moved to pve-guest-common because it is used by > both CTs and VMs. Since the Jobs.pm contains helpers that depend on the > VZDump plugin, it was also moved to pve-guest-common. The base jobs > plugin was moved to pve-cluster s

Re: [pve-devel] [PATCH pve-cluster 1/3] jobs: move base plugin from pve-manager

2022-04-08 Thread Fabian Grünbichler
On March 22, 2022 8:34 am, Hannes Laimer wrote: > Signed-off-by: Hannes Laimer > --- > data/PVE/Jobs/Makefile | 11 > data/PVE/Jobs/Plugin.pm| 101 + > data/PVE/Makefile | 2 +- > debian/pve-cluster.install | 1 + AIUI Thomas would li

Re: [pve-devel] [PATCH pve-guest-common 2/3] jobs: move VZDump plugin from pve-manager

2022-04-08 Thread Fabian Grünbichler
On March 22, 2022 8:34 am, Hannes Laimer wrote: > Signed-off-by: Hannes Laimer > --- > src/Makefile | 4 + > src/PVE/Jobs.pm| 282 + > src/PVE/Jobs/VZDump.pm | 87 + > 3 files changed, 373 insertions(+) > create mode 100644