summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Hagedorn <hagedorn@mcs.anl.gov>2005-07-13 18:43:45 +0000
committerJoey Hagedorn <hagedorn@mcs.anl.gov>2005-07-13 18:43:45 +0000
commit1d084058e9e9aa51d02f1c3af0f491e324db4823 (patch)
tree9f755d1441bc3d146e7b3f52e2ee43d56b29c309
parent5081af7064dc3770f319dff172ba1dc44822a917 (diff)
downloadbcfg2-1d084058e9e9aa51d02f1c3af0f491e324db4823.tar.gz
bcfg2-1d084058e9e9aa51d02f1c3af0f491e324db4823.tar.bz2
bcfg2-1d084058e9e9aa51d02f1c3af0f491e324db4823.zip
fixed bug where machines provided in lessrestrictive to more restrictive lists would provide unexpected results
fixed bug when "good" attribute is ommitted from config XML (Logical change 1.256) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1054 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/sbin/StatReports.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sbin/StatReports.py b/src/sbin/StatReports.py
index 14f2329ec..2b36b54ee 100644
--- a/src/sbin/StatReports.py
+++ b/src/sbin/StatReports.py
@@ -56,14 +56,16 @@ def generatereport(report, delivery, deliverytype, statdata):
except gaierror:
continue
- if fqdncache[nodename] == "":
- statdata.remove(node);
- del fqdncache[nodename]
+ #if fqdncache[nodename] == "":
+ #statdata.remove(node);
+ #del fqdncache[nodename]
for machine in report.findall('Machine'):
for node in statdata.findall('Node'):
+ if fqdncache[child.get("name")] == "":
+ continue
if node.attrib['name'] == machine.attrib['name']:
if deliverytype == 'nodes-digest':
mheader = "Machine: %s\n" % machine.attrib['name']
@@ -104,7 +106,7 @@ def generatereport(report, delivery, deliverytype, statdata):
reportsections.append(("Bcfg Nightly Errors", \
"DIRTY:\n%s\nCLEAN:\n%s\nDETAILS:\n%s" % (dirty, clean, msg)))
else:
- if report.attrib['good'] == 'Y':
+ if reportgood == 'Y':
reportsections.append(("Bcfg Nightly All Machines Good", "All Machines Nomnial"))
@@ -116,6 +118,8 @@ def generatereport(report, delivery, deliverytype, statdata):
pattern = re.compile(regex)
childstates = []
for child in children:
+ if fqdncache[child.get("name")] == "":
+ continue
if pattern.match(child.get("name")):
child.states = []
for state in child.findall("Statistics"):