Commit 18b8200e authored by Mac Newbold's avatar Mac Newbold

Add new op_mode for IXPs, called ALWAYSUP. It is semi-magical, in that it

allows only SHUTDOWN and ISUP states, and whenever stated sees a SHUTDOWN
for it, there's a trigger that sends an ISUP right afterwards. Thus the
name, ALWAYSUP.
parent 044d1b33
......@@ -111,6 +111,7 @@ my $TB_OSID_MBKERNEL = TB_OSID_MBKERNEL;
# This only gets used here, so it isn't in a lib constant.
my $TBFREENODE = "FREENODE";
my $TBISUP = TBDB_NODESTATE_ISUP;
# Set up some notification throttling
my $mailgap = 15; # in seconds
......@@ -529,6 +530,14 @@ sub stateTransition($$) {
handleCtrlEvent($node,$trig);
next;
};
/^$TBISUP$/ && do {
info("$node: Triggered $TBISUP\n");
EventSendWarn(host => $BOSSNODE ,
objtype => TBDB_TBEVENT_NODESTATE ,
eventtype => TBDB_NODESTATE_ISUP ,
objname => $node);
next;
};
notify("Unknown trigger '$trig' for $node in $mode/$newstate!\n");
}
# Clear any of the node triggers that we ran
......
......@@ -291,6 +291,8 @@ REPLACE INTO state_timeouts VALUES ('USERSTATUS','UNAPPROVED',0,NULL);
--
REPLACE INTO state_transitions VALUES ('ALWAYSUP','ISUP','SHUTDOWN');
REPLACE INTO state_transitions VALUES ('ALWAYSUP','SHUTDOWN','ISUP');
REPLACE INTO state_transitions VALUES ('EXPTSTATUS','ACTIVATING','ACTIVE');
REPLACE INTO state_transitions VALUES ('EXPTSTATUS','ACTIVATING','SWAPPED');
REPLACE INTO state_transitions VALUES ('EXPTSTATUS','ACTIVATING','TESTING');
......@@ -387,6 +389,7 @@ REPLACE INTO state_triggers VALUES ('*','NORMAL','ISUP','RESET');
REPLACE INTO state_triggers VALUES ('*','NORMALv1','ISUP','RESET');
REPLACE INTO state_triggers VALUES ('*','MINIMAL','ISUP','RESET');
REPLACE INTO state_triggers VALUES ('*','RELOAD','RELOADDONE','RESET, RELOADDONE');
REPLACE INTO state_triggers VALUES ('*','ALWAYSUP','SHUTDOWN','ISUP');
--
-- Dumping data for table 'testsuite_preentables'
......@@ -420,6 +423,7 @@ REPLACE INTO testsuite_preentables VALUES ('node_activity','clean');
REPLACE INTO testsuite_preentables VALUES ('portmap','clean');
REPLACE INTO testsuite_preentables VALUES ('webnews','clean');
REPLACE INTO testsuite_preentables VALUES ('vis_nodes','clean');
REPLACE INTO testsuite_preentables VALUES ('vis_experiments','clean');
REPLACE INTO testsuite_preentables VALUES ('group_stats','clean');
REPLACE INTO testsuite_preentables VALUES ('project_stats','clean');
REPLACE INTO testsuite_preentables VALUES ('user_stats','clean');
......
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