diff options
author | Josh Kearney <josh@jk0.org> | 2011-03-01 10:53:19 -0600 |
---|---|---|
committer | Josh Kearney <josh@jk0.org> | 2011-03-01 10:53:19 -0600 |
commit | a95402f5d6c25df83c49d5293917e4c553fd01e7 (patch) | |
tree | 3803d1b2a13343acf8a77e1e747c5811c3a50145 /nova/rpc.py | |
parent | 97566c04b3a04626f1bc1b66e72c61b4621b6c7d (diff) | |
parent | bb7c1b8c63632c789ed0cd3785a22b7baa90fd83 (diff) | |
download | nova-a95402f5d6c25df83c49d5293917e4c553fd01e7.tar.gz nova-a95402f5d6c25df83c49d5293917e4c553fd01e7.tar.xz nova-a95402f5d6c25df83c49d5293917e4c553fd01e7.zip |
Merged trunk
Diffstat (limited to 'nova/rpc.py')
-rw-r--r-- | nova/rpc.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nova/rpc.py b/nova/rpc.py index 205bb524a..8fe4565dd 100644 --- a/nova/rpc.py +++ b/nova/rpc.py @@ -91,18 +91,19 @@ class Consumer(messaging.Consumer): super(Consumer, self).__init__(*args, **kwargs) self.failed_connection = False break - except: # Catching all because carrot sucks + except Exception as e: # Catching all because carrot sucks fl_host = FLAGS.rabbit_host fl_port = FLAGS.rabbit_port fl_intv = FLAGS.rabbit_retry_interval - LOG.exception(_("AMQP server on %(fl_host)s:%(fl_port)d is" - " unreachable. Trying again in %(fl_intv)d seconds.") + LOG.error(_("AMQP server on %(fl_host)s:%(fl_port)d is" + " unreachable: %(e)s. Trying again in %(fl_intv)d" + " seconds.") % locals()) self.failed_connection = True if self.failed_connection: - LOG.exception(_("Unable to connect to AMQP server " - "after %d tries. Shutting down."), - FLAGS.rabbit_max_retries) + LOG.error(_("Unable to connect to AMQP server " + "after %d tries. Shutting down."), + FLAGS.rabbit_max_retries) sys.exit(1) def fetch(self, no_ack=None, auto_ack=None, enable_callbacks=False): |