Commit ccd40a5b authored by Leigh Stoller's avatar Leigh Stoller

Ug, ImageAliases really muck up things. :-) Note to self, it makes no

sense to use a version specific image when the image is an imagealias,
since the underlying image versions have no relation to each other.
My previous fix and some earlier changes forgot this little fact.
parent 02aa9235
......@@ -1331,7 +1331,7 @@ sub GetTicketAuxAux($)
}
goto bad;
}
if (!$image->isImage()) {
if ($image->isImageAlias() || !$image->isImage()) {
$osname = $image->pid() . "/" . $image->osname();
}
elsif ($image->IsLocal() || $image->IsSystemImage()) {
......
......@@ -304,6 +304,14 @@ sub MapToLocalImage($$$$@)
if ($ospid eq TBOPSPID()) {
my $image = OSImage->Lookup($ospid, $osname);
if (defined($image)) {
if ($image->isImageAlias()) {
return $image
if (!defined($osvers));
# Makes no sense to specify an version number on an alias.
return GeniResponse->BadArgsResponse(
"Not allowed to use version numbers on $urn");
}
# Generic, MFS, etc.
return $image
if (!$image->isImage());
......@@ -425,7 +433,7 @@ sub MapToLocalImage($$$$@)
# If we have it and its local, then we are good unless the user
# wants a specific version that does not exist.
#
if ($image->IsLocal()) {
if (!$image->isImageAlias() && $image->IsLocal()) {
return &$setPerms($image)
if (!defined($osvers));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment