Commit 76c0fa5e authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add check for local nodes in hwdown to nightly audit report. Makes it

easier to nfree them if they are all on one line. Listed in order by
date they entered hwdown.
parent ed1cc694
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# All rights reserved.
#
use English;
......@@ -116,6 +116,34 @@ if ($query_result->numrows) {
}
}
#
# Look for real nodes in hwdown.
#
$DPID = NODEDEAD_PID();
$DEID = NODEDEAD_EID();
if (! ($query_result =
DBQueryWarn("select r.node_id,rsrv_time from reserved as r ".
"left join nodes as n on n.node_id=r.node_id ".
"left join node_types as nt on nt.type=n.type ".
"where r.pid='$DPID' and r.eid='$DEID' and ".
" nt.isremotenode=0 ".
"order by rsrv_time desc"))) {
fatal("Error accessing the database.");
}
if ($query_result->numrows) {
print "\n";
print "----------------------------------------------------------------\n";
print "\n";
print "Nodes stuck in emulab-ops/hwdown:\n";
while (my ($node_id) = $query_result->fetchrow()) {
print "$node_id ";
}
print "\n";
}
#
# Send email if anything was reported.
#
......
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