[pve-devel] Continuing on making the VM ID suggestion strategy configurable

2024-08-29 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi everyone, Something I've been running into with PVE is that VM IDs may be re-used and that the UI will in fact suggest the smallest available ID (via the `/cluster/nextid` endpoint), regardless of whether that ID has previously been used or not. This can cause issues with

[pve-devel] [PATCH manager v2 2/2] close #4369: ui: add datacenter option for unique VM/CT IDs

2024-10-03 Thread Severen Redwood via pve-devel
--- Begin Message --- Add a 'suggest unique VMIDs' row to the datacenter options page that allows choosing whether the `/cluster/nextid` API endpoint (and thereby any UI elements that suggest IDs) should avoid suggesting previously used IDs. This option defaults to off to ensure that this change in

[pve-devel] [PATCH manager v2 1/2] close #4369: api: optionally only suggest unique IDs

2024-10-03 Thread Severen Redwood via pve-devel
--- Begin Message --- At the moment, the `/cluster/nextid` API endpoint will return the lowest available VM/CT ID, which means that it will suggest re-using VM IDs. This can be undesirable, so add an optional check to ensure that it chooses an ID which is not and has never been in use. This option

[pve-devel] [PATCH SERIES v2] Add ability to prevent suggesting previously used VM/CT IDs

