Commit 7cad70e4 authored by Dan Gebhardt's avatar Dan Gebhardt
Browse files

last checkin had some weird "merge" problems

parent 552330c9
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
my $TEVC = "/usr/testbed/bin/tevc"; my $TEVC = "/usr/testbed/bin/tevc";
my $NLIST = "/usr/testbed/bin/node_list"; my $NLIST = "/usr/testbed/bin/node_list";
my $pprefix = "planet-"; #my $pprefix = "planet-";
my $pprefix = "plab-";
# XXX Need to configure this stuff! # XXX Need to configure this stuff!
use lib '/usr/testbed/lib'; use lib '/usr/testbed/lib';
use libtbdb; use libtbdb;
use Socket; use Socket;
<<<<<<< init-elabnodes.pl
use Getopt::Std; use Getopt::Std;
use Class::Struct; use Class::Struct;
use libxmlrpc; use libxmlrpc;
...@@ -42,17 +42,12 @@ struct( initvalres => { ...@@ -42,17 +42,12 @@ struct( initvalres => {
tstampLastSample => '$' } ); tstampLastSample => '$' } );
#'################ #'################
=======
use Getopt::Std;
>>>>>>> 1.5
# #
# Every source host has a list of <dest-IP,bw,delay,plr> tuples, one # Every source host has a list of <dest-IP,bw,delay,plr> tuples, one
# element per possible destination # element per possible destination
# #
my %shapeinfo; my %shapeinfo;
my $optlist = "n";
my $showonly = 0; my $showonly = 0;
# Default values. Note: delay and PLR are round trip values. # Default values. Note: delay and PLR are round trip values.
...@@ -68,8 +63,8 @@ my $DBUSER = "pelab"; ...@@ -68,8 +63,8 @@ my $DBUSER = "pelab";
# Parse command arguments. Once we return from getopts, all that should be # Parse command arguments. Once we return from getopts, all that should be
# left are the required arguments. # left are the required arguments.
# #
%options = (); my %options = ();
if (! getopts($optlist, \%options)) { if (! getopts("n", \%options)) {
usage(); usage();
} }
if (defined($options{"n"})) { if (defined($options{"n"})) {
...@@ -116,12 +111,11 @@ libxmlrpc::Config({"server" => $RPCSERVER, ...@@ -116,12 +111,11 @@ libxmlrpc::Config({"server" => $RPCSERVER,
# #
my @nodelist = split('\s+', `$NLIST -m -e $pid,$eid`); my @nodelist = split('\s+', `$NLIST -m -e $pid,$eid`);
chomp(@nodelist); chomp(@nodelist);
#TODO: uncomment after testing my $nnodes = grep(/^${pprefix}/, @nodelist);
#my $nnodes = grep(/^${pprefix}/, @nodelist); if ($nnodes == 0) {
#if ($nnodes == 0) { print STDERR "No planetlab nodes in $pid/$eid?!\n";
# print STDERR "No planetlab nodes in $pid/$eid?!\n"; exit(1);
# exit(1); }
#}
# Preload the site indicies rather then doing fancy joins. # Preload the site indicies rather then doing fancy joins.
my %site_mapping = (); my %site_mapping = ();
...@@ -143,6 +137,8 @@ foreach my $mapping (@nodelist) { ...@@ -143,6 +137,8 @@ foreach my $mapping (@nodelist) {
die("Could not map $pnode to its site index!\n"); die("Could not map $pnode to its site index!\n");
} }
my ($site_index) = $query_result->fetchrow_array(); my ($site_index) = $query_result->fetchrow_array();
print "Mapping $vnode to $pnode\n";
$node_mapping{$vnode} = $pnode; $node_mapping{$vnode} = $pnode;
$site_mapping{$pnode} = $site_index; $site_mapping{$pnode} = $site_index;
......
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