Bug 829783

Summary: object-storage: tmp dir need to have some cleanup strategy
Product: [Community] GlusterFS Reporter: Saurabh <saujain>
Component: object-storageAssignee: Peter Portante <pportant>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: pre-releaseCC: gluster-bugs, junaid, mzywusko, pportant
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:23:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Saurabh 2012-06-07 14:35:10 UTC
Description of problem:
we need to have some cleanup for tmp directory regularly after certain intervals.

[root@gqac022 async_pending]# cd ..
[root@gqac022 AUTH_test]# ls -R cont*
cont1:

cont2:

cont3:

cont4:

cont5:
[root@gqac022 AUTH_test]# ls
async_pending  cont1  cont2  cont3  cont4  cont5  tmp

[root@gqac022 AUTH_test]# du -h tmp/
20G	tmp/


[root@gqac022 AUTH_test]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_gqac022-lv_root
                       50G   25G   23G  52% /
tmpfs                  24G  1.1M   24G   1% /dev/shm
/dev/sda1             485M   31M  429M   7% /boot
/dev/mapper/vg_gqac022-lv_home
                      366G   21G  346G   6% /home
localhost:test        732G   36G  697G   5% /mnt/gluster-object/AUTH_test
[root@gqac022 AUTH_test]# 


Version-Release number of selected component (if applicable):
3.3.0qa45, swift-rc-rpms

How reproducible:
found after creating large number of objects

Steps to Reproduce:
1. create large number of objects  and after a certain time the tmp directory seems to have grown in size
2.
3.
  
Actual results:


Expected results:


Additional info:
if we already have some strategy for cleanup please update about that one.

Comment 1 Junaid 2012-06-26 10:08:06 UTC
tmp directory contains incompletely uploaded files. So, having them is waste of storage. We should come up with the scheme to periodically delete the contents of tmp directory.

Comment 2 Peter Portante 2012-11-14 16:50:22 UTC
This bug will most likely be fixed as a result of fixing https://bugzilla.redhat.com/show_bug.cgi?id=876660. Since I am working on that, I'll take this bug as well.

Comment 3 Peter Portante 2012-11-19 22:05:38 UTC
We should probably not being using a single temporary directory for all temp file creations on volume, but just create temporary files locally. And the temp file should be auto-deleted on clean-up if it fails to be renamed (if we don't already do that, or should be fixed if that is not working correctly).

Comment 4 Junaid 2013-04-03 10:41:36 UTC
Patch submitted upstream. With this fix, there won't be any tmp directory at all.

Comment 5 Peter Portante 2013-04-03 14:20:39 UTC
Not only do we need to consider Comment 3, but we need to be sure these temp files are not presented as objects in container *and* directory object listings.