diff options
| author | Kevin L. Mitchell <kevin.mitchell@rackspace.com> | 2011-02-26 00:24:23 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-02-26 00:24:23 +0000 |
| commit | 00eb189ba45ea0e6b475463b93b4d906fb091cd7 (patch) | |
| tree | 8a0fb544ab81002a417f955db04e9ac5d9e5090c | |
| parent | bb4ac4766aad815aa86ba44e0c4674ee596e1256 (diff) | |
| parent | 4a217b640c3e0f488c87572787c92b6808ab0a9a (diff) | |
| download | nova-00eb189ba45ea0e6b475463b93b4d906fb091cd7.tar.gz nova-00eb189ba45ea0e6b475463b93b4d906fb091cd7.tar.xz nova-00eb189ba45ea0e6b475463b93b4d906fb091cd7.zip | |
No reason to dump a stack trace just because the AMQP server is unreachable; an error notification should be sufficient.
| -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): |
