Commit fa00dff7 authored by David Johnson's avatar David Johnson

Cleanups and bugfixes; mostly add multiple debug levels.

parent 3ec054c4
This diff is collapsed.
This diff is collapsed.
......@@ -104,7 +104,6 @@ sub New($$$@)
if (EmulabFeatures->FeatureEnabled("NewOsload",$user,
$self->{'GROUP'},$experiment)) {
print STDERR "libossetup New NewOsload enabled\n";
require libosload_new;
# XXX -- @nodelist
$self->loadobj(libosload_new->New());
......@@ -819,10 +818,6 @@ sub NewType($$)
if ($type eq "pcfedphys" || $type eq "pcfed") {
$type = "protogeni";
}
# elsif ($type eq 'hp5406') {
# print STDERR "changing type from $type to switch\n";
# $type = "switch";
# }
elsif (defined($typeinfo) && $typeinfo->issubnode()) {
$type = "subnode";
}
......@@ -831,11 +826,11 @@ sub NewType($$)
my $newtype = eval { $packname->New($self); };
# Not loaded?
if ($@) {
print STDERR "module load failed: " . $@ . "\n";
#print STDERR "module load failed: " . $@ . "\n";
eval "require libossetup_$type";
$newtype = eval { $packname->New($self); };
if ($@) {
print STDERR "module load failed: " . $@ . "\n";
print STDERR "$self NewType($type): module load failed: " . $@ . "\n";
return undef;
}
}
......@@ -900,7 +895,6 @@ sub New($$$)
$self->{'TYPE'} = $type;
$self->{'NODES'} = {};
$self->{'PARENT'} = $parent;
print STDERR "just set parent in $self to $parent\n";
$self->{'FAILCOUNT'} = 0;
$self->{'TODOLIST'} = {};
......@@ -950,7 +944,6 @@ sub AddNode($$)
# This sets the OS that should boot, as well as any reloads, reboots
# and reconfigs that are needed.
#
print STDERR "trying get parent in $self\n";
$self->parent()->SetOS($node);
return 0;
}
......
......@@ -34,10 +34,11 @@ sub usage()
" style==2: zero disk before running frisbee\n".
"Use -P to prepare the disk as if a whole disk image was loaded\n".
"Use -F to force the load if Emulab tries to optimize it away\n".
"Use -R to push a reconfig to the node after the reload\n");
"Use -R to push a reconfig to the node after the reload\n".
"Use -D to set a specific debug level\n");
exit(-1);
}
my $optlist = "swldi:e:p:m:rz:PcRF";
my $optlist = "swldD:i:e:p:m:rz:PcRF";
my $waitmode = 1;
my $listonly = 0;
my $debug = 0;
......@@ -89,6 +90,9 @@ if (! getopts($optlist, \%options)) {
}
$debug = 1
if (defined($options{"d"}));
if (defined($options{"D"}) && $options{"D"} =~ /^(\d+)$/) {
$debug = $1;
}
# List only mode. No need to do anymore argument processing.
sub dolisting();
......
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