diff options
| author | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-02-17 13:23:56 -0800 |
|---|---|---|
| committer | Sandy Walsh <sandy.walsh@rackspace.com> | 2011-02-17 13:23:56 -0800 |
| commit | b9a03524d03c0ce7fa98fab5531db720941bbfdb (patch) | |
| tree | 5c7b90ce04713bfdd124a1119848a797aa0671e7 | |
| parent | b47cc07a7d3be1653bbcfa3215e3427e5cc796cb (diff) | |
multi positional string fix
| -rw-r--r-- | nova/scheduler/zone_manager.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/nova/scheduler/zone_manager.py b/nova/scheduler/zone_manager.py index e7c37a9a6..af0b90f9f 100644 --- a/nova/scheduler/zone_manager.py +++ b/nova/scheduler/zone_manager.py @@ -74,15 +74,17 @@ class ZoneState(object): marked as offline.""" self.last_exception = exception self.last_exception_time = datetime.now() - logging.warning(_("'%s' error talking to zone %s") % (exception, - self.api_url)) + api_url = self.api_url + logging.warning(_("'%(exception)s' error talking to " + "zone %(api_url)s") % locals()) + max_errors = FLAGS.zone_failures_to_offline: self.attempt += 1 - if self.attempt >= FLAGS.zone_failures_to_offline: + if self.attempt >= max_errors: self.is_active = False - logging.error(_("No answer from zone %s after %d " - "attempts. Marking inactive.") % (self.api_url, - FLAGS.zone_failures_to_offline)) + logging.error(_("No answer from zone %(api_url)s " + "after %(max_errors)d " + "attempts. Marking inactive.") % locals()) def _call_novatools(zone): |
