Commit a3b7539b authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor fixes to remotenode/virtnode support to allow for remote

physical nodes that are not shared (permentantly allocated).
parent dfd80ce3
......@@ -547,8 +547,8 @@ sub Start($)
return -1;
}
# Remote/shared nodes are handled special.
if ($node->isremotenode() ||
# Remote/shared virtual nodes are handled special.
if (($node->isremotenode() && $node->isvirtnode()) ||
($node->isvirtnode() && $node->sharing_mode())) {
$sliver->Start() == 0
or return -1;
......
......@@ -997,6 +997,9 @@ sub GetTicket($;$)
my $node = LookupNode($component_uuid);
my $colocate = $rspec->{'colocate'} ||
$rspec->{'phys_nickname'};
my $exclusive = $rspec->{'exclusive'};
$exclusive = 0
if (!defined($exclusive));
$rspec->{'component_uuid'} = $component_uuid;
$rspec->{'component_manager_uuid'} =
......@@ -1006,12 +1009,13 @@ sub GetTicket($;$)
$virtnode->fixed($node->node_id());
#
# Shared and remote nodes do not need to be allocated.
# Shared and virt nodes do not need to be allocated.
#
# XXX This is going to cause breakage since the reservations
# are not recorded anyplace until the ticket is redeemed.
#
if (! ($node->sharing_mode() || $node->isremotenode)) {
if (! ($node->sharing_mode() || $node->isplabphysnode() ||
($node->isremotenode() && !$exclusive))) {
# Need to allocate this node unless already mapped.
push(@nodeids, $node->node_id())
if (!exists($namemap{$virtual_id}));
......@@ -1420,14 +1424,9 @@ sub SliverWork($$)
}
#
# Widearea nodes do not need to be allocated, but for now all
# I allow is a plabdslice node.
# Plab nodes do not need to be allocated.
#
if ($node->isremotenode()) {
if (! $node->isplabphysnode()) {
$message = "Only plab widearea nodes";
goto bad;
}
if ($node->isplabphysnode()) {
$needplabslice = 1;
next;
}
......@@ -1701,8 +1700,8 @@ sub SliverWork($$)
goto bad;
}
# See below; setup all pnodes at once.
if ($node->isremotenode()) {
# See below; setup all plab nodes at once.
if ($node->isplabphysnode()) {
my $vnode = LookupNode($sliver->uuid());
if (!defined($vnode)) {
print STDERR "Could not locate vnode $sliver\n";
......
......@@ -727,7 +727,13 @@ sub Create($$$$$$)
print STDERR "Could not map node $resource_uuid to its object\n";
return undef;
}
if (! ($node->isremotenode() || $node->sharing_mode())) {
#
# An artifact of Emulab is that for shared/remote nodes, the physical
# node is already allocated, but not to the current experiment. An
#
if (! ($node->sharing_mode() ||
($node->isremotenode() && $node->isvirtnode()))) {
my $reservation = $node->Reservation();
if (!defined($reservation)) {
print STDERR "$node was already released from $slice\n";
......@@ -854,7 +860,7 @@ sub Provision($;$)
}
# See below; remote nodes are currently assumed to be running.
$self->SetStatus("ready")
if (!$node->isremotenode());
if (!($node->isremotenode() && $node->isvirtnode()));
return 0;
}
......@@ -894,7 +900,7 @@ sub UnProvision($;$)
my $pid = $experiment->pid();
my $eid = $experiment->eid();
if ($node->isremotenode()) {
if ($node->isremotenode() && $node->isvirtnode()) {
system("$VNODESETUP -p -q -m -k $pid $eid $node_id");
if ($?) {
print STDERR "$VNODESETUP -k failed on $node_id\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