Skip to content

Commit

Permalink
tolerate more mime types for cc part of user-data.
Browse files Browse the repository at this point in the history
Some cloud environments pass multipart user-data as text/x-shellscript.
(I have observed this from old heat on OTC.)
We need to make sure that it is accepted by cloud-init as user-data.
Note that more intelligent logic might pass it correctly as text/x-yaml
which cloud-init should tolerate as well.

Signed-off-by: Kurt Garloff <scs@garloff.de>
  • Loading branch information
garloff committed Mar 5, 2020
1 parent fa63970 commit b2f4dd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudinit/user_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
CONTENT_TYPE = 'Content-Type'

# Various special content types that cause special actions
TYPE_NEEDED = ["text/plain", "text/x-not-multipart"]
TYPE_NEEDED = ["text/plain", "text/x-not-multipart", "text/x-shellscript", "text/x-yaml"]
INCLUDE_TYPES = ['text/x-include-url', 'text/x-include-once-url']
ARCHIVE_TYPES = ["text/cloud-config-archive"]
UNDEF_TYPE = "text/plain"
Expand Down

0 comments on commit b2f4dd3

Please sign in to comment.