Commit 07e44d43 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fixes to how I was defaulting the osname for a virt_node entry.

parent 2608a4e2
......@@ -659,7 +659,7 @@ sub GetTicket($;$)
my $virtualization_subtype = $ref->{'virtualization_subtype'};
my $exclusive = $ref->{'exclusive'};
my $pctype = "pc";
my $osname = "";
my $osname;
my $node;
# Let remote nodes pass through.
......@@ -725,12 +725,21 @@ sub GetTicket($;$)
"Bad resource $resource_uuid");
goto bad;
}
}
#
# If no isname by this point, try for the default.
#
if (defined($node) && !defined($osname)) {
if (defined($node->default_osid())) {
my $osinfo = OSinfo->Lookup($node->default_osid());
$osname = $osinfo->osname()
if (defined($osinfo));
}
}
# The slot does not like to be NULL.
$osname = ""
if (!defined($osname));
my $virtnode =
$virtexperiment->NewTableRow("virt_nodes",
{"vname" => $node_nickname,
......
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