Commit 846badf8 authored by Kevin Atkinson's avatar Kevin Atkinson

*** empty log message ***

parent 096f72d5
...@@ -54,7 +54,8 @@ LIB_STUFF = libtbsetup.pm exitonwarn.pm libtestbed.pm snmpit_intel.pm \ ...@@ -54,7 +54,8 @@ LIB_STUFF = libtbsetup.pm exitonwarn.pm libtestbed.pm snmpit_intel.pm \
snmpit_foundry.pm snmpit_stack.pm snmpit_remote.pm \ snmpit_foundry.pm snmpit_stack.pm snmpit_remote.pm \
snmpit_nortel.pm \ snmpit_nortel.pm \
libaudit.pm libreboot.pm libosload.pm libtestbed.py \ libaudit.pm libreboot.pm libosload.pm libtestbed.py \
power_mail.pm power_whol.pm power_mail.pm power_whol.pm \
libtblog.pm
# #
# Force dependencies on the scripts so that they will be rerun through # Force dependencies on the scripts so that they will be rerun through
......
...@@ -112,6 +112,7 @@ use libdb; ...@@ -112,6 +112,7 @@ use libdb;
use libtestbed; use libtestbed;
use Node; use Node;
use libadminctrl; use libadminctrl;
use libtblog;
# #
# assign_wrapper Settings # assign_wrapper Settings
...@@ -189,8 +190,7 @@ sub fatal ($) ...@@ -189,8 +190,7 @@ sub fatal ($)
{ {
my($message) = @_; my($message) = @_;
print STDERR "*** $0:\n". tberror $message;
" $message\n";
# We next go to the END block below. # We next go to the END block below.
exit($WRAPPER_FAILED); exit($WRAPPER_FAILED);
...@@ -211,8 +211,7 @@ END { ...@@ -211,8 +211,7 @@ END {
} }
if ($warnings > 0) { if ($warnings > 0) {
print STDERR "*** $0:\n". tbwarn "$warnings.\n";
" $warnings warnings.\n";
$exitcode |= $WRAPPER_FAILED; $exitcode |= $WRAPPER_FAILED;
} }
...@@ -889,8 +888,7 @@ sub RunAssign () ...@@ -889,8 +888,7 @@ sub RunAssign ()
# #
POSIX::setsid(); POSIX::setsid();
exec("nice $cmd $cmdargs > assign.log"); exec("nice $cmd $cmdargs > assign.log");
die("*** $0:\n". die "Could not start assign!\n";
" Could not start assign!\n");
} }
# Check cancel flag before continuing. # Check cancel flag before continuing.
...@@ -4260,18 +4258,16 @@ sub CreateTopFile() ...@@ -4260,18 +4258,16 @@ sub CreateTopFile()
# If the user had explicitly asked for these, we # If the user had explicitly asked for these, we
# print a warning # print a warning
if (virtlanemulated($lan)) { if (virtlanemulated($lan)) {
print STDERR "*** WARNING: $0: ". tbwarn "tb-set-multiplexed not supported on ".
"tb-set-multiplexed not supported on ". "$lan since one of the nodes in $lan is ".
"$lan since one of the nodes in $lan is ". "not running the standard FreeBSD image ".
"not running the standard FreeBSD image ". "(FBSD-STD)";
"(FBSD-STD)\n";
} }
if (virtlanuseveth($lan)) { if (virtlanuseveth($lan)) {
print STDERR "*** WARNING: $0: ". tbwarn "tb-set-useveth not supported on ".
"tb-set-useveth not supported on ". "$lan since one of the nodes in $lan is ".
"$lan since one of the nodes in $lan is ". "not running the standard FreeBSD image ".
"not running the standard FreeBSD image ". "(FBSD-STD)";
"(FBSD-STD)\n";
} }
$emulated = 0; $emulated = 0;
$virt_lans{$lan}->{"EMULATED"} = 0; $virt_lans{$lan}->{"EMULATED"} = 0;
......
...@@ -82,6 +82,7 @@ my $CONTROL = "@USERNODE@"; ...@@ -82,6 +82,7 @@ my $CONTROL = "@USERNODE@";
use lib "@prefix@/lib"; use lib "@prefix@/lib";
use libdb; use libdb;
use libtestbed; use libtestbed;
use libtblog;
my $parser = "$TB/libexec/parse-ns"; my $parser = "$TB/libexec/parse-ns";
my $mkexpdir = "$TB/libexec/mkexpdir"; my $mkexpdir = "$TB/libexec/mkexpdir";
...@@ -367,6 +368,11 @@ if (! DBQueryWarn("unlock tables")) { ...@@ -367,6 +368,11 @@ if (! DBQueryWarn("unlock tables")) {
# #
$justexit = 0; $justexit = 0;
#
# Set error reporting info
#
tblog_set_info($pid,$eid,$UID);
# #
# Create a directory structure for the experiment. # Create a directory structure for the experiment.
# #
...@@ -1017,6 +1023,8 @@ END { ...@@ -1017,6 +1023,8 @@ END {
} }
my $saved_exitcode = $?; my $saved_exitcode = $?;
tblog_find_error() if $?;
if ($cleaning) { if ($cleaning) {
# #
# We are screwed; a recursive error. Someone will have to clean # We are screwed; a recursive error. Someone will have to clean
......
...@@ -62,6 +62,7 @@ if ($EUID != 0) { ...@@ -62,6 +62,7 @@ if ($EUID != 0) {
use lib "@prefix@/lib"; use lib "@prefix@/lib";
use libdb; use libdb;
use libtestbed; use libtestbed;
use libtblog;
# #
# Turn off line buffering on output # Turn off line buffering on output
......
This diff is collapsed.
-- MYSQL TABLES used for logging subsystem
CREATE TABLE log (
seq int unsigned NOT NULL auto_increment,
stamp int unsigned NOT NULL,
pidx int NOT NULL, -- unique project id
uid int default NULL, -- numeric user id
session int unsigned NOT NULL, -- session id (1)
invocation int unsigned NOT NULL, -- invocation id - unique id for a
-- particular execution of a script (1)
parent int unsigned NOT NULL, -- invocation id of the parent script
script smallint(3) NOT NULL, -- numeric id for the script name
level smallint(2) NOT NULL , -- depth of the script in the call chain
priority smallint(3) NOT NULL, -- syslog priority
inferred tinyint(1) NOT NULL, -- 0 - log created with tblog
-- 1 - log created by catching a die or warn
-- 2 - log created with a normal print and
-- given the non-default priority
-- 3 - log created with a normal print and
-- given the default priority
cause varchar(32) NOT NULL, -- string identifying the "cause" of the error
type enum('normal','entering','exiting','thecause')
NOT NULL default 'normal',-- type of error:
-- normal: normal error generated by tblog
-- entering: auto gen when a script starts
-- exiting: auto gen when a script exists (2)
-- thecause: created by tblog_find_error
relevant tinyint(1) NOT NULL, -- if the error was considered relevent
-- by tblog_find_error
mesg text NOT NULL, -- the text of the message
PRIMARY KEY (seq),
KEY (session)
);
-- (1) These ids are equal to the sequence number of the "entering" log
-- message
-- (2) Due to a number of factors every "exiting" message in not
-- garanteed to have a 1-1 relation with the "entering" message.
-- The two major ones are
-- (1) A Fork not followed by a "exec" will most likely to cause
-- multiple exiting messages. (2) If "exec" is used the script
-- will not have an exiting message.
-- NOTE: It may be beneficial to split this table into three:
-- session pidx uid
-- invocation session parent script level
-- seq stamp [session] invocation priority inferred cause type relevant mesg
-- ...
CREATE TABLE scripts (
script smallint(3) NOT NULL auto_increment,
name varchar(24) NOT NULL default '',
PRIMARY KEY (script),
UNIQUE KEY id (name)
);
CREATE TABLE priorities (
priority smallint(3) NOT NULL,
name varchar(8) NOT NULL,
primary key (priority),
unique key (name)
);
insert into priorities values (000, 'EMERG');
insert into priorities values (100, 'ALERT');
insert into priorities values (200, 'CRIT');
insert into priorities values (300, 'ERR');
insert into priorities values (400, 'WARNING');
insert into priorities values (500, 'NOTICE');
insert into priorities values (600, 'INFO');
insert into priorities values (700, 'DEBUG');
...@@ -59,6 +59,7 @@ use libdb; ...@@ -59,6 +59,7 @@ use libdb;
use libreboot; use libreboot;
use libosload; use libosload;
use libtestbed; use libtestbed;
use libtblog;
TBDebugTimeStampsOn(); TBDebugTimeStampsOn();
......
...@@ -24,6 +24,7 @@ use lib '@prefix@/lib'; ...@@ -24,6 +24,7 @@ use lib '@prefix@/lib';
use libdb; use libdb;
use snmpit_lib; use snmpit_lib;
use libtblog;
use English; use English;
use Getopt::Long; use Getopt::Long;
......
...@@ -66,6 +66,9 @@ my $TBROOT = "@prefix@"; ...@@ -66,6 +66,9 @@ my $TBROOT = "@prefix@";
use lib '@prefix@/lib'; use lib '@prefix@/lib';
require exitonwarn; require exitonwarn;
use libdb; use libdb;
use libtblog;
tblog_stop_capture('stdout');
my $TRACK_INTERSWITCH_BANDWIDTH = "@TRACK_INTERSWITCH_BANDWIDTH@"; my $TRACK_INTERSWITCH_BANDWIDTH = "@TRACK_INTERSWITCH_BANDWIDTH@";
......
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