Bug 971350 - 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 Container Platform
Classification: Red Hat
Component: Containers
Version: 1.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 969828
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-06 10:48 UTC by Gaoyun Pei
Modified: 2017-03-08 17:35 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 969828
Environment:
Last Closed: 2013-06-28 15:45:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gaoyun Pei 2013-06-06 10:48:37 UTC
This bug could be reproduced on puddle:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.2/2013-06-05.9
So clone it to OSE.

+++ This bug was initially created as a clone of Bug #969828 +++

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

--- Additional comment from openshift-github-bot on 2013-06-04 18:57:50 EDT ---

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

--- Additional comment from xiaoli on 2013-06-04 23:36:04 EDT ---

Comments for QE:

We need to update cases to add one more check point for: /var/spool/mail/ after the gear is added or removed.

--- Additional comment from xiaoli on 2013-06-04 23:36:04 EDT ---

Comments for QE:

We need to update cases to add one more check point for: /var/spool/mail/ after the gear is added or removed.

--- Additional comment from Meng Bo on 2013-06-05 04:43:22 EDT ---

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.

Comment 3 Gaoyun Pei 2013-06-07 01:58:06 UTC
This bug is fixed on puddle:
http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.2/2013-06-06.1

Create an app with a uuid is 51b1381d0f5b150c2b0000a4
[root@node1 ~]# ls /var/spool/mail/ |grep 51b1381d0f5b150c2b0000a4
51b1381d0f5b150c2b0000a4

Delete this app
[root@node1 ~]# grep 51b1381d0f5b150c2b0000a4 /var/log/secure |grep del
Jun  6 18:51:12 node1 userdel[6977]: delete user '51b1381d0f5b150c2b0000a4'
Jun  6 18:51:12 node1 userdel[6977]: removed group '51b1381d0f5b150c2b0000a4' owned by '51b1381d0f5b150c2b0000a4'
[root@node1 ~]# ls /var/spool/mail/ |grep 51b1381d0f5b150c2b0000a4
[root@node1 ~]#

Comment 4 Luke Meyer 2013-06-28 15:45:37 UTC
Closing all bugs introduced, fixed, and verified during 1.2 release work (thus never shipped).


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