Do not set the mime-type for userdata
We set the mime-type to 'x-shellscript' for all
single userdata when user_data_format='SOFTWARE_CONFIG',
it's incorrect, for example, if user create a server
with a cloud-config userdata, we will set the mime-type to
'x-shellscript', then cloud-init will consume the userdata
as a shellscript and fail to execute.
This change will improve this by not setting the mime-type
and letting cloud-init figure it out from the first line
in the file.
Closes-Bug: #1643739
Change-Id: If026884a95c58bb81a0f04ab415909011b1a5414
diff --git a/scenario/templates/test_server_signal.yaml b/scenario/templates/test_server_signal.yaml
index dfb1155..4466a5e 100644
--- a/scenario/templates/test_server_signal.yaml
+++ b/scenario/templates/test_server_signal.yaml
@@ -23,6 +23,9 @@
dns_servers:
type: comma_delimited_list
default: ["8.8.8.8", "8.8.4.4"]
+ user_data_format:
+ type: string
+ default: RAW
resources:
sg:
type: OS::Neutron::SecurityGroup
@@ -76,7 +79,7 @@
- subnet: {get_resource: subnet}
security_groups:
- {get_resource: sg}
- user_data_format: RAW
+ user_data_format: {get_param: user_data_format}
user_data:
str_replace:
template: |