Bug 969828 - Gears leave around files in /var/spool/mail/ when they are removed
Summary: Gears leave around files in /var/spool/mail/ when they are removed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Paul Morie
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 971350
TreeView+ depends on / blocked
 
Reported: 2013-06-02 15:20 UTC by Thomas Wiest
Modified: 2015-05-14 23:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 971350 (view as bug list)
Environment:
Last Closed: 2013-06-11 04:15:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.