--- 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
> before the actual unlink of the vmid.conf file, as after that happens the
> ID gets free again from the POV of the pmxcfs and thus pve-cluster's VMID
> list that is used by the next-id call.

Thanks for pointing that out! Upon review, that is definitely the wrong
place to add the CT ID to the list. I'll move the call to
`PVE::UsedVmidList::add_vmid` to sit just before the call to
`PVE::LXC::Config->destroy_config` in the `$code` subroutine instead,
which I think is in the vein of your suggestion.


--- End Message ---
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to