зеркало из https://github.com/microsoft/pai.git
Openpai-Generator issue fix. (#4487)
This commit is contained in:
Родитель
4acfccf89b
Коммит
d57753a8ed
|
@ -106,16 +106,20 @@ def pod_is_ready_or_not(label_key, label_value, service_name):
|
|||
for pod in pod_list.items:
|
||||
if pod.status.container_statuses is None:
|
||||
unready = unready + 1
|
||||
continue
|
||||
flag = True
|
||||
for container in pod.status.container_statuses:
|
||||
if container.ready != True:
|
||||
unready = unready + 1
|
||||
else:
|
||||
ready = ready + 1
|
||||
flag = False
|
||||
break
|
||||
if flag:
|
||||
ready = ready + 1
|
||||
|
||||
if unready != 0:
|
||||
logger.info("{0} is not ready.".format(service_name))
|
||||
logger.info("Total: {0}".format(ready + unready))
|
||||
logger.info("Ready: {1}",format(ready))
|
||||
logger.info("Ready: {0}".format(ready))
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
Загрузка…
Ссылка в новой задаче