summaryrefslogtreecommitdiff
path: root/deployment_scripts/puppet/modules/lma_collector/files/collectd/collectd_pacemaker.py
diff options
context:
space:
mode:
Diffstat (limited to 'deployment_scripts/puppet/modules/lma_collector/files/collectd/collectd_pacemaker.py')
-rw-r--r--deployment_scripts/puppet/modules/lma_collector/files/collectd/collectd_pacemaker.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/deployment_scripts/puppet/modules/lma_collector/files/collectd/collectd_pacemaker.py b/deployment_scripts/puppet/modules/lma_collector/files/collectd/collectd_pacemaker.py
index 37f793a..e8cb7b2 100644
--- a/deployment_scripts/puppet/modules/lma_collector/files/collectd/collectd_pacemaker.py
+++ b/deployment_scripts/puppet/modules/lma_collector/files/collectd/collectd_pacemaker.py
@@ -246,7 +246,12 @@ class CrmMonitorPlugin(base.Base):
246 # value because crm_mon doesn't provide the exact number. To estimate 246 # value because crm_mon doesn't provide the exact number. To estimate
247 # the number of operations applied to a resource, the plugin keeps a 247 # the number of operations applied to a resource, the plugin keeps a
248 # copy of call_ids and compares it with the current value. 248 # copy of call_ids and compares it with the current value.
249 for node in root.find('node_history').iter('node'): 249
250 history = root.find('node_history')
251 if history is None:
252 return
253
254 for node in history.iter('node'):
250 hostname = shorten_hostname(node.get('name')) 255 hostname = shorten_hostname(node.get('name'))
251 if hostname not in self.history: 256 if hostname not in self.history:
252 self.history[hostname] = {} 257 self.history[hostname] = {}