Merge "Include policy in ran-out-of-handoffs log message"

This commit is contained in:
Zuul 2018-01-24 10:52:22 +00:00 committed by Gerrit Code Review
commit 8516f2302a
2 changed files with 4 additions and 2 deletions

View File

@ -487,7 +487,8 @@ class ObjectReplicator(Daemon):
self.suffix_count += len(local_hash)
except StopIteration:
self.logger.error('Ran out of handoffs while replicating '
'partition %s', job['partition'])
'partition %s of policy %d',
job['partition'], int(job['policy']))
except (Exception, Timeout):
failure_devs_info.update(target_devs_info)
self.logger.exception(_("Error syncing partition"))

View File

@ -1811,7 +1811,8 @@ class TestObjectReplicator(unittest.TestCase):
expected.append(error % node)
# ... and finally we get an error about running out of nodes
expected.append('Ran out of handoffs while replicating '
'partition %s' % job['partition'])
'partition %s of policy %d' %
(job['partition'], job['policy']))
self.assertEqual(expected, error_lines)
self.assertEqual(len(self.replicator.partition_times), 1)
self.assertEqual(mock_http.call_count, len(ring._devs) - 1)