All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 76e22cc0 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add info to ltmap file that indicates a link is droptail,red, or gred.

This is strictly information right now; it is not worth trying to make
linktest calculate the expected loss for a red or gred link, but at
least the error report will indicate it.

Also add a linktest version tag and send that to the output log.
parent c5abb71a
......@@ -12,6 +12,8 @@ use IO::Handle;
use English;
use Socket;
my $LINKTEST_VERSION = "1.0";
#
# Linktest test script. This script is set up to run as root on
# experiment nodes. It is invoked by the Linktest daemon after the
......@@ -120,7 +122,8 @@ struct ( edge => {
dstip => '$',
bw => '$',
delay => '$',
loss => '$'});
loss => '$',
queuetype => '$'});
struct ( host => {
name => '$',
......@@ -345,8 +348,9 @@ sleep(int(rand(5)));
&get_topo($topology_file) unless &is_special_node();
&debug_top();
my $msg = "Linktest Starting";
&sim_event(EVENT_LOG,$msg);
my $msg = "Linktest Version $LINKTEST_VERSION";
&sim_event(EVENT_LOG, $msg);
&post_event(EVENT_REPORT, $msg);
&debug("\n$msg\n\n");
if (defined($rtproto) && $rtproto eq RTPROTO_SESSION) {
......@@ -1035,7 +1039,7 @@ sub static_rt_test {
#
# If the count gets too high, lets stop and wait.
#
if ($waitcount > 1) {
if ($waitcount > 10) {
&debug("Pausing to wait for outstanding pings to clear ...\n");
foreach my $name (keys(%waitlist)) {
......@@ -1105,7 +1109,8 @@ sub print_link {
$edge->dst . "-" . $edge->name;
$str .= " (" . ($edge->bw / 1000000) . " Mbps, " .
$edge->delay . "ms, " . (100 * $edge->loss) . "% loss)";
$edge->delay . "ms, " . (100 * $edge->loss) . "% loss, " .
$edge->queuetype . ")";
return $str;
}
......@@ -1135,7 +1140,9 @@ sub get_topo {
$newHost->name($1);
$newHost->visited(0);
$hostmap{$1} = $newHost;
} elsif ( /^l (\S+)\s+(\S+)\s+(\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\S+)/) {
}
elsif (/^l (\S+)\s+(\S+)\s+(\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\S+)\s+(\S+)/ ||
/^l (\S+)\s+(\S+)\s+(\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\S+)/) {
my $newEdge = new edge;
$newEdge->name($6);
$newEdge->src($1);
......@@ -1145,6 +1152,7 @@ sub get_topo {
$newEdge->bw($3);
$newEdge->delay($4 * 1000); # units of ms
$newEdge->loss($5);
$newEdge->queuetype((defined($7) ? $7 : "droptail"));
push @links, $newEdge;
push @{ $hostmap{$newEdge->src}->links }, $newEdge;
push @{ $hostmap{$newEdge->dst}->links }, $newEdge;
......@@ -1380,9 +1388,9 @@ sub wait_all {
}
#
# The special node sends a signal to run_linktest, in case it is listening.
# Mainly informational, but the COMPLETE message informs run_linktest.pl
# that all exited properly.
# post_event sends an event to the ltevent process running on ops (the
# controlling process for linktest). The REPORT events are displayed to
# the user.
#
sub post_event {
my ($event,$args) = map { $1 if (/(.*)/) } @_;
......@@ -1415,9 +1423,9 @@ sub post_event2 {
}
#
# The special node sends a signal to run_linktest, in case it is listening.
# Mainly informational, but the COMPLETE message informs run_linktest.pl
# that all exited properly.
# sim_event sends an event to the event scheduler. EVENT_LOG events
# deposit their message into the event scheduler log file. Kinda silly
# if ya ask me!
#
sub sim_event {
my ($event,$args) = map { $1 if (/(.*)/) } @_;
......
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