summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Coles <alistairncoles@gmail.com>2018-04-23 20:13:43 +0100
committerAlistair Coles <alistairncoles@gmail.com>2018-04-23 20:19:43 +0100
commit429ca63c6067e6755ffc9cc8f69e869232ca6d8a (patch)
treed43233cbdf5e8b75d0fa5fc46bc55afae5aabf8a
parent8cd6b00a92e2fc41c17cb12ad0d86d265e24df53 (diff)
downloadswift-429ca63c6067e6755ffc9cc8f69e869232ca6d8a.tar.gz
Remove TODO re find_local_handoff_for_part returning None
find_local_handoff_for_part() returning None implies that no mounted local device is currently in the ring. There's not much more we can do than raise an exception. Change-Id: Ife3436a1fc451974f80893c69f087eca839b2d03
-rw-r--r--swift/container/sharder.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/swift/container/sharder.py b/swift/container/sharder.py
index e4e53603a..33e2c5ba2 100644
--- a/swift/container/sharder.py
+++ b/swift/container/sharder.py
@@ -457,11 +457,9 @@ class ContainerSharder(ContainerReplicator):
part = self.ring.get_part(shard_range.account, shard_range.container)
node = self.find_local_handoff_for_part(part)
if not node:
- # TODO: and when *do* we cleave? maybe we should just be picking
- # one of the local devs
raise DeviceUnavailable(
- 'No mounted devices found suitable to Handoff sharded '
- 'container %s in partition %s' % (shard_range.name, part))
+ 'No mounted devices found suitable for creating shard broker'
+ 'for %s in partition %s' % (shard_range.name, part))
shard_broker = self._initialize_broker(
node['device'], part, shard_range.account, shard_range.container,