StackScript won't execute
Hi everyone, first of all, thank you for you help and time on this matter. I have going through all the posts related to StackScript but I couldn't find one that matches my case.
I have defined a StackScript, which I tested manually and it works perfectly. I have also used the "Deploy new linode" button available when viewing the StackScript and it also works perfectly.
However, I'm noticing that when I deploy the linodes using the python API (v4) the StackScript is not being executed. This used to work until yesterday, but today everything start failing and the StackScript won't simple execute. I have made no changes to my StackScript or python code.
Below you can see how I'm invoking it:
from linode_api4 import LinodeClient, StackScript
stackscript = StackScript(client, 1176976)
client = LinodeClient(api_key)
linode = client.linode.instance_create(
instance_type,
region,
image=image,
label=label,
stackscript=stackscript,
stackscript_data={
"test": "test"
},
root_pass=root_pass
)
The Linode gets provisioned and it boots. But the StackScript never gets executed.
Any ideas?
Thanks in advance, I would really appreciate your help on this!
Have a nice day!
1 Reply
I understand that you're facing difficulties with executing StackScripts using the Linode Python API. Based on the information you provided, it appears that you are correctly specifying the StackScript when creating the Linode instance.
While although the timing doesn't exactly line up here, there was API maintenance conducted shortly before your issue began. To help me rule this out, by chance is your script still failing to execute upon instance deployment?
If the issue persists, it would be helpful to review any available logs or output from the provisioning process. To easily gather this information, you may consider adding the following line to your StackScript which will store the standard output and standard error into a StackScript log file:
#!/bin/bash
exec > /var/log/stackscript.log 2>&1
# Rest of your script...