dask / dask-kubernetes

Native Kubernetes integration for Dask
https://kubernetes.dask.org
BSD 3-Clause "New" or "Revised" License
312 stars 148 forks source link

Kopf adoptions are not working for additional worker groups #470

Closed Matt711 closed 2 years ago

Matt711 commented 2 years ago

Additional worker groups are not deleted when the cluster custom resource is deleted. --> Kopf adoptions are not working

Minimal Complete Verifiable Example:

from dask_kubernetes.experimental import KubeCluster

cluster = KubeCluster(name='foo')

cluster.add_worker_group(name="highmem", n_workers=2, resources={"requests": {"memory": "2Gi"}, "limits": {"memory": "64Gi"}})

cluster.close()

In this example the worker group highmem should be deleted along with the cluster, but it isn't.

Environment:

jacobtomlinson commented 2 years ago

I'm not able to reproduce this locally.

Steps I took:

Everything gets deleted correctly for me.

Matt711 commented 2 years ago

@jacobtomlinson I don't know it would make a difference but I was running the Operator from the kube-system namespace (following the documentation). But I'll run through the steps again...

jacobtomlinson commented 2 years ago

Ah right, that makes more sense. It sounds like you're using the 2022.4.1 version of the operator installed via the manifest along with the latest version of dask_kubernetes.experimental.KubeCluster from main. Those likely won't be compatible.

The add_worker_group functionality is currently unreleased so you would need to run the dev version of the operator to use it.

Matt711 commented 2 years ago

Right (palms face) of course