fixes error when object auditor finds a tombstone file
This commit is contained in:
commit
f494fc37a6
@ -230,8 +230,6 @@ log_name object-auditor Label used when logging
|
||||
log_facility LOG_LOCAL0 Syslog log facility
|
||||
log_level INFO Logging level
|
||||
interval 1800 Minimum time for a pass to take
|
||||
node_timeout 10 Request timeout to external services
|
||||
conn_timeout 0.5 Connection timeout to external services
|
||||
================== ============== ==========================================
|
||||
|
||||
------------------------------
|
||||
@ -319,8 +317,6 @@ log_name container-auditor Label used when logging
|
||||
log_facility LOG_LOCAL0 Syslog log facility
|
||||
log_level INFO Logging level
|
||||
interval 1800 Minimum time for a pass to take
|
||||
node_timeout 10 Request timeout to external services
|
||||
conn_timeout 0.5 Connection timeout to external services
|
||||
================== ================= =======================================
|
||||
|
||||
----------------------------
|
||||
@ -388,10 +384,6 @@ log_name account-auditor Label used when logging
|
||||
log_facility LOG_LOCAL0 Syslog log facility
|
||||
log_level INFO Logging level
|
||||
interval 1800 Minimum time for a pass to take
|
||||
max_container_count 100 Maximum containers randomly picked for
|
||||
a given account audit
|
||||
node_timeout 10 Request timeout to external services
|
||||
conn_timeout 0.5 Connection timeout to external services
|
||||
==================== =============== =======================================
|
||||
|
||||
[account-reaper]
|
||||
|
@ -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):
|
||||
|
@ -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 '
|
||||
|
Loading…
x
Reference in New Issue
Block a user