cloud-init local data source broken

Bug #942695 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

The following should result in valid local data source:
sudo sh -c 'd=/var/lib/cloud/seed/nocloud;
   mkdir -p $d;
   printf "%s\n%s\n" "#!/bin/sh" "echo hi world" > $d/user-data;
   printf "%s\n%s\n" "instance-id: i-foo" "local-hostname: foo-hostname" > $d/meta-data;'

but currently in cloud-init that is broken (due to adding the network interfaces code).

Also broken, but should work:

sudo DEBUG_PROC_CMDLINE="BOOT_IMAGE=/boot/vmlinuz-3.2.0-17-virtual root=LABEL=cloudimg-rootfs ro console=ttyS0 ds=nocloud;h=foo;i=i-abc" cloud-init start-local

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: cloud-init 0.6.3~bzr527-0ubuntu1
ProcVersionSignature: User Name 3.2.0-17.27-virtual 3.2.6
Uname: Linux 3.2.0-17-virtual x86_64
ApportVersion: 1.93-0ubuntu2
Architecture: amd64
Date: Tue Feb 28 15:38:42 2012
Ec2AMI: ami-00000000
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

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

A quick hack fix that worked around is at :
 --- /usr/lib/python2.7/dist-packages/cloudinit/DataSourceNoCloud.py.dist 2012-02-17 22:03:10.000000000 +0000
+++ /usr/lib/python2.7/dist-packages/cloudinit/DataSourceNoCloud.py 2012-02-28 15:36:30.365991585 +0000
@@ -44,7 +44,7 @@

     def get_data(self):
         defaults = {
- "instance-id": "nocloud", "dsmode": "net"
+ "instance-id": "nocloud", "dsmode": self.dsmode
         }

         found = []

but i believe that that that actually breaks some of the behavior i was hoping for with the network interfaces code (ie, to avoid trying to bring up networking both in local and net).

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

This bug was fixed in the package cloud-init - 0.6.3~bzr530-0ubuntu1

---------------
cloud-init (0.6.3~bzr530-0ubuntu1) precise; urgency=low

  * New upstream snapshot.
    - fix DataSourceNoCloud seeded from local or cmdline (LP: #942695)
    - change 'islxc' to 'iscontainer' and use 'running-in-container' utility
      from upstart rather than 'lxc-is-container' (LP: #941955)
    - Do not fail on bad part handlers, instead catch error and log
 -- Scott Moser <email address hidden> Tue, 28 Feb 2012 19:15:19 -0500

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.