Commit 71a142e1 authored by Robert Ricci's avatar Robert Ricci
Browse files

Fix for The Bug of The Decade (or, at least, one of them.)

When we put nodes into the reloadpending experiment, don't put
an entry into last_reserve - to be safe, delete such an entry
if it is there. This prevents the double-reload problem we've
been having, found by Leigh.
parent d269efa7
......@@ -350,10 +350,6 @@ foreach my $n (@freed_nodes) {
# No reloads or reservation changes, so really free the node
# This little sillyness is for disk reloading. Remember the last
# project a node was reserved into. At present, there might already
# be an entry. Eventually, os_setup will look for this and force
# a reload.
# Make sure we don't schedule a reload if the node is coming out of
# the reloading or reloadpending experimenets.
......@@ -379,7 +375,13 @@ foreach my $n (@freed_nodes) {
DBQueryWarn("update reserved set ".
"pid='$reloadpid',eid='$pendingeid' ".
"where node_id='$n'") || $error++;
DBQueryWarn("replace into last_reservation values ('$n', '$pid')");
# Make SURE that we don't have a last_reservation, since that would
# cause the node to get picked up by the reload daemon twice
DBQueryWarn("delete from last_reservation where node_id='$n'") ||
Supports Markdown
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