...
- Ensure no ambari-server or ambari-agent processes are running
- ambari-server is a java process
- ambari-agent is a python daemon
- Execute "ambari-server reset" to reset the database
- ambari-server re-install does not overwrite the existing DB. So its a good idea to explicitly call "ambari-server reset"
- Erase ambari packages
- ambari-server, ambari-agent, ambari-log4j, hdp_mon_ganglia_addon, hdp_mon_nagios_addon
- Essentially, if you do a "yum list installed | grep ambari" after removal the result should be empty
- Remove ambari.repo file at /etc/yum.repos.d/
- While most of the following folders will either be deleted/empty or have log files, you can choose to explicitly delete them
- /usr/sbin/ambari-server /usr/lib/ambari-server /var/run/ambari-server /var/log/ambari-server /var/lib/ambari-server /etc/rc.d/init.d/ambari-server /etc/ambari-server
/usr/sbin/ambari-agent /usr/lib/ambari-agent /var/run/ambari-agent /var/log/ambari-agent /var/lib/ambari-agent /etc/rc.d/init.d/ambari-agent /etc/ambari-agent
Host Clean-up support in Ambari
...
/usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py script can be invoked to perform cleanup of individual hosts. "python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py" is an interactive call and asks if "users" should be deleted. This is because for many setup may not want to remove users. Use --help to see other options.
Code Block |
---|
python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py
You have elected to remove all users as well. If it is not intended then use option --skip "users". Do you want to continue [y/n] (n)
|
A newer version of the clean-up script is available on the trunk at HostCleanup.py that support a silent option (-s). This is specifically useful when cleaning up across multiple hosts, say using pdsh.
Code Block |
---|
python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --help
Usage: HostCleanup.py [options]
Options:
-h, --help show this help message and exit
-v, --verbose output verbosity.
-f FILE, --file=FILE host check result file to read.
-o FILE, --out=FILE log file to store results.
-k SKIP, --skip=SKIP (packages|users|directories|repositories|processes|alt
ernatives). Use , as separator.
-s, --silent Silently accepts default prompt values
|