fixed error where tombstone files cause the object auditor to error

This commit is contained in:
John Dickinson 2010-10-21 13:32:10 -05:00
parent 9b299b94b4
commit 41c9f19a5f
2 changed files with 6 additions and 3 deletions

View File

@ -629,10 +629,10 @@ def audit_location_generator(devices, datadir, mount_check=True, logger=None):
:param devices: parent directory of the devices to be audited
:param datadir: a directory located under self.devices. This should be
one of the DATADIR constants defined in the account, container, and
object servers.
one of the DATADIR constants defined in the account,
container, and object servers.
:param mount_check: Flag to check if a mount check should be performed
on devices
on devices
:param logger: a logger object
'''
for device in os.listdir(devices):

View File

@ -107,6 +107,9 @@ class ObjectAuditor(Daemon):
partition, account,
container, obj,
keep_data_fp=True)
if df.data_file is None:
# file is deleted, we found the tombstone
return
if os.path.getsize(df.data_file) != \
int(df.metadata['Content-Length']):
raise AuditException('Content-Length of %s does not match '