cloudbase / cloudbase-init

Cross-platform instance initialization
http://openstack.org
Apache License 2.0
421 stars 149 forks source link

Userdata part text/x-shellscript fails to be executed when no file_name is provided #46

Open ader1990 opened 4 years ago

ader1990 commented 4 years ago

Userdata MIME part type text/x-shellscript can have an optional file_name. Currently, if the file_name does not exist, cloudbase-init throws an error and does not execute the script.

The fix should be easy, in case no or empy filename is provided, a random file name should be used for temporary usage.

Initial bug report: https://ask.cloudbase.it/question/3228/failure-running-multipart-shellscript-with-terraform-and-openstack/