aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2020-04-08 09:11:59 +0800
committeryangyan <yangyanyj@chinamobile.com>2020-04-08 09:12:14 +0800
commit94de667f1a44371b9b77cabea74a812ea7732c0e (patch)
treea61288f4ade0f7e840c0e170cf9c6e4b488f6657
parent023ce1b538474ee9502d4fa01b5807326cb8d193 (diff)
Update ns_terminate code about cancel wait delete vnfs multithreading
When we execute the termination process, this multithread will cause thread blocking, resulting in ns to 70% of the terminated programs being stuck Change-Id: Idec6607938570a0712c004afff49af47fb0406e3 Issue-ID: VFC-1654 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rw-r--r--lcm/ns/biz/ns_terminate.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/lcm/ns/biz/ns_terminate.py b/lcm/ns/biz/ns_terminate.py
index 32845ddc..a4ae4df5 100644
--- a/lcm/ns/biz/ns_terminate.py
+++ b/lcm/ns/biz/ns_terminate.py
@@ -145,11 +145,7 @@ class TerminateNsService(threading.Thread):
job_msg = "Delete vnfinst:[%s] %s." % (vnfinst.nfinstid, delete_result)
JobUtil.add_job_status(self.job_id, cur_progress, job_msg)
vnf_jobs.append((vnfinst.nfinstid, vnf_job_id))
-
- thread = threading.Thread(
- target=self.wait_delete_vnfs,
- args=(vnf_jobs, cur_progress, step_progress,))
- thread.start()
+ self.wait_delete_vnfs(vnf_jobs, cur_progress, step_progress)
def wait_delete_vnfs(self, vnf_jobs, cur_progress, step_progress):
for vnfinstid, vnfjobid in vnf_jobs: