Commit c64d8181 authored by Mike Hibler's avatar Mike Hibler

Adjust node_type delay node osid to match an image we have.

parent 26718630
......@@ -380,6 +380,8 @@ if (1) {
# to image IDs that are not valid in this inner Emulab. So just
# pick whatever UBUNTU image we happen to have.
#
# Ditto for delay_osid, find an available FBSD10 image.
#
$query_result =
DBQueryFatal("select imageid from images ".
"where imagename like 'UBUNTU%' and pid='$TBOPSPID'");
......@@ -393,6 +395,21 @@ if (1) {
die("*** $0:\n".
" Could not lookup image $imageid");
}
$query_result =
DBQueryFatal("select imageid from images ".
"where imagename like 'FBSD10%' and pid='$TBOPSPID'");
if (!$query_result->numrows) {
die("*** $0:\n".
" Could not find a suitable FBSD10 image for delay nodes");
}
my ($dimageid) = $query_result->fetchrow_array();
my $dimage = OSImage->Lookup($dimageid);
if (! defined($dimage)) {
die("*** $0:\n".
" Could not lookup image $dimageid");
}
foreach my $type (@alltypes) {
next
if ($type->class() ne "pc" || $type->type() eq "pc");
......@@ -404,6 +421,7 @@ if (1) {
$type->SetAttribute("default_imageid", $image->imageid());
$type->SetAttribute("default_osid", $image->imageid());
$type->SetAttribute("delay_osid", $dimage->imageid());
}
}
......
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