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_facility LOG_LOCAL0 Syslog log facility
|
||||||
log_level INFO Logging level
|
log_level INFO Logging level
|
||||||
interval 1800 Minimum time for a pass to take
|
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_facility LOG_LOCAL0 Syslog log facility
|
||||||
log_level INFO Logging level
|
log_level INFO Logging level
|
||||||
interval 1800 Minimum time for a pass to take
|
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_facility LOG_LOCAL0 Syslog log facility
|
||||||
log_level INFO Logging level
|
log_level INFO Logging level
|
||||||
interval 1800 Minimum time for a pass to take
|
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]
|
[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 devices: parent directory of the devices to be audited
|
||||||
:param datadir: a directory located under self.devices. This should be
|
:param datadir: a directory located under self.devices. This should be
|
||||||
one of the DATADIR constants defined in the account, container, and
|
one of the DATADIR constants defined in the account,
|
||||||
object servers.
|
container, and object servers.
|
||||||
:param mount_check: Flag to check if a mount check should be performed
|
:param mount_check: Flag to check if a mount check should be performed
|
||||||
on devices
|
on devices
|
||||||
:param logger: a logger object
|
:param logger: a logger object
|
||||||
'''
|
'''
|
||||||
for device in os.listdir(devices):
|
for device in os.listdir(devices):
|
||||||
|
@ -107,6 +107,9 @@ class ObjectAuditor(Daemon):
|
|||||||
partition, account,
|
partition, account,
|
||||||
container, obj,
|
container, obj,
|
||||||
keep_data_fp=True)
|
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) != \
|
if os.path.getsize(df.data_file) != \
|
||||||
int(df.metadata['Content-Length']):
|
int(df.metadata['Content-Length']):
|
||||||
raise AuditException('Content-Length of %s does not match '
|
raise AuditException('Content-Length of %s does not match '
|
||||||
|
Loading…
x
Reference in New Issue
Block a user