2024-10-03 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi everyone, This patch series is an updated version of my previous series [1] adding optional support for preventing PVE from suggesting previously used VM/CT IDs. The ID list is now read into a hash rather than an array so that O(1) membership tests can be used when `/clus

[pve-devel] [PATCH container v2] api: record CT ID as used after a container is destroyed

2024-10-03 Thread Severen Redwood via pve-devel
--- Begin Message --- After a container is destroyed, record that its ID has been used via the `PVE::UsedVmidList` module so that the `/cluster/nextids` endpoint can later optionally avoid suggesting previously used IDs. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood --- src/PV

[pve-devel] [PATCH cluster v2 5/6] cluster files: add used_vmids.list

2024-10-03 Thread Severen Redwood via pve-devel
--- Begin Message --- Add `/etc/pve/used_vmids.list` to the list of cluster files, which will be used for recording previously used VM/CT IDs. This is required so that we can optionally ensure that such IDs are not suggested by the `/cluster/nextid` API endpoint. Co-authored-by: Daniel Krambrock

[pve-devel] [PATCH cluster v2 6/6] datacenter config: add unique-next-id to schema

2024-10-03 Thread Severen Redwood via pve-devel
--- Begin Message --- Add the `unique-next-id` property to the datacentre config schema to track whether only unique (ie. neither currently nor previously in use) VM/CT IDs should be suggested by the `/cluster/nextid` API endpoint. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood

[pve-devel] [PATCH qemu-server v2] api: record VM ID as used after a virtual machine is destroyed

2024-10-03 Thread Severen Redwood via pve-devel
--- Begin Message --- After a virtual machine is destroyed, record that its ID has been used via the `PVE::UsedVmidList` module so that the `/cluster/nextids` endpoint can later optionally avoid suggesting previously used IDs. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood ---

Re: [pve-devel] [PATCH container] api: record CT ID as used after a container is destroyed

2024-09-29 Thread Severen Redwood via pve-devel
--- Begin Message --- On Fri Sep 27, 2024 at 5:48 AM NZST, Thomas Lamprecht wrote: > at this point the CT is not yet destroyed, only the worker that tries to > destroy > it is started, destruction can still fail. > > It'd be better to place it inside the $realcmd, or even the $code, ideally > befo

Re: [pve-devel] [PATCH manager 1/2] close #4369: api: optionally only suggest unique IDs

2024-09-29 Thread Severen Redwood via pve-devel
--- Begin Message --- On Sun, Sep 29, 2024 at 01:47:31PM GMT, DERUMIER, Alexandre via pve-devel wrote: > Couldn't we simply move the deleted vm config file > to a trash/tombstone directory ? > > /etc/pve/.deleted/.conf ? > > > (I could be great to be able to mass delete vms in // without having

Re: [pve-devel] [PATCH SERIES v2] Add ability to prevent suggesting previously used VM/CT IDs

2024-10-29 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi, Is someone able to review this updated patch series? I think the previous comments should be addressed. Also, the actual patches seem to have ended up disconnected from the cover letter, so for reference, you can find them here: https://lore.proxmox.com/pve-devel/mailman

Re: [pve-devel] [PATCH container v2] api: record CT ID as used after a container is destroyed

2024-11-04 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi Aaron, On Thu, Oct 31, 2024 at 06:27:43PM +0100, Aaron Lauterer wrote: > This is missing a > > use PVE::UsedVmidList; > > at the top of the file. Otherwise running > > pct destroy {vmid} > > will result in the following error: > > Undefined subroutine &PVE::UsedVmidLi

[pve-devel] [PATCH SERIES v3] Add ability to prevent suggesting previously used VM/CT IDs

2024-11-04 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi everyone, This is a small update to my previous patch series [1, 2] adding optional support for preventing PVE from suggesting previously used VM/CT IDs. In particular, missing use statements have been added to the patches for marking VM/CT IDs as used, as noticed by Aaro

[pve-devel] [PATCH container v3] api: record CT ID as used after a container is destroyed

2024-11-04 Thread Severen Redwood via pve-devel
--- Begin Message --- After a container is destroyed, record that its ID has been used via the `PVE::UsedVmidList` module so that the `/cluster/nextids` endpoint can later optionally avoid suggesting previously used IDs. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood --- Changed

[pve-devel] [PATCH manager v3 2/2] close #4369: ui: add datacenter option for unique VM/CT IDs

2024-11-04 Thread Severen Redwood via pve-devel
--- Begin Message --- Add a 'suggest unique VMIDs' row to the datacenter options page that allows choosing whether the `/cluster/nextid` API endpoint (and thereby any UI elements that suggest IDs) should avoid suggesting previously used IDs. This option defaults to off to ensure that this change in

[pve-devel] [PATCH qemu-server v3] api: record VM ID as used after a virtual machine is destroyed

2024-11-04 Thread Severen Redwood via pve-devel
--- Begin Message --- After a virtual machine is destroyed, record that its ID has been used via the `PVE::UsedVmidList` module so that the `/cluster/nextids` endpoint can later optionally avoid suggesting previously used IDs. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood --- C

[pve-devel] [PATCH cluster v3 5/6] cluster files: add used_vmids.list

2024-11-04 Thread Severen Redwood via pve-devel
--- Begin Message --- Add `/etc/pve/used_vmids.list` to the list of cluster files, which will be used for recording previously used VM/CT IDs. This is required so that we can optionally ensure that such IDs are not suggested by the `/cluster/nextid` API endpoint. Co-authored-by: Daniel Krambrock

[pve-devel] [PATCH cluster v3 6/6] datacenter config: add unique-next-id to schema

2024-11-04 Thread Severen Redwood via pve-devel
--- Begin Message --- Add the `unique-next-id` property to the datacentre config schema to track whether only unique (ie. neither currently nor previously in use) VM/CT IDs should be suggested by the `/cluster/nextid` API endpoint. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood

[pve-devel] [PATCH manager v3 1/2] close #4369: api: optionally only suggest unique IDs

2024-11-04 Thread Severen Redwood via pve-devel
--- Begin Message --- At the moment, the `/cluster/nextid` API endpoint will return the lowest available VM/CT ID, which means that it will suggest re-using VM IDs. This can be undesirable, so add an optional check to ensure that it chooses an ID which is not and has never been in use. This option

[pve-devel] [PATCH manager 1/2] close #4369: api: optionally only suggest unique IDs

2024-09-26 Thread Severen Redwood via pve-devel
--- Begin Message --- At the moment, the `/cluster/nextid` API endpoint will return the lowest available VM/CT ID, which means that it will suggest re-using VM IDs. This can be undesirable, so add an optional check to ensure that it chooses an ID which is not and has never been in use. This option

[pve-devel] [PATCH SERIES] Add ability to prevent suggesting previously used VM/CT IDs

2024-09-26 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi everyone, This patch series is a reworking of Daniel Krambrock's patches [1] which allow for configuring the strategy used for suggesting VM IDs. As discussed with him [2], I have removed the 'max + 1' strategy as it is fundamentally flawed given that the goal is preventin

[pve-devel] [PATCH qemu-server] api: record VM ID as used after a virtual machine is destroyed

2024-09-26 Thread Severen Redwood via pve-devel
--- Begin Message --- After a virtual machine is destroyed, record that its ID has been used via the `PVE::UsedVmidList` module so that the `/cluster/nextids` endpoint can later optionally avoid suggesting previously used IDs. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood ---

[pve-devel] [PATCH manager 2/2] close #4369: ui: add datacenter option for unique VM/CT IDs

2024-09-26 Thread Severen Redwood via pve-devel
--- Begin Message --- Add a 'suggest unique VMIDs' row to the datacenter options page that allows choosing whether the `/cluster/nextid` API endpoint (and thereby any UI elements that suggest IDs) should avoid suggesting previously used IDs. This option defaults to off to ensure that this change in

[pve-devel] [PATCH container] api: record CT ID as used after a container is destroyed

2024-09-26 Thread Severen Redwood via pve-devel
--- Begin Message --- After a container is destroyed, record that its ID has been used via the `PVE::UsedVmidList` module so that the `/cluster/nextids` endpoint can later optionally avoid suggesting previously used IDs. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood --- src/PV

[pve-devel] [PATCH cluster 1/2] cluster files: add used_vmids.list

2024-09-26 Thread Severen Redwood via pve-devel
--- Begin Message --- Add `/etc/pve/used_vmids.list` to the list of cluster files, which will be used for recording previously used VM/CT IDs. This is required so that we can optionally ensure that such IDs are not suggested by the `/cluster/nextid` API endpoint. Co-authored-by: Daniel Krambrock

[pve-devel] [PATCH cluster 2/2] datacenter config: add unique-next-id to schema

2024-09-26 Thread Severen Redwood via pve-devel
--- Begin Message --- Add the `unique-next-id` property to the datacentre config schema to track whether only unique (ie. neither currently nor previously in use) VM/CT IDs should be suggested by the `/cluster/nextid` API endpoint. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood

Re: [pve-devel] [PATCH SERIES v3] Add ability to prevent suggesting previously used VM/CT IDs

2024-11-07 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi Aaron, Thanks for the review and testing! I'll post v4 today to address your comments and add those commit trailers. Thanks, Severen --- End Message --- ___ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxm

[pve-devel] [PATCH SERIES v4] Add ability to prevent suggesting previously used VM/CT IDs

2024-11-07 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi everyone, This is another small update to my previous patch series [1] adding optional support for preventing PVE from suggesting previously used VM/CT IDs. Aaron had some small style nits, so I've addressed those and also added the Reviewed-by and Tested-by commit trailer

[pve-devel] [PATCH manager v4 2/2] close #4369: ui: add datacenter option for unique VM/CT IDs

2024-11-07 Thread Severen Redwood via pve-devel
--- Begin Message --- Add a 'suggest unique VMIDs' row to the datacenter options page that allows choosing whether the `/cluster/nextid` API endpoint (and thereby any UI elements that suggest IDs) should avoid suggesting previously used IDs. This option defaults to off to ensure that this change in

[pve-devel] [PATCH container v4] api: record CT ID as used after a container is destroyed

2024-11-07 Thread Severen Redwood via pve-devel
--- Begin Message --- After a container is destroyed, record that its ID has been used via the `PVE::UsedVmidList` module so that the `/cluster/nextids` endpoint can later optionally avoid suggesting previously used IDs. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood Tested-by:

[pve-devel] [PATCH qemu-server v4] api: record VM ID as used after a virtual machine is destroyed

2024-11-07 Thread Severen Redwood via pve-devel
--- Begin Message --- After a virtual machine is destroyed, record that its ID has been used via the `PVE::UsedVmidList` module so that the `/cluster/nextids` endpoint can later optionally avoid suggesting previously used IDs. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood Teste

[pve-devel] [PATCH cluster v4 1/2] cluster files: add used_vmids.list

2024-11-07 Thread Severen Redwood via pve-devel
--- Begin Message --- Add `/etc/pve/used_vmids.list` to the list of cluster files, which will be used for recording previously used VM/CT IDs. This is required so that we can optionally ensure that such IDs are not suggested by the `/cluster/nextid` API endpoint. Co-authored-by: Daniel Krambrock

[pve-devel] [PATCH manager v4 1/2] close #4369: api: optionally only suggest unique IDs

2024-11-07 Thread Severen Redwood via pve-devel
--- Begin Message --- At the moment, the `/cluster/nextid` API endpoint will return the lowest available VM/CT ID, which means that it will suggest re-using VM IDs. This can be undesirable, so add an optional check to ensure that it chooses an ID which is not and has never been in use. This option

[pve-devel] [PATCH cluster v4 2/2] datacenter config: add unique-next-id to schema

2024-11-07 Thread Severen Redwood via pve-devel
--- Begin Message --- Add the `unique-next-id` property to the datacentre config schema to track whether only unique (ie. neither currently nor previously in use) VM/CT IDs should be suggested by the `/cluster/nextid` API endpoint. Co-authored-by: Daniel Krambrock Signed-off-by: Severen Redwood

Re: [pve-devel] [PATCH SERIES v4] Add ability to prevent suggesting previously used VM/CT IDs

2024-12-03 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi everyone, Just bumping this patch series since it's been a few weeks :) Is there anything blocking these patches from being accepted? I'm happy to address any feedback if so. Thanks, Severen --- End Message --- ___ pve-devel m

Re: [pve-devel] [PATCH SERIES v4] Add ability to prevent suggesting previously used VM/CT IDs

2025-01-19 Thread Severen Redwood via pve-devel
--- Begin Message --- Hi everyone, Hope you've all had a great break over the holidays. I don't want to be a pain, but just bumping this again as it's nearing a couple months since there was movement on this patch series. I received a Reviewed-by trailer from Aaron, so it seems that these patches

Re: [pve-devel] [PATCH cluster v4 1/2] cluster files: add used_vmids.list

2025-03-27 Thread Severen Redwood via pve-devel
--- Begin Message --- On 26/03/2025 20:22, Thomas Lamprecht wrote: > Am 26.03.25 um 04:51 schrieb Severen Redwood: >> No problem, I've changed it to `/etc/pve/used-ids` now. Slightly more >> generic than `used-vmids` since there are also container IDs. > > Hmm, I see where you come from, but that

Re: [pve-devel] [PATCH cluster v4 1/2] cluster files: add used_vmids.list

2025-03-25 Thread Severen Redwood via pve-devel
--- Begin Message --- On 29/01/2025 03:57, Thomas Lamprecht wrote: > Am 27.01.25 um 13:18 schrieb Fabian Grünbichler: >>> Severen Redwood via pve-devel hat am >>> 08.11.2024 02:46 CET geschrieben: >> >>> Add `/etc/pve/used_vmids.list` to the list of clust

Re: [pve-devel] [PATCH manager v4 1/2] close #4369: api: optionally only suggest unique IDs

2025-03-25 Thread Severen Redwood via pve-devel
--- Begin Message --- On 28/01/2025 01:16, Fabian Grünbichler wrote: > Hi! > > sorry it took so long to get back at this series! next will be faster :) No worries! As you can see it took me a while to get back to this too... I've implemented all the suggestions around style and will post the upd

Re: [pve-devel] [PATCH container v4] api: record CT ID as used after a container is destroyed

2025-03-25 Thread Severen Redwood via pve-devel
--- Begin Message --- On 28/01/2025 01:16, Fabian Grünbichler wrote: > if we only add it when the VM is removed via the API, we might miss those > where an admin just does "rm /etc/pve/../XXX.conf" (which might happen if > something is blocking regular removal)? wouldn't it be safer to add them w