Marc,
Can you try the attached patch?
Jean-Louis
Marc Muehlfeld wrote:
Anything new about this bug?
diff --git a/perl/Amanda/Changer.pm b/perl/Amanda/Changer.pm
index a6857a5..5bc63c6 100644
--- a/perl/Amanda/Changer.pm
+++ b/perl/Amanda/Changer.pm
@@ -185,6 +185,7 @@ has one of the following values:
volinuse The requested volume or slot is already in use
driveinuse All drives are in use
unknown Unknown reason
+ empty The slot is empty
Like types, checks for particular reasons should use the methods, to avoid
undetected typos:
@@ -1413,7 +1414,7 @@ use overload
'cmp' => sub { $_[0]->{'message'} cmp $_[1]; };
my %known_err_types = map { ($_, 1) } qw( fatal failed );
-my %known_err_reasons = map { ($_, 1) } qw( notfound invalid notimpl driveinuse volinuse unknown device );
+my %known_err_reasons = map { ($_, 1) } qw( notfound invalid notimpl driveinuse volinuse unknown device empty );
sub new {
my $class = shift; # ignore class
@@ -1468,6 +1469,7 @@ sub notimpl { $_[0]->failed && $_[0]->{'reason'} eq 'notimpl'; }
sub driveinuse { $_[0]->failed && $_[0]->{'reason'} eq 'driveinuse'; }
sub volinuse { $_[0]->failed && $_[0]->{'reason'} eq 'volinuse'; }
sub unknown { $_[0]->failed && $_[0]->{'reason'} eq 'unknown'; }
+sub empty { $_[0]->failed && $_[0]->{'reason'} eq 'empty'; }
# slot accessor
sub slot { $_[0]->{'slot'}; }
diff --git a/perl/Amanda/Changer/robot.pm b/perl/Amanda/Changer/robot.pm
index 41919e3..aa53f98 100644
--- a/perl/Amanda/Changer/robot.pm
+++ b/perl/Amanda/Changer/robot.pm
@@ -416,7 +416,7 @@ sub load_unlocked {
if ($state->{'slots'}->{$slot}->{'state'} eq Amanda::Changer::SLOT_EMPTY) {
return $self->make_error("failed", $params{'res_cb'},
- reason => "notfound",
+ reason => "empty",
message => "slot $slot is empty");
}
diff --git a/perl/Amanda/Taper/Scan/traditional.pm b/perl/Amanda/Taper/Scan/traditional.pm
index 0488742..7a697f8 100644
--- a/perl/Amanda/Taper/Scan/traditional.pm
+++ b/perl/Amanda/Taper/Scan/traditional.pm
@@ -427,6 +427,8 @@ sub stage_2 {
# or if we loaded the 'current' slot and it was invalid (this happens if
# the user changes 'use-slots', for example
$ignore_error = 1 if ($loaded_current && $err->invalid);
+ $ignore_error = 1 if ($loaded_current && $err->notfound);
+ $ignore_error = 1 if ($err->empty);
if ($ignore_error) {
$self->_user_msg(slot_result => 1, err => $err);