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

add failure message and more logging in case of unhandled router load errors

parent e4066474
No related branches found
No related tags found
No related merge requests found
......@@ -563,8 +563,10 @@ def reload_lab_router_config_chorded(self, hostname):
self.log_info(f'updated configuration for lab {hostname}')
except Exception as e:
logger.error(e)
errmsg = f'unhandled exception loading {hostname} info'
logger.exception(errmsg)
update_latch_status(InventoryTask.config, pending=True, failure=True)
self.log_error(errmsg)
@app.task(base=InventoryTask, bind=True, name='reload_router_config')
......@@ -598,9 +600,11 @@ def reload_router_config_chorded(self, hostname):
snmp_refresh_peerings_chorded(hostname, community, logical_systems)
logger.info(f'updated configuration for {hostname}')
except Exception as e:
logger.error(e)
except:
errmsg = f'unhandled exception loading {hostname} info'
logger.exception(errmsg)
update_latch_status(InventoryTask.config, pending=True, failure=True)
self.log_error(errmsg)
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