relation-get blowing up badly during install hook

Bug #792071 reported by Gustavo Niemeyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pyjuju
Fix Released
Medium
Benjamin Saller

Bug Description

We know relation-get doesn't work during the install hook because there are no relations at this point, but it
should not error out like this:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1020, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/ensemble/ensemble/ensemble/hooks/protocol.py", line 214, in relation_get
    setting_name=setting_name)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 816, in callRemote
    return co._doCommand(self)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 1705, in _doCommand
    self.requiresAnswer)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 747, in _sendBoxCommand
    box._sendTo(self.boxSender)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 572, in _sendTo
    proto.sendBox(self)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 2027, in sendBox
    self.transport.write(box.serialize())
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 549, in serialize
    if len(v) > MAX_VALUE_LENGTH:
exceptions.TypeError: object of type 'NoneType' has no len()
2011-06-02 21:05:16,860 ERROR: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1020, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/ensemble/ensemble/ensemble/hooks/protocol.py", line 214, in relation_get
    setting_name=setting_name)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 816, in callRemote
    return co._doCommand(self)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 1705, in _doCommand
    self.requiresAnswer)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 747, in _sendBoxCommand
    box._sendTo(self.boxSender)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 572, in _sendTo
    proto.sendBox(self)
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 2027, in sendBox
    self.transport.write(box.serialize())
  File "/usr/lib/python2.7/dist-packages/twisted/protocols/amp.py", line 549, in serialize
    if len(v) > MAX_VALUE_LENGTH:
exceptions.TypeError: object of type 'NoneType' has no len()

Related branches

Changed in ensemble:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Benjamin Saller (bcsaller)
milestone: none → dublin
Changed in ensemble:
status: Confirmed → In Progress
Changed in ensemble:
status: In Progress → 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.