From 2a7ae1a053d25d89639c1e522e67567dc86f80a5 Mon Sep 17 00:00:00 2001 From: GowthamShanmugasundaram Date: Fri, 25 May 2018 09:49:58 +0530 Subject: [PATCH] unmanaged task always fails after import failure tendrl-bug-id: Tendrl/commons#977 bugzilla: 1570048 Signed-off-by: GowthamShanmugasundaram --- .../objects/cluster/atoms/import_cluster/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tendrl/commons/objects/cluster/atoms/import_cluster/__init__.py b/tendrl/commons/objects/cluster/atoms/import_cluster/__init__.py index 17130b30..ae12f166 100644 --- a/tendrl/commons/objects/cluster/atoms/import_cluster/__init__.py +++ b/tendrl/commons/objects/cluster/atoms/import_cluster/__init__.py @@ -186,15 +186,15 @@ def run(self): ) return False time.sleep(10) - finished = True + completed = True for child_job_id in parent_job.children: child_job = NS.tendrl.objects.Job( job_id=child_job_id ).load() - if child_job.status != "finished": - finished = False + if child_job.status not in ["finished", "failed"]: + completed = False break - if finished: + if completed: break else: loop_count += 1