Exclude .trashcan dir from container listing
Since RHS 3.1, .trashcan directory is visible from glusterfs fuse mount. This causes problems in gsexpiring volume in which the directories should be integers (timestamps). The expirer crashes when it tries to: int(".trashcan") This change does not list .trashcan as a container when a GET request is issued on the account/volume. Change-Id: I70830a4085c5cf0890cb8e54ef8521c18a20c7f3 Signed-off-by: Prashanth Pai <ppai@redhat.com>
This commit is contained in:
parent
b2dbc15e9b
commit
74d02e6c6e
|
@ -47,6 +47,7 @@ DIR_NON_OBJECT = 'dir'
|
|||
DIR_OBJECT = 'marker_dir'
|
||||
TEMP_DIR = 'tmp'
|
||||
ASYNCDIR = 'async_pending' # Keep in sync with swift.obj.server.ASYNCDIR
|
||||
TRASHCAN = '.trashcan'
|
||||
FILE = 'file'
|
||||
FILE_TYPE = 'application/octet-stream'
|
||||
OBJECT = 'Object'
|
||||
|
@ -312,6 +313,7 @@ def get_account_details(acc_path):
|
|||
for name in do_listdir(acc_path):
|
||||
if name.lower() == TEMP_DIR \
|
||||
or name.lower() == ASYNCDIR \
|
||||
or name.lower() == TRASHCAN \
|
||||
or not do_isdir(os.path.join(acc_path, name)):
|
||||
continue
|
||||
container_count += 1
|
||||
|
|
Loading…
Reference in New Issue