Azure / azure-databricks-operator

Kubernetes Operator for Databricks
MIT License
113 stars 48 forks source link

Cluster controller contains logic that can potentially delete a cluster in use #106

Closed storey247 closed 4 years ago

storey247 commented 4 years ago

Looking at the code for creation of Clusters using the databricks operator there seems to be logic that could potentially delete a Cluster: https://github.com/microsoft/azure-databricks-operator/blob/master/controllers/dcluster_controller_databricks.go#L32

This seems incorrect, and indeed the business logic in the main controller seems to deem that this code can never be hit due it !IsSubmitted being the only way this code can get hit.

Suggest removing the code that deletes the cluster as this seems extremely dangerous. The last thing we would want is a cluster to be deleted if it is running a job/jobs etc.

storey247 commented 4 years ago

Closing issue, not sure if still valid