Bug 969828

Summary: Gears leave around files in /var/spool/mail/ when they are removed
Product: OpenShift Online Reporter: Thomas Wiest <twiest>
Component: ContainersAssignee: Paul Morie <pmorie>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: bmeng, pmorie, xtian, yadu
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 971350 (view as bug list) Environment:
Last Closed: 2013-06-11 04:15:30 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:
Bug Depends On:    
Bug Blocks: 971350    

Description Thomas Wiest 2013-06-02 15:20:36 UTC
Description of problem:
When a gear's user account is created, the system creates a file in /var/spool/mail/ for their mail.

However, when a gear is removed, that file is left around.

The list of files in that directory just keep growing as more gears are created and removed.

This also starts to exhaust the number of inodes of the FS (that's how we found this).

In addition to fixing this bug, please also add a check to oo-accept-node that ensures that there aren't any gear files left in /var/spool/mail for removed gears.

This is to ensure this doesn't happen again in the future and also that all of the past gear files have been cleaned up.


Version-Release number of selected component (if applicable):
rhc-node-1.8.7-1.el6oso.x86_64


How reproducible:
very


Steps to Reproduce:
1. Create a gear
2. Remove that gear
3. Notice that that gear left around a file in /var/spool/mail/


Actual results:
leaves around a file when a gear is removed


Expected results:
file should be removed as well

Comment 1 openshift-github-bot 2013-06-04 22:57:50 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/d1dbdc42ea95955bcf9cbc8ecea7930b6a6ac4a4
Fix bug 969828

Add --remove argument to userdel

Comment 4 Meng Bo 2013-06-05 08:43:22 UTC
Checked on devenv_3321, issue has been fixed.

After gear removed, /var/spool/mail/<gear_uuid> will be removed accordingly.

[root@ip-10-165-2-28 ~]# grep "53d3e746cdb211e29a8a22000aa5021c" /var/log/secure  |grep del
Jun  5 04:34:25 ip-10-165-2-28 userdel[14041]: delete user '53d3e746cdb211e29a8a22000aa5021c'
Jun  5 04:34:25 ip-10-165-2-28 userdel[14041]: removed group '53d3e746cdb211e29a8a22000aa5021c' owned by '53d3e746cdb211e29a8a22000aa5021c'

[root@ip-10-165-2-28 ~]# ls /var/spool/mail/ |grep 53d3e746cdb211e29a8a22000aa5021c
[root@ip-10-165-2-28 ~]# 

Move bug to verified.