Skip to content

Commit

Permalink
Bug #894683: nova.service does not handle attribute specific exceptio…
Browse files Browse the repository at this point in the history
…ns and client hangs

As Sateesh points out nova.service.Service.__getattr__ throws an AttributeError exception when the upcall method is not available.

However nova.rpc should catch all exceptions. This does not happen in this specific case because the following statement was outside the try-catch-all:

node_func = getattr(self.proxy, str(method))

(cherry picked from commit 421e5cb)

Change-Id: I437c88783bca037e4054078d2687ef41c8fc2b83
  • Loading branch information
Armando Migliaccio authored and markmc committed Jan 16, 2012
1 parent 0e56a27 commit 3bcd272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nova/rpc/impl_kombu.py
Expand Up @@ -613,10 +613,10 @@ def _process_data(self, ctxt, method, args):
object and calls it.
"""

node_func = getattr(self.proxy, str(method))
node_args = dict((str(k), v) for k, v in args.iteritems())
# NOTE(vish): magic is fun!
try:
node_func = getattr(self.proxy, str(method))
node_args = dict((str(k), v) for k, v in args.iteritems())
# NOTE(vish): magic is fun!
rval = node_func(context=ctxt, **node_args)
# Check if the result was a generator
if isinstance(rval, types.GeneratorType):
Expand Down

0 comments on commit 3bcd272

Please sign in to comment.