Red Hat Bugzilla – Bug 969828
Gears leave around files in /var/spool/mail/ when they are removed
Last modified: 2015-05-14 19:20:27 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):
Steps to Reproduce:
1. Create a gear
2. Remove that gear
3. Notice that that gear left around a file in /var/spool/mail/
leaves around a file when a gear is removed
file should be removed as well
Commit pushed to master at https://github.com/openshift/origin-server
Fix bug 969828
Add --remove argument to userdel
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: delete user '53d3e746cdb211e29a8a22000aa5021c'
Jun 5 04:34:25 ip-10-165-2-28 userdel: removed group '53d3e746cdb211e29a8a22000aa5021c' owned by '53d3e746cdb211e29a8a22000aa5021c'
[root@ip-10-165-2-28 ~]# ls /var/spool/mail/ |grep 53d3e746cdb211e29a8a22000aa5021c
Move bug to verified.