diff --git a/swift/obj/replicator.py b/swift/obj/replicator.py index 7a8613dec7..052213aade 100644 --- a/swift/obj/replicator.py +++ b/swift/obj/replicator.py @@ -642,9 +642,10 @@ class ObjectReplicator(Daemon): if failure_dev]) continue if not found_local: - self.logger.error("Can't find itself %s with port %s in ring " - "file, not replicating", - ", ".join(ips), self.port) + self.logger.error("Can't find itself in policy with index %d with" + " ips %s and with port %s in ring file, not" + " replicating", + int(policy), ", ".join(ips), self.port) return jobs def collect_jobs(self, override_devices=None, override_partitions=None, diff --git a/test/unit/obj/test_replicator.py b/test/unit/obj/test_replicator.py index 38a5f0a2d4..2609e2a60a 100644 --- a/test/unit/obj/test_replicator.py +++ b/test/unit/obj/test_replicator.py @@ -267,10 +267,10 @@ class TestObjectReplicator(unittest.TestCase): logger=self.logger) replicator.run_once() expected = [ - "Can't find itself 1.1.1.1 with port 6200 " - "in ring file, not replicating", - "Can't find itself 1.1.1.1 with port 6200 " - "in ring file, not replicating", + "Can't find itself in policy with index 0 with ips 1.1.1.1 and" + " with port 6200 in ring file, not replicating", + "Can't find itself in policy with index 1 with ips 1.1.1.1 and" + " with port 6200 in ring file, not replicating", ] self.assertEqual(expected, self.logger.get_lines_for_level('error'))