Bug #71213 MEM agent uninstall leaves the java directory there.
Submitted: 23 Dec 2013 10:32 Modified: 26 Feb 2014 9:44
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:3.0.4 OS:Linux (centos 6)
Assigned to: CPU Architecture:Any

[23 Dec 2013 10:32] Simon Mudd
Description:
When uninstalling an agent I notice the cleanup is not complete.
This is not a big issue but it would be good to remove the java directory too.

How to repeat:
[smudd@myserver ~]$ sudo su -
[root@myserver ~]# cd /opt/mysql/enterprise/agent
[root@myserver agent]# ls -la
total 4072
drwxr-xr-x 11 root  root     4096 Dec  9 11:46 .
drwxr-xr-x  4 root  root     4096 Oct 21 11:30 ..
drwxr-xr-x  3 root  root     4096 Dec  9 11:46 bin
-rw-------  1 root  root      552 Dec  9 11:46 configuration_report.txt
drwxr-xr-x  2 root  root     4096 Oct 21 11:30 doc
drwxr-xr-x  4 root  root     4096 Dec  9 11:46 etc
drwxr-xr-x  6 root  root     4096 Oct 21 11:30 java
drwxr-xr-x  2 root  root     4096 Dec  9 11:46 lib
drwxr-xr-x  3 root  root     4096 Dec  9 11:46 licenses
drwxr-xr-x  2 mysql mysql    4096 Dec  9 12:19 logs
-rw-------  1 root  root        6 Dec  9 11:46 mysql-monitor-agent.pid
drwxr-xr-x 10 root  root     4096 Dec  9 11:46 patchbackup
drwxr-xr-x  4 mysql mysql    4096 Oct 21 11:31 spool
-rwx------  1 root  root  4067586 Dec  9 11:46 uninstall
-rw-------  1 root  root    43246 Dec  9 11:46 uninstall.dat
[root@myserver agent]# ./uninstall 
Do you want to uninstall MySQL Enterprise Monitor Agent and all of its modules? [Y/n]: y

----------------------------------------------------------------------------
Uninstall Status

 Uninstalling MySQL Enterprise Monitor Agent
 0% ______________ 50% ______________ 100%
 #########################################

Info: Uninstallation completed
Press [Enter] to continue :
[root@myserver agent]# ls -la
total 12
drwxr-xr-x 3 root root 4096 Dec 23 11:25 .
drwxr-xr-x 4 root root 4096 Oct 21 11:30 ..
drwxr-xr-x 3 root root 4096 Dec 23 11:25 java
[root@myserver agent]# cd ..
[root@myserver enterprise]#

Suggested fix:
Clean up the agent directory completely when uninstalling.
[26 Feb 2014 9:44] Umesh Shastry
Hello Simon,

Thank you for the bug report!

Thanks,
Umesh