>      $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 = $@;
> +
> +     sleep 1 if ($err && $err =~ m/image still has watchers/);

And what happens if we get other errors?

> +
> +     die "image still has watchers" if $i > 10;
> +     last if !$err;
> +    }

_______________________________________________
pve-devel mailing list
[email protected]
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to