Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how to fully uninstall worker/kafka machine after delete it from ambari cluster

avatar

as all know we can delete the worker/kafka machine from the cluster but configuration on the host still exist

our target is: full host uninstall ( include re-filesystem , delete rpm's , delete users , file , conf etc ) , and then full new installation by API commands to join host to the cluster

what we do until now is that:

delete the worker07 from the ambari cluster

re-create file-system on all disks as /dev/sdc /dev/sdd , etc



but the big problem now is how to un install the rest configuration as users , rpm's and other stuff

please advice how to continue ?

what are the doc if exist for this proccess?

Michael-Bronson
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Michael Bronson

There is an article to remove the HDP components completely from a host: https://community.hortonworks.com/articles/97489/completely-uninstall-hdp-and-ambari.html Please be careful while referring to this article as it also includes removal of Ambari Server So please selectively run the mentioned commands.

.

You can refer to the above article to clean the component that you do not want to remove.

Also please take a look at the New ambari API (that is introduced from ambari 2.5.0) to clean old HDP Stacks from the host specified int he API call and then you can proceed (Reference: https://issues.apache.org/jira/browse/AMBARI-18435)

.

Here's the API call to remove older versions. E.g.,

curl 'http://c6401.ambari.apache.org:8080/api/v1/clusters/cl1/requests' -u admin:admin -H "X-Requested-By: ambari" -X POST -d'{"RequestInfo":{"context":"remove_previous_stacks", "action" : "remove_previous_stacks", "parameters" : {"version":"2.5.0.0-1245"}}, "Requests/resource_filters": [{"hosts":"c6403.ambari.apache.org, c6402.ambari.apache.org"}]}'

That removes all versions older than "2.5.0.0-1245". Version mentioned in request remains intact. We also have checks that prevent removing the current version and the operation is idempotent.

.

View solution in original post

2 REPLIES 2

avatar
Master Mentor

@Michael Bronson

There is an article to remove the HDP components completely from a host: https://community.hortonworks.com/articles/97489/completely-uninstall-hdp-and-ambari.html Please be careful while referring to this article as it also includes removal of Ambari Server So please selectively run the mentioned commands.

.

You can refer to the above article to clean the component that you do not want to remove.

Also please take a look at the New ambari API (that is introduced from ambari 2.5.0) to clean old HDP Stacks from the host specified int he API call and then you can proceed (Reference: https://issues.apache.org/jira/browse/AMBARI-18435)

.

Here's the API call to remove older versions. E.g.,

curl 'http://c6401.ambari.apache.org:8080/api/v1/clusters/cl1/requests' -u admin:admin -H "X-Requested-By: ambari" -X POST -d'{"RequestInfo":{"context":"remove_previous_stacks", "action" : "remove_previous_stacks", "parameters" : {"version":"2.5.0.0-1245"}}, "Requests/resource_filters": [{"hosts":"c6403.ambari.apache.org, c6402.ambari.apache.org"}]}'

That removes all versions older than "2.5.0.0-1245". Version mentioned in request remains intact. We also have checks that prevent removing the current version and the operation is idempotent.

.

avatar

+1 for the answer , I will test it on my host

Michael-Bronson