Commit 6fd445e7 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Minor change to n.class clause. Look for class "pc" and "pct". pct is

a temporary class for testing new images.
parent fc985a64
......@@ -45,11 +45,6 @@ use lib "@prefix@/lib";
use libdb;
use libtestbed;
#
# This should not be hardwired in.
#
my $CLASS = "pc"; # XXX: Needs a better approach.
#
# These come from the library.
#
......@@ -62,7 +57,7 @@ my $sched_reload= "$TB/sbin/sched_reload";
my $reboot = "$TB/bin/node_reboot";
my $logfile = "$TB/log/reloadlog";
my $debug = 0;
my $retry_time = 10; # in minutes
my $retry_time = 10; # in minutes
my $warn_time = 30; # in minutes
#
......@@ -177,12 +172,16 @@ while (1) {
# in last_reservation, which is reset anytime a node is reloaded by
# the system).
#
# XXX - This should not be hardwired in.
#
my $CLASSCLAUSE = "(n.class='pc' or n.class='pct')";
$query_result =
DBQueryWarn("select a.node_id,b.pid,b.eid from nodes as a ".
"left join reserved as b on a.node_id=b.node_id ".
"left join last_reservation as l on l.node_id=a.node_id ".
"left join node_types as n on n.type=a.type where ".
"(b.node_id is null and n.class='$CLASS' and l.pid!='') ".
"(b.node_id is null and $CLASSCLAUSE and l.pid!='') ".
"or (b.pid='$RELOADPID' and b.eid='$PENDINGEID') ".
"order by a.node_id");
......
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