Commit c459aab6 authored by Robert P Ricci's avatar Robert P Ricci

Deal with (some) invalid transitions by forcing nodes into a new state

Right now, hackily hard coded for a particular op_mode and
state for secure disk loading. Really should be controlled in a more
general way from the database.
parent fdf3774b
......@@ -625,6 +625,14 @@ sub stateTransition($$) {
!$valid{$mode}{$oldstate}{$newstate}) {
notify("Invalid transition for node $node from $mode/$oldstate " .
"to $newstate\n");
# XXX: Bad hack for TPM booting paper: this ought to be in the
# database, not harcoded here for a specific op_mode
# Let specifc op_modes drive nodes into particular states on invalid
# transitions
if ($mode eq TBDB_NODEOPMODE_SECURELOAD) {
$newstate = TBDB_NODESTATE_SECVIOLATION;
notify("Moving $node to $newstate because it's in $mode\n");
}
}
my $now = time();
......
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