projects
/
osm
/
LCM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug 1053
[osm/LCM.git]
/
osm_lcm
/
vim_sdn.py
diff --git
a/osm_lcm/vim_sdn.py
b/osm_lcm/vim_sdn.py
index
6b1a338
..
6593b46
100644
(file)
--- a/
osm_lcm/vim_sdn.py
+++ b/
osm_lcm/vim_sdn.py
@@
-1042,7
+1042,7
@@
class K8sClusterLcm(LcmBase):
detailed_status=detailed_status_HA)
except DbException as e:
self.logger.error(logging_text + "Cannot update database: {}".format(e))
detailed_status=detailed_status_HA)
except DbException as e:
self.logger.error(logging_text + "Cannot update database: {}".format(e))
- self.lcm_tasks.remove("k8scluster
s
", k8scluster_id, order_id)
+ self.lcm_tasks.remove("k8scluster", k8scluster_id, order_id)
async def delete(self, k8scluster_content, order_id):
async def delete(self, k8scluster_content, order_id):
@@
-1100,7
+1100,10
@@
class K8sClusterLcm(LcmBase):
# raise Exception("K8scluster was not properly removed")
except Exception as e:
# raise Exception("K8scluster was not properly removed")
except Exception as e:
- self.logger.critical(logging_text + "Exit Exception {}".format(e), exc_info=True)
+ if isinstance(e, (LcmException, DbException)):
+ self.logger.error(logging_text + "Exit Exception {}".format(e))
+ else:
+ self.logger.critical(logging_text + "Exit Exception {}".format(e), exc_info=True)
exc = e
finally:
if exc and db_k8scluster:
exc = e
finally:
if exc and db_k8scluster:
@@
-1119,7
+1122,7
@@
class K8sClusterLcm(LcmBase):
detailed_status=detailed_status_HA)
except DbException as e:
self.logger.error(logging_text + "Cannot update database: {}".format(e))
detailed_status=detailed_status_HA)
except DbException as e:
self.logger.error(logging_text + "Cannot update database: {}".format(e))
- self.lcm_tasks.remove("k8scluster
s
", k8scluster_id, order_id)
+ self.lcm_tasks.remove("k8scluster", k8scluster_id, order_id)
class K8sRepoLcm(LcmBase):
class K8sRepoLcm(LcmBase):
@@
-1213,6
+1216,7
@@
class K8sRepoLcm(LcmBase):
db_k8srepo = None
db_k8srepo_update = {}
db_k8srepo = None
db_k8srepo_update = {}
+ exc = None
operationState_HA = ''
detailed_status_HA = ''
try:
operationState_HA = ''
detailed_status_HA = ''
try:
@@
-1238,6
+1242,7
@@
class K8sRepoLcm(LcmBase):
self.lcm_tasks.register_HA('k8srepo', 'delete', op_id,
operationState=operationState_HA,
detailed_status=detailed_status_HA)
self.lcm_tasks.register_HA('k8srepo', 'delete', op_id,
operationState=operationState_HA,
detailed_status=detailed_status_HA)
+ self.db.del_one("k8srepos", {"_id": k8srepo_id})
except DbException as e:
self.logger.error(logging_text + "Cannot update database: {}".format(e))
self.lcm_tasks.remove("k8srepo", k8srepo_id, order_id)
except DbException as e:
self.logger.error(logging_text + "Cannot update database: {}".format(e))
self.lcm_tasks.remove("k8srepo", k8srepo_id, order_id)