swift-dispersion-tool slow with unreachable storage nodes
If a Swift storage node is down, the swift-dispersio
This patch prevents the swift-dispersio
--- swift-dispersio
+++ swift-dispersio
@@ -33,6 +33,7 @@
from swift.common.utils import compute_eta, get_time_units, TRUE_VALUES
+unreachable = []
unmounted = []
notfound = []
json_output = False
@@ -60,6 +61,9 @@
if not hasattr(msg_or_exc, 'http_status') or \
+ ip = prefix.
+ if ip not in unreachable:
+ unreachable.
print >>stderr, 'ERROR: %s: %s' % (prefix, msg_or_exc)
return error_log
@@ -85,6 +89,8 @@
def direct(container, part, nodes):
for node in nodes:
+ if node['ip'] in unreachable:
+ continue
try:
@@ -183,6 +189,8 @@
def direct(obj, part, nodes):
for node in nodes:
+ if node['ip'] in unreachable:
+ continue
try:
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- 2013-01-31
- Last reply:
- 2013-01-31
Samuel Merritt (torgomatic) said : | #1 |
Seems like a fairly reasonable change.
Two things:
1) make the variable "unreachable" a set, not a list (it's a micro-optimization, but still...)
2) please submit this as a changeset in Gerrit. You'll have to sign the Contributor License Agreement (CLA), which is a bit tedious, but at least it only has to be done once. See http://
Can you help with this problem?
Provide an answer of your own, or ask Walter Huf for more information if necessary.