[pve-devel] [PATCH] rbd : free_image : retry if rbd has watchers

Alexandre DERUMIER aderumier at odiso.com
Fri Nov 7 09:05:34 CET 2014


>>Yes, I think that would be better. 

Hi,

I have dig a little big, and I find the real problem.

block-job-cancel is async, so it take 1 or 2s for the block-job is really finished.

That's why we got the "rbd has watcher" error, because the disk was always open in qemu.

So, we just need to check that block-job don't exist anymore before continue.

I'll send a patch today.



Also, for block-job-complete 100%, I think that checking if $stat->{len} == $stat->{offset} is not enough.

query-block-jobs return an additionnal info : $stat->{busy}  true|false.

I think we need to check that $stat->{len} == $stat->{offset} and $stat->{busy} eq 'false'







----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Jeudi 6 Novembre 2014 16:08:38 
Objet: RE: [pve-devel] [PATCH] rbd : free_image : retry if rbd has watchers 

> >>And what happens if we get other errors? 
> 
> Currently It's retrying until $i > ~0 
> 
> but we could add a die directly if $err !~ image still has watchers 

Yes, I think that would be better. 



More information about the pve-devel mailing list