Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
af5c4bf9
Commit
af5c4bf9
authored
Feb 27, 2017
by
Leigh B Stoller
Browse files
Watch for rspec using a deleted image and return error message.
parent
0115ea3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
protogeni/lib/GeniAggregate.pm.in
View file @
af5c4bf9
...
...
@@ -1168,6 +1168,15 @@ sub Action($$$;$)
if (!$isloaded || $reload) {
my $image = $osinfo->MapToImage("pcvm");
if (defined($image)) {
#
# For now, not allowed to use a deleted image.
# Revisit later.
#
if (defined($image->deleted())) {
$msg = "$vnode needs to load $image, ".
"but it has been deleted";
goto bad;
}
print STDERR "Setting $vnode to load $image\n";
if (!exists($reloads{$image->versid()})) {
...
...
@@ -1299,6 +1308,15 @@ sub Action($$$;$)
$msg .= " No image for $osinfo on $node";
goto bad;
}
#
# For now, not allowed to use a deleted image.
# Revisit later.
#
if (defined($image->deleted())) {
$msg = "$node needs to load $image, ".
"but it has been deleted";
goto bad;
}
if (!exists($reloads{$image->versid()})) {
$reloads{$image->versid()} = [ ];
}
...
...
@@ -1760,6 +1778,8 @@ sub Action($$$;$)
# Mark the offending sliver as failed.
if (defined($sliver)) {
$sliver->SetStatus("failed");
$sliver->SetErrorLog($msg)
if (defined($msg));
}
return -1;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment