cancel
Showing results for 
Search instead for 
Did you mean: 

Init script problems | workspace location

luisvasv
New Contributor II

At this moment, I'm working on removing Legacy global and cluster-named init

scripts due, it will be disabled for all workspaces on 01 Sept.

At this moment, I'm facing a strange problem regarding moving init scripts from dbfs to the Workspace location: 

When I start the cluster with init scripts in the poc folder, everything works fine. 

 image.pngBut, when we change to another workspace location, we are receiving this error:

imageInit script failure:BAD_REQUEST: Node type must be TreeFile but the input type is: shell

NOTE: it Is important to mention both: files and folders have exactly the same permissions

I would appreciate it if you could shed some light on the potential reasons for this issue. Is there any specific factor or configuration that might be causing this unexpected behavior? Your insights would be greatly appreciated 

4 REPLIES 4

Anonymous
Not applicable

Hi @luisvasv​ 

Great to meet you, and thanks for your question!

Let's see if your peers in the community have an answer to your question. Thanks.

Prabakar
Esteemed Contributor III
Esteemed Contributor III

How did you upload the init script to the workspace files? Was it using the CLI? 

I suspect this could be a format issue. For example, if you upload the init script using cli, the .sh file will be considered a workspace file rather than a .sh file. For this, you must use the format option to upload the file.

 $curl -u user:pwd -H "Content-Type: application/json" -X POST -d '{"path": "/Users/<userpath>/initscript.sh","format": "AUTO","content": "==abcdefghijklmno=="}' https://adb-xxxxxxx.azuredatabricks.net/api/2.0/workspace/import --header 'Authorization: Bearer YOUR_USER_TOKEN_GENERATED_FROM_UI'

 

I am facing the same issue. I have tried creating the script manually and uploading it via the CLI - the result is the same.
I have tried converting the script ot a .py file to no avail - the same persists.

kranthi2
New Contributor II

I did face this issue. I got support from MS on the resolution. We cannot rename the file directly from the context menu to add prefix ".sh" for shell script. It has to be following the navigation - click the button "Add Files" in the workspace folder where you want to add a shell script or other type of file other than notebook/library. Then add the shell script commands and give it a name prefixed with ".sh". This will resolve the issue.  

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.