swift-account-audit: Log the bad status

Change-Id: Ib28d1948a571acf31926df82dd8c24910c227053
This commit is contained in:
Tim Burke 2021-04-08 17:19:13 -07:00
parent d9a6fe4362
commit c8de76c7fd

View File

@ -100,8 +100,9 @@ class Auditor(object):
if resp.status // 100 != 2: if resp.status // 100 != 2:
self.object_not_found += 1 self.object_not_found += 1
consistent = False consistent = False
print(' Bad status GETting object "%s" on %s/%s' print(' Bad status %s GETting object "%s" on %s/%s'
% (path, node['ip'], node['device'])) % (resp.status, path,
node['ip'], node['device']))
continue continue
if resp.getheader('ETag').strip('"') != calc_hash: if resp.getheader('ETag').strip('"') != calc_hash:
self.object_checksum_mismatch += 1 self.object_checksum_mismatch += 1
@ -116,8 +117,9 @@ class Auditor(object):
if resp.status // 100 != 2: if resp.status // 100 != 2:
self.object_not_found += 1 self.object_not_found += 1
consistent = False consistent = False
print(' Bad status HEADing object "%s" on %s/%s' print(' Bad status %s HEADing object "%s" on %s/%s'
% (path, node['ip'], node['device'])) % (resp.status, path,
node['ip'], node['device']))
continue continue
override_etag = resp.getheader( override_etag = resp.getheader(