summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2007-03-22 23:54:12 +0000
committerNarayan Desai <desai@mcs.anl.gov>2007-03-22 23:54:12 +0000
commit41ba7f4412ca9f6d8ba9e180e0278b071d3b6c75 (patch)
tree1b47329175316595c894242c20e47a64100c68c4 /src
parente4124901ade42cf6c481f44943909637020a79a4 (diff)
downloadbcfg2-41ba7f4412ca9f6d8ba9e180e0278b071d3b6c75.tar.gz
bcfg2-41ba7f4412ca9f6d8ba9e180e0278b071d3b6c75.tar.bz2
bcfg2-41ba7f4412ca9f6d8ba9e180e0278b071d3b6c75.zip
Harden probe data uploads and error handling (Resolves Ticket #416)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2990 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugins/Metadata.py4
-rwxr-xr-xsrc/sbin/bcfg2-server2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Metadata.py b/src/lib/Server/Plugins/Metadata.py
index f74d8956a..b2891228d 100644
--- a/src/lib/Server/Plugins/Metadata.py
+++ b/src/lib/Server/Plugins/Metadata.py
@@ -308,6 +308,10 @@ class Metadata(Bcfg2.Server.Plugin.Plugin):
'''Receive probe results pertaining to client'''
if not self.cgroups.has_key(client.hostname):
self.cgroups[client.hostname] = []
+ if data.text == None:
+ self.logger.error("Got null response to probe %s from %s" % \
+ (data.get('name'), client.hostname))
+ return
dlines = data.text.split('\n')
for line in dlines[:]:
if line.split(':')[0] == 'group':
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server
index cd53ab1be..adfd47942 100755
--- a/src/sbin/bcfg2-server
+++ b/src/sbin/bcfg2-server
@@ -164,7 +164,7 @@ class Bcfg2Serv(Bcfg2.Server.Component.Component):
try:
self.Core.plugins[data.get('source')].ReceiveData(meta, data)
except:
- self.logger.error("Failed to process probe data from client %s" % (address), exc_info=1)
+ self.logger.error("Failed to process probe data from client %s" % (address[0]), exc_info=1)
else:
self.logger.warning("Failed to locate plugin %s" % (data.get('source')))
return True