On 6/12/19 11:10 AM, Dominic Jäger wrote:
> I'll make more detailed commit messages from now on.
> 
> On 6/12/19 7:59 AM, Thomas Lamprecht wrote:
>> On 6/6/19 11:52 AM, Dominic Jäger wrote:
>>> When cancelling the move disk operation for containers the partly
>>> finished destination and thus useless files now get removed.
>> I really do not understand the commit message, could you please
>> describe here how/why that happens now?
> 
> When Move Disk is called for a container rsync starts copying it to a new 
> destination. This initial rsync process gets killed when the Stop button gets 
> pressed. At this moment the destination file is not fully copied and useless 
> as a consequence. Our code already tries to remove it. However, rsync has 
> forked and those forks are still accessing the destination file for some 
> time. Thus, the attempt to remove it fails.
> 
> With the patch we wait for other processes (which are only rsync's children 
> normally) to release the destination files. This took less than a second when 
> I tried it. Afterwards, the existing remove procedure is carried out.
> 

Now that sound like a much better commit message ;-)
Maybe throw in that it runs in a mount namespace and is, as Wolfgang
correctly said, protected by our config lock, so there's no possibility
that we interrupted another, concurrent, operation of the PVE stack here.


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

Reply via email to