cloud-init crashes on blank lines in include files

Bug #923043 reported by Ken Rimey on 2012-01-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Scott Moser

Bug Description

The documentation says the format is one URL per line, but comments are also allowed.
If comments are allowed, blank lines should be allowed too.

A traceback follows. This is with cloud-init 0.6.1 on EC2 in ubuntu/images/ebs/ubuntu-oneiric-11.10-amd64-server-20120108 (ami-6fa27506).

cloud-init start running: Sat, 28 Jan 2012 12:42:04 +0000. up 11.87 seconds

Traceback (most recent call last):

  File "/usr/bin/cloud-init", line 192, in <module>


  File "/usr/bin/cloud-init", line 138, in main


  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 245, in update_cache


  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 251, in store_userdata

    self.datasource.get_userdata(), 0600)

  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 52, in get_userdata

    self.userdata = ud.preprocess_userdata(self.userdata_raw)

  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 190, in preprocess_userdata


  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 142, in process_includes


  File "/usr/lib/python2.7/dist-packages/cloudinit/", line 78, in do_include

    content = urllib.urlopen(line).read()

  File "/usr/lib/python2.7/", line 84, in urlopen


  File "/usr/lib/python2.7/", line 205, in open

    return getattr(self, name)(url)

  File "/usr/lib/python2.7/", line 461, in open_file

    return self.open_local_file(url)

  File "/usr/lib/python2.7/", line 475, in open_local_file

    raise IOError(e.errno, e.strerror, e.filename)

IOError: [Errno 2] No such file or directory: ''

Related branches

Scott Moser (smoser) wrote :

should be fixed in revno 512.

Changed in cloud-init:
assignee: nobody → Scott Moser (smoser)
importance: Undecided → Low
status: New → In Progress
status: In Progress → Fix Committed
Scott Moser (smoser) on 2012-04-11
Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers