Subject: | wait_for_volume hangs indefinitely |
Date: | Wed, 30 Jul 2014 16:32:15 -0600 |
To: | bug-VM-EC2 [...] rt.cpan.org |
From: | Kai Moonbourn <epimetreus [...] fastmail.fm> |
It appears that wait_for_volume uses cached information when testing the
volume status; the following hangs indefinitely:
my @wait = map { $ec2->detach_volume($_) } @volumes;
$ec2->wait_for_volumes(@wait);
However, the following works:
my @wait = map { $ec2->detach_volume($_) } @volumes;
my $to = 0;
VOL_WAIT: while($to < 600) {
sleep 1;
$to++;
say $to;
foreach my $vol (@wait) {
say
$vol->volumeId.':'.$ec2->describe_volumes($vol->volumeId)->status;
next VOL_WAIT if
$ec2->describe_volumes($vol->volumeId)->status ne 'available';
}
last;
}
On a side note, why is there no detach_volumes() method? Being able to
detach multiple volumes at once would seem to be a very obvious function
. . .