KeyError: 'handler'

Bug #739694 reported by Andreas Hasenack
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

Got this in the console output of natty when booting up natty with landscape-client info in user-data:

"""WARN:consuming user data failed!
Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 180, in <module>
    main()
  File "/usr/bin/cloud-init", line 144, in main
    cloud.consume_userdata,[],False)
  File "/usr/lib/python2.7/dist-packages/cloudinit/__init__.py", line 307, in sem_and_run
    func(*args)
  File "/usr/lib/python2.7/dist-packages/cloudinit/__init__.py", line 351, in consume_userdata
    self.part_handlers, data)
  File "/usr/lib/python2.7/dist-packages/cloudinit/UserDataHandler.py", line 179, in walk_userdata
    callbacks[ctype](data,ctype,filename,part.get_payload())
  File "/usr/lib/python2.7/dist-packages/cloudinit/__init__.py", line 366, in handle_handler
    handlerdir = self.get_ipath("handler")
  File "/usr/lib/python2.7/dist-packages/cloudinit/__init__.py", line 317, in get_ipath
    % (varlibdir,self.get_instance_id(), pathmap[name]))
KeyError: 'handler'
"""

cloud-init version 0.6.1-0ubuntu2

Related branches

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

workaround to use after the instance started:
- apply patch:

=== modified file 'cloudinit/__init__.py'
--- cloudinit/__init__.py 2011-02-07 19:36:33 +0000
+++ cloudinit/__init__.py 2011-03-21 20:18:27 +0000
@@ -363,7 +363,7 @@
         self.handlercount=self.handlercount+1

         # write content to instance's handlerdir
- handlerdir = self.get_ipath("handler")
+ handlerdir = self.get_ipath("handlers")
         modname = 'part-handler-%03d' % self.handlercount
         modfname = modname + ".py"
         util.write_file("%s/%s" % (handlerdir,modfname), payload, 0600)

- rm -Rf /var/lib/cloud/instance*
- reboot

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

This bug was fixed in the package cloud-init - 0.6.1-0ubuntu4

---------------
cloud-init (0.6.1-0ubuntu4) natty; urgency=low

  * catch up to trunk cloud-init (rev 389).
  * fix bug in part-handler code, that broke part handlers (LP: #739694)
  * fix sporadic resizefs failure (LP: #726938)
 -- Scott Moser <email address hidden> Mon, 21 Mar 2011 22:06:59 -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.