X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FRO.git;a=blobdiff_plain;f=RO%2Fosm_ro%2Fvim_thread.py;h=7174fe67beae74bb63430108ec3ead7eed21f323;hp=e7bf8914691e21bddb8ee83ba02fc16692d34836;hb=187b52ae9922b3b3170080ec78958d7933bde813;hpb=0436bb46f52a213b7f4ba51344d51306208c28ee diff --git a/RO/osm_ro/vim_thread.py b/RO/osm_ro/vim_thread.py index e7bf8914..7174fe67 100644 --- a/RO/osm_ro/vim_thread.py +++ b/RO/osm_ro/vim_thread.py @@ -224,9 +224,9 @@ class vim_thread(threading.Thread): self.wim_account_id, self.plugin_name)) except Exception as e: self.logger.error("Cannot load sdn connector for wim_account={}, plugin={}: {}".format( - self.wim_account_id, self.plugin_name, e)) + self.wim_account_id, self.plugin_name, e), exc_info=True) self.sdnconnector = None - self.error_status = "Error loading sdn connector: {}".format(e) + self.error_status = self._format_vim_error_msg("Error loading sdn connector: {}".format(e)) def _get_db_task(self): """ @@ -723,7 +723,8 @@ class vim_thread(threading.Thread): self.logger.error("Error executing task={}: {}".format(task_id, e), exc_info=True) task["error_msg"] = str(e) task["status"] = "FAILED" - database_update = {"status": "VIM_ERROR", "error_msg": task["error_msg"]} + database_update = {"status": "VIM_ERROR" if task["item"] != "instance_wim_nets" else "WIM_ERROR", + "error_msg": task["error_msg"]} # if task["item"] == 'instance_vms': # database_update["vim_vm_id"] = None # elif task["item"] == 'instance_nets': @@ -810,10 +811,9 @@ class vim_thread(threading.Thread): return False def run(self): - self.logger.debug("Starting") + self.logger.info("Starting") while True: self.get_vim_sdn_connector() - self.logger.debug("Vimconnector loaded") reload_thread = False while True: