[pve-devel] [PATCH manager 1/2] close #4369: api: optionally only suggest unique IDs
Severen Redwood
severen.redwood at sitehost.co.nz
Mon Sep 30 03:58:51 CEST 2024
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/<vmid>.conf ?
>
>
> (I could be great to be able to mass delete vms in // without having a
> big lock on a file)
This is an interesting idea, though I think creating an empty file is
probably better than moving the config as that would only store
information that will never be needed again. Needing to acquire a lock
on the list when deleting multiple VMs may be a bottleneck, but I'm not
entirely convinced it would actually be a problem in practice. How many
VMs do you expect to be deleting all at once? And how often?
This approach would also use more storage as you now have the overhead
of FS metadata for every single ID you have marked as used.
Dietmar, what do you think is the best option here? I'm personally
leaning towards using the list with your run-length encoding suggestion,
but I'm open to implementing Alexandre's idea if you think it's worth
it.
More information about the pve-devel
mailing list