[pve-devel] [PATCH-SERIES] remove replicated volumes on guest purge

Fabian Ebner f.ebner at proxmox.com
Fri Jan 29 11:12:11 CET 2021


Am 28.01.21 um 17:20 schrieb Thomas Lamprecht:
> On 14.10.20 13:36, Fabian Ebner wrote:
>> Introduces two helper functions in Replication.pm and ReplicationConfig.pm
>> so that the guests can do the removal easily.
>>
>> destroy_vm contains a check whether the guest is still in use by a
>> linked clone (in the LXC case triggered by the storage backend at vdisk_free),
>> so that needs to happen first.
>> That check could be factored out and removing replicated volumes moved
>> to before destroy_vm, but I feel like it's cleaner to first destroy the
>> VM and do all related cleanups later (as it is now).
>>
>> The problem is that the guest config does not contain any volumes
>> after destroy_vm, and run_full_removal would do nothing, because
>> on removal, run_replication currently only considers storages that
>> show up in the config and not those from the replication job state.
>>
>> Therefore, this depends on the following patch to be applied first:
>> https://lists.proxmox.com/pipermail/pve-devel/2020-October/045386.html
>>
>> Dependency bumps: qemu-server,pve-container -> pve-guest-common
>> are needed for patches #2 and #3
>> and I think the reverse bumps are needed for patch #4
>>
> 
> Besides that, is this still relevant? If so, it may need some rebasing,
> at least guest-common does.
> 

If the decision that we want to remove replicated volumes on purge 
hasn't changed, then yes, it's still relevant.

But it might be a good idea to introduce this change close(r) to the 
next release, and mention it in the "known issues", so fewer people are 
surprised by it.

In any case, this depends on another patch (as mentioned above), so you 
probably want to take a look at that series first (it still applies for 
me): https://lists.proxmox.com/pipermail/pve-devel/2020-October/045388.html

The second patch is the important one.




More information about the pve-devel mailing list