Commit 928d5c0a authored by David Johnson's avatar David Johnson

Fix a few places in vnode_setup.in that were stopping plab slivers from

setting up.  First chunk: we don't want to skip straight to reboot if the
node is plab.  Second chunk: we need to run both plabnode alloc and remote
vnodesetup on plab nodes.  Third chunk: we have to ssh to the vnode, not
the pnode, on plab nodes, to make sure we make it to the correct sliver.
Not sure how this last affects jails, so I special-cased it for plab.
parent 648fe6ac
......@@ -192,7 +192,8 @@ foreach my $node (@nodes) {
next;
}
if (($plabonly || $jailonly) and
!(($plabonly && $plab) || ($jailonly && ($jailed || $remote)))) {
!(($plabonly && $plab) || ($jailonly && (($jailed || $remote)
&& !$plab)))) {
next;
}
if (! TBPhysNodeID($node, \$pnode)) {
......@@ -416,7 +417,9 @@ while (1) {
# Make sure the system knows we now have state on the node!
TBSetNodeAllocState($vnode, TBDB_ALLOCSTATE_RES_INIT_DIRTY);
}
elsif (!($plab && ($mode eq "cleanup" || $mode eq "teardown"))) {
if (!($plab && ($mode eq "cleanup" || $mode eq "teardown"))
&& !($mode eq "setup" && $remote && !$plab)) {
# Cleanup is used only on plab nodes.
# Don't try to teardown plab vnodes; it's just asking for
# trouble as the shutdown may hang or take too long. It's
......@@ -426,7 +429,12 @@ while (1) {
$args .= ($jailed ? "-j " : ($plab ? "-p " : "-i "));
$args .= "$vnode ";
$exval = TBForkCmd("$ssh -host $pnode ".
# If it's a plab node, we must ssh to the vnode, not pnode.
my $pnodeOrVnode = $pnode;
if ($plab) {
$pnodeOrVnode = $vnode;
}
$exval = TBForkCmd("$ssh -host $pnodeOrVnode ".
"$CLIENT_BIN/vnodesetup $args",1);
}
......
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