1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: swift-recon: only query object servers once
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2023-04-28
--- swift-2.31.1.orig/swift/cli/recon.py
+++ swift-2.31.1/swift/cli/recon.py
@@ -908,6 +908,13 @@ class SwiftRecon(object):
recon.scout, filtered_hosts):
if status == 200:
hostusage = []
+ # Hack: Ignore all hosts where the port is the object one
+ # but the 6200. This is to ensure hosts are added only
+ # once in case we use the "one server per port" option
+ # of swift-object.
+ port=int(url.split(':')[2].split('/')[0])
+ if port > 6200 and port < 6400:
+ continue
for entry in response:
if not isinstance(entry['mounted'], bool):
print("-> %s/%s: Error: %s" % (url, entry['device'],
|