Commit 39c83013 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Print out the IP port range when there is one (using jailed nodes).

Also print out the fixed nodes when a virtual node is fixed to a
NS node. Reflects a change in the front end parser.
parent e1ccf5a4
......@@ -159,7 +159,7 @@ if (($state eq EXPTSTATE_ACTIVE) ||
#
my $virtnodes_result =
DBQueryFatal("SELECT vname,ips,osname,cmd_line,rpms,deltas," .
"startupcmd,tarfiles,type from virt_nodes ".
"startupcmd,tarfiles,type,fixed from virt_nodes ".
"where pid='$pid' and eid='$eid'");
if ($shownodes) {
......@@ -169,7 +169,11 @@ if ($shownodes) {
"--------------------\n";
while (($vname,$ips,$osname,$cmd_line,$rpms,$deltas,$startupcmd,
$tarfiles,$type) = $virtnodes_result->fetchrow_array()) {
$tarfiles,$type,$fixed) = $virtnodes_result->fetchrow_array()) {
if ($fixed) {
$vname = "$vname ($fixed)";
}
printf "%-15s %-12s %-15s %s\n", $vname, $type, $osname,
"$vname.$eid.$pid.$DOMAIN";
......@@ -214,6 +218,19 @@ if ($showmap &&
printf "\n";
}
print "\n";
my $range_result =
DBQueryFatal("select low,high from ipport_ranges ".
"where pid='$pid' and eid='$eid'");
if ($range_result->numrows) {
my ($low,$high) = $range_result->fetchrow_array();
print "IP Port allocation:\n";
printf "%-15s %-12s %-15s \n", "Low", "High", "SSHD";
print "--------------- ------------ ---------------\n";
printf "%-15s %-12s %-15s (use 'ssh -p $low')\n", $low, $high, $low;
print "\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