dask / dask/dask-kubernetes

TOCTOU Bug while scaling down workers

Open
#855 8 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
324
Forks
157
PR merge metrics
No merged PRs in 30d

Description

The currently implemented logic for deletion can be summarized into:

1) The operator asks the scheduler to retire n of the workers
2) The scheduler retires them (process exits) and returns to the operator names of retired workers
3) Operator deletes worker deployment sequentially

Ref: https://github.com/dask/dask-kubernetes/blob/main/dask_kubernetes/operator/controller/controller.py#L600-L611

However, between 2 and 3 the Kubernetes API may interfere and restart the worker deployment so a new pod will be created and join the cluster for some time before the operator deletes the deployment effectively interpreting the pod mid-run.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.