Commit 1871bc35 authored by Robert Ricci's avatar Robert Ricci

Added a new reloading opmode, RELOAD-MOTE, for motes.

parent a51d5be6
......@@ -97,7 +97,8 @@ use vars qw(@ISA @EXPORT);
TBDB_NODEOPMODE_NORMAL TBDB_NODEOPMODE_DELAYING
TBDB_NODEOPMODE_UNKNOWNOS TBDB_NODEOPMODE_RELOADING
TBDB_NODEOPMODE_NORMALv1 TBDB_NODEOPMODE_MINIMAL
TBDB_NODEOPMODE_RELOAD TBDB_NODEOPMODE_DELAY
TBDB_NODEOPMODE_RELOAD TBDB_NODEOPMODE_RELOADMOTE
TBDB_NODEOPMODE_DELAY
TBDB_NODEOPMODE_BOOTWHAT
TBDB_NODEOPMODE_ANY
TBDB_NODEOPMODE_UNKNOWN
......@@ -130,7 +131,7 @@ use vars qw(@ISA @EXPORT);
TBDB_EXPT_WORKDIR
TBSetNodeEventState TBGetNodeEventState
TBSetNodeAllocState TBGetNodeAllocState
TBSetNodeOpMode TBGetNodeOpMode
TBSetNodeOpMode TBGetNodeOpMode TBSetNodeNextOpMode
TB_OSID_MBKERNEL TB_OSID_PXEBOOT TB_OSID_FRISBEE
TB_OSID_FREEBSD_MFS TB_OSID_FRISBEE_MFS
TBBootWhat TBNodeStateTimeout
......@@ -493,6 +494,7 @@ sub TBDB_NODEOPMODE_RELOADING { "RELOADING"; }
sub TBDB_NODEOPMODE_NORMALv1 { "NORMALv1"; }
sub TBDB_NODEOPMODE_MINIMAL { "MINIMAL"; }
sub TBDB_NODEOPMODE_RELOAD { "RELOAD"; }
sub TBDB_NODEOPMODE_RELOADMOTE { "RELOAD-MOTE"; }
sub TBDB_NODEOPMODE_DELAY { "DELAY"; }
sub TBDB_NODEOPMODE_BOOTWHAT { "_BOOTWHAT_"; } # A redirection opmode
sub TBDB_NODEOPMODE_UNKNOWN { "UNKNOWN"; }
......@@ -2432,7 +2434,8 @@ sub TBNodeStateTimeout($)
# Returns 1 if okay.
# Returns 0 if failed.
#
# DEPRECATED - stated handles these transitions now
# DEPRECATED - stated handles these transitions now. See TBSetNodeNextOpMode
# below.
#
sub TBSetNodeOpMode($$)
{
......@@ -2454,6 +2457,25 @@ sub TBSetNodeOpMode($$)
}
}
#
# Set the next operational mode for a node.
#
# usage: TBSetNodeNextOpMode(char *node, char *mode)
# Returns 1 if okay.
# Returns 0 if failed.
#
sub TBSetNodeNextOpMode($$)
{
my ($node, $mode) = @_;
#
# Just set it in the DB. The next time the node changes state, stated will
# make the transition happen.
#
return DBQueryFatal("update nodes set next_op_mode='$mode' " .
"where node_id='$node'");
}
#
# Get operational mode for a node.
#
......
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