Bug 969828 - Gears leave around files in /var/spool/mail/ when they are removed
Gears leave around files in /var/spool/mail/ when they are removed
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Paul Morie
libra bugs
Depends On:
Blocks: 971350
  Show dependency treegraph
Reported: 2013-06-02 11:20 EDT by Thomas Wiest
Modified: 2015-05-14 19:20 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 971350 (view as bug list)
Last Closed: 2013-06-11 00:15:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Thomas Wiest 2013-06-02 11:20:36 EDT
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):

How reproducible:

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 18:57:50 EDT
Commit pushed to master at https://github.com/openshift/origin-server

Fix bug 969828

Add --remove argument to userdel
Comment 4 Meng Bo 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.

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