Commit c05b40bb authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Fix for maptoimage getting a "generic" image. Need to come back to this

for a proper solution at some point.
parent 5f3c5bab
......@@ -1229,7 +1229,8 @@ sub MapToImage($$)
$type = $nodetype;
}
return $self
if ($self->architecture() && $type->architecture());
if ($self->isImage() &&
$self->architecture() && $type->architecture());
# This returns an OSimage.
return $self->osinfo()->MapToImage($type);
......
......@@ -421,8 +421,12 @@ sub SetOS($$)
if ($node->isvirtnode() && $osimage->def_parentosid()) {
#
# But, if the subos is static (like OPENVZ-STD), there is
# no reload, cause it is already on the parent image. Lets use
# the fact that no image link exists, to distinguish this case.
# no reload, cause it is already on the parent image. But this
# is currently difficult to determine, which is something that
# needs to be fixed.
#
# So instead, just watch for an image we can map to, and if
# nothing is returned, just move on.
#
$imageable = 1
if (defined($osimage->MapToImage($node->type())));
......
Supports Markdown
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