Commit de62ec00 authored by David Johnson's avatar David Johnson

Fixup simulation of reloads that are optimized away.

We needed to make sure to transition into the op_mode for the "loaded" OS
and get out of RELOAD-PUSH.
parent 5d54f373
......@@ -691,16 +691,18 @@ sub Reload($$)
# BUT -- we need to simulate it from stated's perspective so that
# the reloads table is cleared.
#
TBSetNodeNextOpMode($node_id,TBDB_NODEOPMODE_RELOADPUSH);
TBSetNodeEventState($node_id,TBDB_NODESTATE_SHUTDOWN);
# give stated time to change op modes
sleep(4);
TBSetNodeEventState($node_id,TBDB_NODESTATE_RELOADSETUP);
sleep(1);
TBSetNodeEventState($node_id,TBDB_NODESTATE_RELOADING);
sleep(1);
TBSetNodeEventState($node_id,TBDB_NODESTATE_RELOADDONE);
sleep(1);
# reset to teh op mode of the loaded image.
$nodeobject->Refresh();
$nodeobject->ResetNextOpMode($self->debug());
TBSetNodeEventState($node_id,TBDB_NODESTATE_SHUTDOWN);
sleep(1);
TBSetNodeEventState($node_id,TBDB_NODESTATE_BOOTING);
sleep(1);
TBSetNodeEventState($node_id,TBDB_NODESTATE_ISUP);
return 0;
......@@ -729,13 +731,19 @@ sub Reload($$)
# BUT -- we need to simulate it from stated's perspective so that
# the reloads table is cleared.
#
TBSetNodeNextOpMode($node_id,TBDB_NODEOPMODE_RELOADPUSH);
TBSetNodeEventState($node_id,TBDB_NODESTATE_SHUTDOWN);
# give stated time to change op modes
sleep(4);
TBSetNodeEventState($node_id,TBDB_NODESTATE_RELOADSETUP);
sleep(1);
TBSetNodeEventState($node_id,TBDB_NODESTATE_RELOADING);
sleep(1);
TBSetNodeEventState($node_id,TBDB_NODESTATE_RELOADDONE);
sleep(1);
# reset to teh op mode of the loaded image.
$nodeobject->Refresh();
$nodeobject->ResetNextOpMode($self->debug());
TBSetNodeEventState($node_id,TBDB_NODESTATE_SHUTDOWN);
TBSetNodeEventState($node_id,TBDB_NODESTATE_BOOTING);
TBSetNodeEventState($node_id,TBDB_NODESTATE_ISUP);
$rc = $self->Reconfigure($nodeobject);
goto done;
......
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