Support Questions
Find answers, ask questions, and share your expertise

Clean up configuration groups in Ambari

I have installed 3-node Kafka cluster as a part of HDP 2.5.3. At some point, we have tried to remove some of configuration groups and re-create them. Right now, we have remnants of previous groups (two deleted configuration groups). One of those deleted groups has node in it (03) which is duplicated (exists in Deleted and Kafka-...-03 groups). I tried to remove one of those appearances but I could not.

Is there any way to remove old configuration groups and duplicated node?

configgroups01.jpg

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Super Mentor

@Darko Milovanovic

After deleting you will see the config group name as "Deleted" in the ambari UI that is an issue reported as part of : https://issues.apache.org/jira/browse/AMBARI-20435

.

In order to clean the Deleted config group completely you will need to find the config_group id and then you can run the following SQL queries then restart "ambari-server"

delete from ambari."serviceconfighosts" where service_config_id in (select service_config_id from serviceconfig where group_id=<REPLACE>);

delete from ambari."serviceconfigmapping" where service_config_id in (select service_config_id from serviceconfig where group_id=<REPLACE>);

delete from ambari.serviceconfig where group_id=<REPLACE>;

.

**NOTE:** Please collect the Ambari DB Dump before modifying the DB manually.

Replace the <REPLACE> value with the config_group id which you want to cleanup.

.

View solution in original post

2 REPLIES 2

Super Mentor

@Darko Milovanovic

After deleting you will see the config group name as "Deleted" in the ambari UI that is an issue reported as part of : https://issues.apache.org/jira/browse/AMBARI-20435

.

In order to clean the Deleted config group completely you will need to find the config_group id and then you can run the following SQL queries then restart "ambari-server"

delete from ambari."serviceconfighosts" where service_config_id in (select service_config_id from serviceconfig where group_id=<REPLACE>);

delete from ambari."serviceconfigmapping" where service_config_id in (select service_config_id from serviceconfig where group_id=<REPLACE>);

delete from ambari.serviceconfig where group_id=<REPLACE>;

.

**NOTE:** Please collect the Ambari DB Dump before modifying the DB manually.

Replace the <REPLACE> value with the config_group id which you want to cleanup.

.

View solution in original post

Thanks a lot! It worked.