Ensemble hook api should have better error checking/validation of args
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Fix Released
|
Undecided
|
Benjamin Saller |
Bug Description
Clint posted an example on irc of a traceback he got from a hook..
2011-03-17 20:14:44,133: twisted@ERROR: Unhandled Error
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.result = callback(
File "/usr/lib/
_inlineCall
--- <exception caught here> ---
File "/usr/lib/
result = result.
File "/usr/lib/
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/
data = yield context.
File "/usr/lib/
result = result.
File "/usr/lib/
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/
unit_id = yield self._resolve_
File "/usr/lib/
result = g.send(result)
File "/usr/lib/
unit_id = self._topology.
File "/usr/lib/
service_name, unit_sequence_id = unit_name.
exceptions.
It looks like an invalid unit name was passed to relation-get.. Ideally relation-get and all of the hook api would be doing some better validation of cli args, before it gets that far into the ensemble stack.
This is probably resolved with the relation-get syntax matching the documented spec, as per bcsaller's branch in review for relation-get.