[READINESS] Update readiness script 43/126043/1 4.1.0
authorothman touijer <othman.touijer@soprasteria.com>
Thu, 2 Dec 2021 17:17:45 +0000 (18:17 +0100)
committerothman touijer <othman.touijer@soprasteria.com>
Thu, 2 Dec 2021 17:17:45 +0000 (18:17 +0100)
Fix condition to restrain to running pods

Issue-ID: OOM-2878
Signed-off-by: othman touijer <othman.touijer@soprasteria.com>
Change-Id: Ib10697793a72206cde9040661cf34030833f0a67

ready.py

index 4eb73ab..681f3fd 100755 (executable)
--- a/ready.py
+++ b/ready.py
@@ -224,7 +224,7 @@ def service_mesh_job_check(container_name):
             if item.status.container_statuses is None:
                 continue
             for container in item.status.container_statuses:
-                if container.name == container_name:
+                if container.name == container_name and item.status.phase == "Running":
                     name = read_name(item)
                     log.info("Container Details  %s ", container)
                     log.info("Container Status  %s ", container.state.terminated)