user data mimetypes in mime-multipart are not always honored

Bug #600799 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: cloud-init

Launching an instance with a mime-multipart archive and properly assigned mime-multipart header for a cloud-boothook will result in the boothook being read as user-script.

For example:
$ cat my-boothook.txt
#!/bin/sh
echo "Hello World!"
echo "This will run as soon as possible in the boot sequence"

$ write-mime-multipart --output=mime.txt my-boothook.txt:text/cloud-boothook

$ grep "Content-Type" mime.txt
Content-Type: multipart/mixed; boundary="===============2045222562037083372=="
Content-Type: text/cloud-boothook; charset="us-ascii"

$ euca-run-instances --key mykey ami-a07d95c9 --user-data-file mime.txt

Because the payload of the mime part begins with '#!' it will be interpreted as a user-data script even though the mimetype was set.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: cloud-init 0.5.12-0ubuntu2
ProcVersionSignature: User Name 2.6.32-305.9-ec2 2.6.32.11+drm33.2
Uname: Linux 2.6.32-305-ec2 i686
Architecture: i386
Date: Thu Jul 1 20:26:11 2010
Ec2AMI: ami-a07d95c9
Ec2AMIManifest: ubuntu-images-milestone-us/ubuntu-maverick-alpha2-i386-server-20100630.1.manifest.xml
Ec2AvailabilityZone: us-east-1c
Ec2InstanceType: m1.small
Ec2Kernel: aki-135fb67a
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cloud-init

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.5.12-0ubuntu3

---------------
cloud-init (0.5.12-0ubuntu3) maverick; urgency=low

  * fix cloud-boothook input type (LP: #600799)
  * sync with upstream.
 -- Scott Moser <email address hidden> Thu, 01 Jul 2010 21:19:13 -0400

Changed in cloud-init (Ubuntu):
status: New → Fix Released
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.