Skip to content

Commit

Permalink
Fix bug in wait for statefulset; handle ready replicas is None. (kube…
Browse files Browse the repository at this point in the history
  • Loading branch information
jlewi authored and k8s-ci-robot committed Mar 27, 2019
1 parent a8890f1 commit 14ef0e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/kubeflow/testing/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def wait_for_statefulset(api_client, namespace, name):

while datetime.datetime.now() < end_time:
stateful = apps_client.read_namespaced_stateful_set(name, namespace)
if stateful.status.ready_replicas >= 1:
if stateful.status.ready_replicas and stateful.status.ready_replicas >= 1:
logging.info("Statefulset %s in namespace %s is ready", name, namespace)
return stateful
logging.info("Waiting for Statefulset %s in namespace %s", name, namespace)
Expand Down

0 comments on commit 14ef0e1

Please sign in to comment.