object-replicator update_deleted throws oserror if suffix directory is cleaned up externally
Bug #1397668 reported by
Caleb Tennis
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
New
|
Undecided
|
Unassigned |
Bug Description
When running multiple object-replicator processes it's possible that a partition gets cleaned up by process B before process A gets to it. Because the partitions lists are generated at startup and randomized, the order will vary. HOwever, when process A does finally get to the, now deleted, partition, it throws an OSError in the logs which is not checked as an exception in the update_deleted method.
Would be nice to add an exception check for OSError along side the existing Exception check and log it in a more graceful manner.
Essentially:
tpool_get_
To post a comment you must log in.
For the record, the full backtrace is this:
Nov 30 15:23:32 localhost object-replicator: Error syncing handoff partition: #012Traceback (most recent call last):#012 File "/opt/ss/ lib/python2. 7/site- packages/ swift/obj/ replicator. py", line 223, in update_deleted#012 suffixes = tpool.execute( tpool_get_ suffixes, job['path'])#012 File "/opt/ss/ lib/python2. 7/site- packages/ eventlet/ tpool.py" , line 76, in tworker#012 rv = meth(*args, **kwargs) #012 File "/opt/ss/ lib/python2. 7/site- packages/ swift/obj/ replicator. py", line 216, in tpool_get_ suffixes# 012 return [suff for suff in os.listdir( path)#012OSErro r: [Errno 2] No such file or directory: '/srv/node/ d302/objects/ 30377'