Commit 992665d3 authored by Mike Hibler's avatar Mike Hibler

Use boss as the ssh proxy if inner ops is a VM.

Subtle: if your elabinelab uses a VM for ops, then there will be no
myops.eid.pid.emulab.net DNS alias created outside (since there is no actual
ops node in the topo) and thus the inner ops cannot be used as a proxy for
ssh'ing to the unroutable inner nodes. In that case we use the inner boss
instead.
parent 2810b0e1
...@@ -58,6 +58,7 @@ $USERSELECTUIDS = 1; ...@@ -58,6 +58,7 @@ $USERSELECTUIDS = 1;
$REMOTEWIKIDOCS = @REMOTEWIKIDOCS@; $REMOTEWIKIDOCS = @REMOTEWIKIDOCS@;
$GMAP_API_KEY = "@GMAP_API_KEY@"; $GMAP_API_KEY = "@GMAP_API_KEY@";
$NONAMEDSETUP = @DISABLE_NAMED_SETUP@; $NONAMEDSETUP = @DISABLE_NAMED_SETUP@;
$OPS_VM = @OPSVM_ENABLE@;
$TBMAILADDR_OPS = "@TBOPSEMAIL_NOSLASH@"; $TBMAILADDR_OPS = "@TBOPSEMAIL_NOSLASH@";
$TBMAILADDR_WWW = "@TBWWWEMAIL_NOSLASH@"; $TBMAILADDR_WWW = "@TBWWWEMAIL_NOSLASH@";
......
...@@ -61,6 +61,18 @@ $isfednode= $row["isfednode"]; ...@@ -61,6 +61,18 @@ $isfednode= $row["isfednode"];
# #
$unroutable = ($ELABINELAB || !strncmp($CONTROL_NETWORK, "192.168.", 8)); $unroutable = ($ELABINELAB || !strncmp($CONTROL_NETWORK, "192.168.", 8));
#
# If we need a proxy host, determine whether it is ops or boss.
# Normally it is ops, unless ops is a VM and it is in an inner elab.
# In that case, there is no external DNS alias ("myops.eid.pid.emulab.net")
# created for the inner ops so it cannot be the proxy.
#
if ($ELABINELAB && $OPS_VM) {
$PROXYNODE = $BOSSNODE;
} else {
$PROXYNODE = $USERNODE;
}
if (!isset($pid)) { if (!isset($pid)) {
USERERROR("$node_id is not allocated to an experiment!", 1); USERERROR("$node_id is not allocated to an experiment!", 1);
} }
...@@ -93,14 +105,14 @@ if ($isvirt) { ...@@ -93,14 +105,14 @@ if ($isvirt) {
# bounce through ops node to get there. They run sshd on # bounce through ops node to get there. They run sshd on
# on the standard port, but on a private IP. # on the standard port, but on a private IP.
# #
echo "gateway: $USERNODE\n"; echo "gateway: $PROXYNODE\n";
} }
} }
elseif ($unroutable) { elseif ($unroutable) {
# #
# If nodes are unroutable, gateway via the user node # If nodes are unroutable, gateway via the user node
# #
echo "gateway: $USERNODE\n"; echo "gateway: $PROXYNODE\n";
} }
elseif ($issubnode && $class == 'ixp') { elseif ($issubnode && $class == 'ixp') {
# #
......
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