cli icon indicating copy to clipboard operation
cli copied to clipboard

`databricks clusters start` fails if cluster is already running, despite documentation to the contrary

Open NodeJSmith opened this issue 1 year ago • 4 comments

Describe the issue

When running databricks clusters start for a cluster that is currently running the command fails with the message that the cluster is running.

Steps to reproduce the behavior

Please list the steps required to reproduce the issue, for example:

  1. Start a cluster
  2. Run databricks clusters start

Expected Behavior

The help documentation for databricks clusters start states "If the cluster is not currently in a TERMINATED state, nothing will happen." I take that to mean that if you run this when a cluster is running then the command exits without error and does not perform any actions.

Actual Behavior

An error is raised:

Error: Cluster 0124-165313-5fpp2uv9 is in unexpected state Running.

OS and CLI version

Databricks CLI version: Databricks CLI v0.217.1 OS: Ubuntu 22.04 LTS

Is this a regression?

I don't believe this has ever worked

Debug Logs

From local machine, so version is 0.214.1. v0.217.1 is from release pipeline.

at 11:53:31 ❯ databricks clusters start $DATABRICKS_CLUSTER_ID --debug
11:57:25 INFO start pid=3076249 version=0.214.1 args="databricks, clusters, start, 0821-223236-5fpp2uv9, --debug" 11:57:25 DEBUG Loading bundle configuration from: /home/jessica/source/dbx-library/databricks.yml pid=3076249 11:57:25 DEBUG Apply pid=3076249 mutator=seq 11:57:25 DEBUG Apply pid=3076249 mutator=seq mutator=scripts.preinit 11:57:25 DEBUG No script defined for preinit, skipping pid=3076249 mutator=seq mutator=scripts.preinit 11:57:25 DEBUG Apply pid=3076249 mutator=seq mutator=ProcessRootIncludes 11:57:25 DEBUG Apply pid=3076249 mutator=seq mutator=ProcessRootIncludes mutator=seq 11:57:25 DEBUG Apply pid=3076249 mutator=seq mutator=EnvironmentsToTargets 11:57:25 DEBUG Apply pid=3076249 mutator=seq mutator=InitializeVariables 11:57:25 DEBUG Apply pid=3076249 mutator=seq mutator=DefineDefaultTarget(default) 11:57:25 DEBUG Apply pid=3076249 mutator=seq mutator=LoadGitDetails 11:57:25 DEBUG Apply pid=3076249 mutator=SelectDefaultTarget 11:57:25 DEBUG Apply pid=3076249 mutator=SelectDefaultTarget mutator=SelectTarget(dev) 11:57:25 DEBUG Loading dev profile from /home/jessica/.databrickscfg pid=3076249 sdk=true 11:57:25 INFO Ignoring pat auth, because metadata-service is preferred pid=3076249 sdk=true 11:57:25 INFO Ignoring basic auth, because metadata-service is preferred pid=3076249 sdk=true 11:57:25 INFO Ignoring oauth-m2m auth, because metadata-service is preferred pid=3076249 sdk=true 11:57:25 INFO Ignoring databricks-cli auth, because metadata-service is preferred pid=3076249 sdk=true 11:57:25 DEBUG GET /2d135cb4-bae5-48f0-b78d-568716ee5031 < HTTP/1.1 200 OK < { < "access_token": "REDACTED", < "expires_on": 1713373060, < "token_type": "Bearer" < } pid=3076249 sdk=true 11:57:25 DEBUG GET /2d135cb4-bae5-48f0-b78d-568716agew31 < HTTP/1.1 200 OK < { < "access_token": "REDACTED", < "expires_on": 1713373060, < "token_type": "Bearer" < } pid=3076249 sdk=true 11:57:25 DEBUG Refreshed access token from local metadata service, which expires on 2024-04-17T11:57:40-05:00 pid=3076249 sdk=true 11:57:25 DEBUG non-retriable error: Cluster 0821-223236-5fpp2uv9 is in unexpected state Running. pid=3076249 sdk=true 11:57:25 DEBUG POST /api/2.0/clusters/start

{ "cluster_id": "0821-223236-5fpp2uv9" } < HTTP/2.0 400 Bad Request < { < "details": [ < { < "@type": "type.googleapis.com/google.rpc.ErrorInfo", < "domain": "", < "reason": "CM_API_ERROR_SOURCE_CALLER_ERROR" < } < ], < "error_code": "INVALID_STATE", < "message": "Cluster 0821-223236-5fpp2uv9 is in unexpected state Running." < } pid=3076249 sdk=true Error: Cluster 0821-223236-5fpp2uv9 is in unexpected state Running. 11:57:25 ERROR failed execution pid=3076249 exit_code=1 error="Cluster 0821-223236-5fpp2uv9 is in unexpected state Running."

NodeJSmith avatar Apr 17 '24 16:04 NodeJSmith

Identical issue is present with databricks clusters edit. If cluster is in terminated state it should just amend the configuration and move on but it reports it as an error. (It updates the cluster tho)

k-kur-arqiva avatar May 23 '24 12:05 k-kur-arqiva

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

github-actions[bot] avatar Feb 10 '25 00:02 github-actions[bot]

Issue should remain open

NodeJSmith avatar Feb 10 '25 01:02 NodeJSmith

I forwarded this issue internally to figure out if this is an API or documentation issue.

pietern avatar Feb 11 '25 10:02 pietern