Skip to content
Snippets Groups Projects
Commit ed342265 authored by Erik Reid's avatar Erik Reid
Browse files

re-raise unhandled exceptions after logging

parent 6cf2620f
No related branches found
No related tags found
No related merge requests found
...@@ -567,6 +567,7 @@ def reload_lab_router_config_chorded(self, hostname): ...@@ -567,6 +567,7 @@ def reload_lab_router_config_chorded(self, hostname):
logger.exception(errmsg) logger.exception(errmsg)
update_latch_status(InventoryTask.config, pending=True, failure=True) update_latch_status(InventoryTask.config, pending=True, failure=True)
self.log_error(errmsg) self.log_error(errmsg)
raise e
@app.task(base=InventoryTask, bind=True, name='reload_router_config') @app.task(base=InventoryTask, bind=True, name='reload_router_config')
...@@ -600,11 +601,12 @@ def reload_router_config_chorded(self, hostname): ...@@ -600,11 +601,12 @@ def reload_router_config_chorded(self, hostname):
snmp_refresh_peerings_chorded(hostname, community, logical_systems) snmp_refresh_peerings_chorded(hostname, community, logical_systems)
logger.info(f'updated configuration for {hostname}') logger.info(f'updated configuration for {hostname}')
except: except Exception as e:
errmsg = f'unhandled exception loading {hostname} info' errmsg = f'unhandled exception loading {hostname} info'
logger.exception(errmsg) logger.exception(errmsg)
update_latch_status(InventoryTask.config, pending=True, failure=True) update_latch_status(InventoryTask.config, pending=True, failure=True)
self.log_error(errmsg) self.log_error(errmsg)
raise e
def retrieve_and_persist_netconf_config( def retrieve_and_persist_netconf_config(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment