From 4706e583e18c0c3eaf5480998248c298b78e23da Mon Sep 17 00:00:00 2001 From: Dominik Fleischmann Date: Thu, 12 Dec 2019 17:26:49 +0100 Subject: [PATCH] Call k8sclusterjuju.install with ensure future This fixes the bug 971, due to the function not being called like this the type of the task variable wasn't correct for the rest of execution. https://osm.etsi.org/bugzilla/show_bug.cgi?id=971 Change-Id: I47266a04332579cb7ee54e5d45189164ccca7b40 Signed-off-by: Dominik Fleischmann --- osm_lcm/ns.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py index de1c6a0..87eaecd 100644 --- a/osm_lcm/ns.py +++ b/osm_lcm/ns.py @@ -1673,9 +1673,11 @@ class NsLcm(LcmBase): params=desc_params, db_dict=db_dict, timeout=3600) ) else: - task = self.k8sclusterjuju.install(cluster_uuid=cluster_uuid, kdu_model=kdumodel, - atomic=True, params=desc_params, - db_dict=db_dict, timeout=600) + task = asyncio.ensure_future( + self.k8sclusterjuju.install(cluster_uuid=cluster_uuid, kdu_model=kdumodel, + atomic=True, params=desc_params, + db_dict=db_dict, timeout=600) + ) pending_tasks[task] = "_admin.deployed.K8s.{}.".format(index) index += 1 -- 2.25.1