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

2024-09-26 Thread Thomas Lamprecht
Am 26/09/2024 um 15:52 schrieb Severen Redwood: > 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 >

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

2024-09-26 Thread Thomas Lamprecht
Am 26/09/2024 um 15:52 schrieb Severen Redwood: > 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 > Signe

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

2024-09-26 Thread Dietmar Maurer
The format of the used_vmids.list is simply, but can lead to a very large file over time (we want to avoid large files on /etc/pev/). >PVE::Cluster::cfs_write_file('used_vmids.list', join("\n", @$vmid_list)); A future version could compress that list, by using integer ranges, for example: --

[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 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 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 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

[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 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 ---

Re: [pve-devel] [PATCH manager v2 1/1] ui: implement 'Tag View' for the resource tree

2024-09-26 Thread Thomas Lamprecht
Am 26/02/2024 um 08:25 schrieb Dominik Csapak: > > On 2/16/24 15:42, Fiona Ebner wrote: >> No real issues found during testing, but there is one thing that bugs >> me: if I have selected a guest either: >> - without tags and add a tag >> or >> - within the current tag group and remove that tag >>

[pve-devel] [PATCH qemu-server] vm_start: add syslog info with which PID a VM was started

2024-09-26 Thread Daniel Kral
Adds a syslog entry to log the process id that has been given to the QEMU VM process at start. This is helpful debugging information if the pid shows up at other places, like a kernel stack trace, while the VM has been running, but cannot be retrieved anymore (e.g. the pidfile has been deleted or o