diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2008-03-22 18:20:28 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2008-03-22 18:20:28 +0000 |
commit | f3d2582759edff694b51109f4673154038236479 (patch) | |
tree | 6925058a91aa3cbf883558a85fe19f771f06a20e /src/sbin | |
parent | ef5ed530fe317a8c3074c91991436ae74c1b1978 (diff) | |
download | bcfg2-f3d2582759edff694b51109f4673154038236479.tar.gz bcfg2-f3d2582759edff694b51109f4673154038236479.tar.bz2 bcfg2-f3d2582759edff694b51109f4673154038236479.zip |
Clean up stable probe data and dynamic groups properly (Reported by SolJ)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4437 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-x | src/sbin/bcfg2-server | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/sbin/bcfg2-server b/src/sbin/bcfg2-server index cb27e9c89..09d2ce619 100755 --- a/src/sbin/bcfg2-server +++ b/src/sbin/bcfg2-server @@ -128,14 +128,18 @@ class Bcfg2Serv(Bcfg2.Component.Component): self.logger.error("Failed to parse probe data from client %s" % (address[0])) return False - for data in xpdata: - if self.Core.plugins.has_key(data.get('source')): - try: - self.Core.plugins[data.get('source')].ReceiveData(meta, data) - except: - 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'))) + sources = [] + [sources.append(data.get('source')) for data in xpdata + if data.get('source') not in sources] + for source in sources: + if source not in self.Core.plugins: + self.logger.warning("Failed to locate plugin %s" % (source)) + continue + dl = [data for data in xpdata if data.get('source') == source] + try: + self.Core.plugins[source].ReceiveData(meta, dl) + except: + self.logger.error("Failed to process probe data from client %s" % (address[0]), exc_info=1) return True def Bcfg2AssertProfile(self, address, profile): |