Commit 074d95bf authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor bug fix to previous revision.

Cleanup the debugging output in nodejailosid.
Make sure that virtnodes get a reasonable default osid
based on the node type info.
parent e6a4827e
...@@ -1214,8 +1214,15 @@ sub LoadVirtNodes($) ...@@ -1214,8 +1214,15 @@ sub LoadVirtNodes($)
$vnode->_osinfo($osinfo); $vnode->_osinfo($osinfo);
} }
elsif ($isvirt) { elsif ($isvirt) {
# Silly default. my $osinfo;
my $osinfo = OSinfo->LookupByName("OPENVZ-STD"); if ($nodetype->type() eq "pcvm") {
# Silly default.
$osinfo = OSinfo->LookupByName("OPENVZ-STD");
}
else {
# Grab it from the typeinfo.
$osinfo = OSinfo->Lookup($nodetype->default_osid());
}
$vnode->_osinfo($osinfo); $vnode->_osinfo($osinfo);
} }
...@@ -5505,6 +5512,8 @@ sub InterpLinksAux($) ...@@ -5505,6 +5512,8 @@ sub InterpLinksAux($)
$protolink->SetType((defined($protovlan) ? $protolink->SetType((defined($protovlan) ?
"emulated" : "vlan")); "emulated" : "vlan"));
$protolink->SetRole("link/lan"); $protolink->SetRole("link/lan");
$protovlan->SetAttribute("link/lan", $lan)
if (!defined($protolan));
$protolink->AddInterface($nodeA, $vnodeA, $vportA, $protolink->AddInterface($nodeA, $vnodeA, $vportA,
$virtifaceA->viface(), $virtifaceA->viface(),
...@@ -6204,17 +6213,19 @@ sub nodejailosid($$) ...@@ -6204,17 +6213,19 @@ sub nodejailosid($$)
my $posinfo = $virtnode->_parent_osinfo(); my $posinfo = $virtnode->_parent_osinfo();
my $nextosid; my $nextosid;
$self->printdb("nodejailosid: $virtnode, $osinfo\n");
if (!defined($posinfo)) { if (!defined($posinfo)) {
return undef return undef
if (!defined($osinfo->nextosid())); if (!defined($osinfo->nextosid()));
$osinfo = $osinfo->ResolveNextOSID($self->experiment()); my $newosinfo = $osinfo->ResolveNextOSID($self->experiment());
return undef return undef
if (!defined($osinfo)); if (!defined($newosinfo));
$nextosid = $osinfo->osid(); $nextosid = $newosinfo->osid();
if (defined($nextosid)) { if (defined($nextosid)) {
$self->printdb("Mapping VM osinfo $osinfo to ". $self->printdb("Mapping VM osinfo $osinfo to ".
"$nextosid on $virtnode\n"); "$newosinfo on $virtnode\n");
} }
else { else {
tbwarn("Could not map jail osid to real osid on $virtnode\n"); tbwarn("Could not map jail osid to real osid on $virtnode\n");
......
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