Include policy in ran-out-of-handoffs log message
Related-Change: I2f5bb12f3704880df1750229425f64f419ff9aef Change-Id: I14b70e949a57d2c31b71d3efa6ee1200d0717db6
This commit is contained in:
2 changed files with 4 additions and 2 deletions
@@ -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"))
@@ -1808,7 +1808,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)
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.