Commit baea5be0 authored by Leigh B Stoller's avatar Leigh B Stoller

Bug fix to require statement, contributed by Maarten De Wispelaere.

parent d1c56857
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-2012 University of Utah and the Flux Group.
# Copyright (c) 2000-2013 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -298,7 +298,7 @@ sub NewType($$)
# Not loaded?
if ($@) {
$self->dprint(2,"NewType($type): simple module load failed: " . $@);
eval "require libosload_$type";
eval "require \"libosload_" . $type . "\"";
$newtype = eval { $packname->New($self); };
if ($@) {
$self->dprint(1,"$self NewType($type): module load failed: " . $@);
......
......@@ -43,6 +43,7 @@ use libosload;
use Node;
use NodeType;
use libtblog;
use Logfile;
use English;
use Data::Dumper;
use EmulabFeatures;
......@@ -918,7 +919,7 @@ sub NewType($$)
# Not loaded?
if ($@) {
#print STDERR "module load failed: " . $@ . "\n";
eval "require libossetup_$type";
eval "require \"libossetup_" . $type . "\"";
$newtype = eval { $packname->New($self); };
if ($@) {
# print STDERR "$self NewType($type): module load failed: " . $@ . "\n"
......@@ -1754,6 +1755,18 @@ sub WaitDone($@)
print "$node_id is alive and well\n";
$node->SetBootStatus(NODEBOOTSTATUS_OKAY);
$node->SetAllocState(TBDB_ALLOCSTATE_RES_READY());
#
# Look for a node boot log and create a logfile from it.
#
my $bootlog;
if ($node->GetBootLog(\$bootlog) == 0 && $bootlog ne "") {
my $logfile = Logfile->CreateFromString($self->group(),
$bootlog);
if (defined($logfile)) {
$logfile->SetMetadata({"bootlog" => $node->node_id()}, 1);
}
}
next;
}
$node->SetBootStatus(NODEBOOTSTATUS_FAILED);
......@@ -1772,6 +1785,17 @@ sub WaitDone($@)
else {
tbwarn("$node_id failed to boot\n");
}
#
# Look for a node boot log and create a logfile from it.
#
my $bootlog;
if ($node->GetBootLog(\$bootlog) == 0 && $bootlog ne "") {
my $logfile = Logfile->CreateFromString($self->group(), $bootlog);
if (defined($logfile)) {
$logfile->SetMetadata({"bootlog" => $node->node_id()}, 1);
}
}
if ($node->_canfail() &&
!($experiment->canceled() || $parent->noretry())) {
......
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