Commit 4d735d6e authored by Mike Hibler's avatar Mike Hibler
Browse files

On doswapin(RETRY) force all existing nodes to reboot.

Since we rerun assign, it can shuffle around the interfaces on a node
even if the node is "fixed".
parent e5e0a604
...@@ -966,9 +966,13 @@ sub doSwapin($) { ...@@ -966,9 +966,13 @@ sub doSwapin($) {
# If user specified -reboot to update, # If user specified -reboot to update,
# and we are successfully performing the update, # and we are successfully performing the update,
# then mark all nodes in experiment so os_setup will reboot them. # then mark all nodes in experiment so os_setup will reboot them.
# We must reboot nodes on a RETRY as well, since assign has been rerun
# and may have remapped interfaces on the nodes.
# #
if (($type == UPDATE) && if ($type == RETRY ||
($updateReboot || $updateReconfig)) { ($type == UPDATE && ($updateReboot || $updateReconfig))) {
my $needreboot = ($type == RETRY || $updateReboot);
print STDERR "Marking nodes for reboot/reconfig.\n"; print STDERR "Marking nodes for reboot/reconfig.\n";
$db_result = $db_result =
DBQueryFatal("select r.node_id,n.allocstate from reserved as r ". DBQueryFatal("select r.node_id,n.allocstate from reserved as r ".
...@@ -984,7 +988,7 @@ sub doSwapin($) { ...@@ -984,7 +988,7 @@ sub doSwapin($) {
# #
if ($allocstate ne TBDB_ALLOCSTATE_RES_INIT_CLEAN()) { if ($allocstate ne TBDB_ALLOCSTATE_RES_INIT_CLEAN()) {
TBSetNodeAllocState($node, TBSetNodeAllocState($node,
($updateReboot ? ($needreboot ?
TBDB_ALLOCSTATE_RES_INIT_DIRTY() : TBDB_ALLOCSTATE_RES_INIT_DIRTY() :
TBDB_ALLOCSTATE_RES_RECONFIG())); TBDB_ALLOCSTATE_RES_RECONFIG()));
} }
......
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