CirrOS doesn't support MIME multipart userdata

Bug #1232239 reported by Dmitry Teselkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
CirrOS
Confirmed
Low
Unassigned

Bug Description

Script /etc/init.d/cloud-userdata could only execute 'simple' userdata sections which contain only one script without any extra information.

However, under some circumstances userdata section could be more complex, and contain several sections, in MIME multipart format.

To support this I've created a few functions which could parse such userdata sections and execute their parts.

These function are available here - https://raw.github.com/dmitry-teselkin/cirros/master/config.local.sh

/etc/init.d/cloud-userdata also should be modified - https://raw.github.com/dmitry-teselkin/cirros/master/cloud-userdata

Scott Moser (smoser)
Changed in cirros:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Scott Moser (smoser) wrote :

I did a proof of concept that does the file splitting bit in pure awk, this avoids a bunch of forks.

It works on my little 'combined-userdata.txt' that was created from https://help.ubuntu.com/community/CloudInit (write-mime-multipart).

The other thing I'd like for it to do is to support cloud-config-archive formatted as json (ie, not supporting yaml, but just json).

This shouldnt be that hard since we already have the json parser in json2fstree.

attaching the split-multipart.awk here so I don't lose it.

Revision history for this message
Dmitry Teselkin (teselkin-d) wrote :

I've made a patch for 0.3.1 based on your script. It works for me. Could you please check it too?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.