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

2014-12-16 Thread Alexandre DERUMIER
operation length */ +s->common.len = s->common.offset + +(cnt + s->sectors_in_flight) * BDRV_SECTOR_SIZE; - Mail original - De: "aderumier" À: "Andrew Thrift" Cc: "pve-devel" Envoyé: Vendredi 12 Décembre 2014 16:

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

2014-12-12 Thread Alexandre DERUMIER
Maybe this could be related : http://lists.nongnu.org/archive/html/qemu-devel/2014-12/msg01543.html - Mail original - De: "aderumier" À: "Andrew Thrift" Cc: "pve-devel" Envoyé: Vendredi 12 Décembre 2014 13:18:33 Objet: Re: [pve-devel] [PATCH] rbd :

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

2014-12-08 Thread Andrew Thrift
t qemu-server package from pvetest repository ?(>= > 3.3-3) > > It should be fixed here. > > > > - Mail original - > De: "Andrew Thrift" > À: "aderumier" > Cc: "pve-devel" > Envoyé: Lundi 8 Décembre 2014 04:42:23 > Objet

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

2014-12-07 Thread Alexandre DERUMIER
quence. Do you have tested last qemu-server package from pvetest repository ?(>= 3.3-3) It should be fixed here. - Mail original - De: "Andrew Thrift" À: "aderumier" Cc: "pve-devel" Envoyé: Lundi 8 Décembre 2014 04:42:23 Objet: Re: [pve-devel] [PATCH

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

2014-12-07 Thread Andrew Thrift
; > (@cc pve-devel) > > - Mail transféré - > > De: "Andrew Thrift" > À: "Alexandre DERUMIER" > Envoyé: Mercredi 12 Novembre 2014 05:10:40 > Objet: Re: [pve-devel] [PATCH] rbd : free_image : retry if rbd has watchers > > > Hi Alexandre, >

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

2014-11-07 Thread Alexandre DERUMIER
10:44:37 Objet: RE: [pve-devel] [PATCH] rbd : free_image : retry if rbd has watchers > 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

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

2014-11-07 Thread Dietmar Maurer
> 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 exi

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

2014-11-07 Thread Alexandre DERUMIER
ue|false. I think we need to check that $stat->{len} == $stat->{offset} and $stat->{busy} eq 'false' - Mail original - De: "Dietmar Maurer" À: "Alexandre DERUMIER" Cc: pve-devel@pve.proxmox.com Envoyé: Jeudi 6 Novembre 2014 16:08:38 Objet:

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

2014-11-06 Thread Alexandre DERUMIER
I'll resend a V2 tommorow - Mail original - De: "Dietmar Maurer" À: "Alexandre DERUMIER" Cc: pve-devel@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 w

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

2014-11-06 Thread Dietmar Maurer
> >>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. ___ pve-devel mailing list pve-devel@pve.proxmox.com http

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

2014-11-06 Thread Alexandre DERUMIER
yé: Jeudi 6 Novembre 2014 12:23:10 Objet: RE: [pve-devel] [PATCH] rbd : free_image : retry if rbd has watchers > $cmd = &$rbd_cmd($scfg, $storeid, 'rm', $name); > - run_rbd_command($cmd, errmsg => "rbd rm '$volname' error"); > + > + my $i = 0;

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

2014-11-06 Thread Dietmar Maurer
> $cmd = &$rbd_cmd($scfg, $storeid, 'rm', $name); > -run_rbd_command($cmd, errmsg => "rbd rm '$volname' error"); > + > +my $i = 0; > +while(1){ > + $i++; > + eval { > + run_rbd_command($cmd, errmsg => "rbd rm '$volname' error"); > + }; > + my $err = $@; > +

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

2014-11-05 Thread Alexandre DERUMIER
ce the hang when drive-mirror reach 100% :( - Mail original - De: "Andrew Thrift" À: "Alexandre Derumier" Cc: pve-devel@pve.proxmox.com Envoyé: Jeudi 6 Novembre 2014 03:25:10 Objet: Re: [pve-devel] [PATCH] rbd : free_image : retry if rbd has watchers Hi

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

2014-11-05 Thread Andrew Thrift
Hi Alexandre, Will this potentially fix the Disk Move issues I reported a few weeks back ? On Thu, Nov 6, 2014 at 4:09 AM, Alexandre Derumier wrote: > reported in drive-mirror, > > if we cancel the job and we try to free the rbd volume, > it seem that rbd storage take 2-3 seconds to release th

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

2014-11-05 Thread Alexandre Derumier
reported in drive-mirror, if we cancel the job and we try to free the rbd volume, it seem that rbd storage take 2-3 seconds to release the volume or it's throwing an "image still has watchers". This patch try to wait 10s with 10retries before dying Signed-off-by: Alexandre Derumier --- PVE/Sto