Skip to content

Commit

Permalink
[UPC#478] retries if storage busy
Browse files Browse the repository at this point in the history
Fixes UPC#478
  • Loading branch information
frankiejol committed Nov 20, 2017
1 parent 815cd99 commit 63ab8cf
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/Ravada/VM/KVM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,12 @@ sub search_volume_re($self,$pattern,$refresh=0) {

sub _refresh_storage_pools($self) {
for my $pool ($self->vm->list_storage_pools) {
eval { $pool->refresh() };
last if !$@;
warn $@ if $@ !~ /pool .* has asynchronous jobs running/;
sleep 1;
for (;;) {
eval { $pool->refresh() };
last if !$@;
warn $@ if $@ !~ /pool .* has asynchronous jobs running/;
sleep 1;
}
}
}

Expand Down

0 comments on commit 63ab8cf

Please sign in to comment.