diff options
author | Tim Burke <tim.burke@gmail.com> | 2021-12-02 15:34:43 -0800 |
---|---|---|
committer | Alistair Coles <alistairncoles@gmail.com> | 2021-12-10 13:31:45 +0000 |
commit | eec595b123612a58e26116c7d57c0afcde006429 (patch) | |
tree | 15028b939ef08e057fedd3ea34768e82c4905235 /swift/obj/updater.py | |
parent | 1859f2e161f396023d8328489fb4b88c303797a9 (diff) | |
download | swift-eec595b123612a58e26116c7d57c0afcde006429.tar.gz |
updaters: use replication network
In general, background processes ought to use the replication network;
this reserves the "normal" network for work that's in the client-request
path, including things like inline container updates.
Change-Id: I0d778aac68b101cdcb077d70c250a56a199175a2
Diffstat (limited to 'swift/obj/updater.py')
-rw-r--r-- | swift/obj/updater.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/swift/obj/updater.py b/swift/obj/updater.py index 6f22a97de..d49f12f76 100644 --- a/swift/obj/updater.py +++ b/swift/obj/updater.py @@ -468,8 +468,9 @@ class ObjectUpdater(Daemon): redirect = None try: with ConnectionTimeout(self.conn_timeout): - conn = http_connect(node['ip'], node['port'], node['device'], - part, op, obj, headers_out) + conn = http_connect( + node['replication_ip'], node['replication_port'], + node['device'], part, op, obj, headers_out) with Timeout(self.node_timeout): resp = conn.getresponse() resp.read() @@ -487,10 +488,12 @@ class ObjectUpdater(Daemon): self.logger.debug( 'Error code %(status)d is returned from remote ' 'server %(ip)s: %(port)s / %(device)s', - {'status': resp.status, 'ip': node['ip'], - 'port': node['port'], 'device': node['device']}) + {'status': resp.status, 'ip': node['replication_ip'], + 'port': node['replication_port'], + 'device': node['device']}) return success, node['id'], redirect except (Exception, Timeout): - self.logger.exception('ERROR with remote server ' - '%(ip)s:%(port)s/%(device)s', node) + self.logger.exception( + 'ERROR with remote server ' + '%(replication_ip)s:%(replication_port)s/%(device)s', node) return HTTP_INTERNAL_SERVER_ERROR, node['id'], redirect |