diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-12-01 17:54:20 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-12-01 17:54:20 +0000 |
commit | 33b237f5b5d85aafa7d93884f2c648489b7a2f4f (patch) | |
tree | 0b1f04911f2711dbc0db1e09d9d48b224d5efa6e /swift/obj/updater.py | |
parent | 8ed8077a04d0144c330406dad4695efb7c4feb54 (diff) | |
parent | ede42c77f1e04ab571c21b1d6342e662c7eced53 (diff) | |
download | swift-33b237f5b5d85aafa7d93884f2c648489b7a2f4f.tar.gz |
Merge "Ensure update of the container by object-updater"
Diffstat (limited to 'swift/obj/updater.py')
-rw-r--r-- | swift/obj/updater.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/swift/obj/updater.py b/swift/obj/updater.py index db38708c4..1962d6611 100644 --- a/swift/obj/updater.py +++ b/swift/obj/updater.py @@ -32,8 +32,7 @@ from swift.common.daemon import Daemon from swift.common.header_key_dict import HeaderKeyDict from swift.common.storage_policy import split_policy_string, PolicyError from swift.obj.diskfile import get_tmp_dir, ASYNCDIR_BASE -from swift.common.http import is_success, HTTP_NOT_FOUND, \ - HTTP_INTERNAL_SERVER_ERROR +from swift.common.http import is_success, HTTP_INTERNAL_SERVER_ERROR class ObjectUpdater(Daemon): @@ -270,8 +269,13 @@ class ObjectUpdater(Daemon): with Timeout(self.node_timeout): resp = conn.getresponse() resp.read() - success = (is_success(resp.status) or - resp.status == HTTP_NOT_FOUND) + success = is_success(resp.status) + if not success: + self.logger.error( + _('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']}) return (success, node['id']) except (Exception, Timeout): self.logger.exception(_('ERROR with remote server ' |