Hi Andrei,

Am 07.08.25 um 11:39 PM schrieb Andrei Perapiolkin via pve-devel:
> Hi,
> 
> VM deletion retries 'path'/'free_image' for already-removed volumes; expected 
> plugin behavior on missing volumes is unclear.
> 
> When deleting a VM with multiple attached volumes, Proxmox deletes volumes 
> sequentially (one at a time) and
> updates the VM record only after all deletions complete.

Could you please file a bug for this: https://bugzilla.proxmox.com ?

> If a volume deletion fails mid-process (e.g., network error), the VM record 
> is not updated even though some volumes may have been successfully removed.
> A subsequent delete attempt repeats all operations, including 'path' (and 
> 'free_image') calls for volumes that were already deleted.
> 
> 
> What is the proper response to 'path' and 'free_image' calls for a volume 
> that no longer exists?
> For path, should the call fail (e.g., 'die'), succeed with an empty string, 
> or return a 'storage path'?

(Most) implementations of path() for plugins shipped by us [0] do not do
any I/O at all and thus don't check if the image actually exist. So you
can return the path, even if the volume does not exist.

Some of our implementations of free_image() fail if the volume does not
exist, some do not. Nothing should break if you indicate success when
free_image() is called and the image does not exist.

[0]:
https://git.proxmox.com/?p=pve-storage.git;a=tree;f=src/PVE/Storage;h=26012be26cb3c24515e99a02e7ad438f29c81646;hb=HEAD

Best Regards,
Fiona


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

Reply via email to