X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_mon%2Fcollector%2Fservice.py;h=132e9da1dbc1726ab320e41ae8c73c395799b6da;hb=881f2ce1a5876782cbd939764a5bffcad28908f8;hp=aa270833881f9a50e6bd357c812a59d4fedb3771;hpb=8e4179facf22c8096992f0a83caeec9f2f4996c7;p=osm%2FMON.git diff --git a/osm_mon/collector/service.py b/osm_mon/collector/service.py index aa27083..132e9da 100644 --- a/osm_mon/collector/service.py +++ b/osm_mon/collector/service.py @@ -27,6 +27,7 @@ import logging from typing import List import concurrent.futures import time +import keystoneauth1.exceptions from osm_mon.collector.infra_collectors.onos import OnosInfraCollector from osm_mon.collector.infra_collectors.openstack import OpenstackInfraCollector @@ -202,13 +203,17 @@ class CollectorService: for future in concurrent.futures.as_completed( futures, self.conf.get("collector", "process_execution_timeout") ): - result = future.result( - timeout=int( - self.conf.get("collector", "process_execution_timeout") + try: + result = future.result( + timeout=int( + self.conf.get("collector", "process_execution_timeout") + ) ) - ) - metrics.extend(result) - log.debug("result = %s" % (result)) + metrics.extend(result) + log.debug("result = %s" % (result)) + except keystoneauth1.exceptions.connection.ConnectionError as e: + log.info("Keystone connection error during metric collection") + log.debug("Keystone connection error exception %s" % (e)) except concurrent.futures.TimeoutError as e: # Some processes have not completed due to timeout error log.info(