Skip to content

Commit

Permalink
Skip newly created containers
Browse files Browse the repository at this point in the history
  • Loading branch information
BitTheByte committed Sep 18, 2023
1 parent 156e9e4 commit e4edded
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dask_kubernetes/operator/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,10 @@ async def daskworkergroup_replica_update(
), "Deployment cannot have more than 1 replica pod"

worker_pod = kube_pods[0]
if worker_pod.status.phase.lower() == "pending":
if (
worker_pod.status.phase not in ["Running", "ContainerCreating"]
and not await worker.ready()
):
await worker.delete()
deleted_workers.append(worker_pod.name)

Expand Down

0 comments on commit e4edded

Please sign in to comment.