[ https://issues.apache.org/jira/browse/AMBARI-24606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752601#comment-16752601 ]
Hudson commented on AMBARI-24606: --------------------------------- SUCCESS: Integrated in Jenkins build Ambari-trunk-Commit #10438 (See [https://builds.apache.org/job/Ambari-trunk-Commit/10438/]) AMBARI-24606. Deleting a service should do a better job of cleaning up (github: [https://gitbox.apache.org/repos/asf?p=ambari.git&a=commit&h=845f7773f85b93b16cf6fd547b171c1474e8e5f9]) * (edit) ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java * (edit) ambari-server/src/test/java/org/apache/ambari/server/state/ServiceTest.java * (edit) ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterImplTest.java * (edit) ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java > Deleting a service should do a better job of cleaning up the Ambari DB > ---------------------------------------------------------------------- > > Key: AMBARI-24606 > URL: https://issues.apache.org/jira/browse/AMBARI-24606 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.7.0 > Reporter: Tim Thorpe > Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > When a service is deleted, there are artifacts that are left behind in the > Ambari DB such as configuration versions. > These are no longer needed and can cause issues. > When restarting the ambari server, you will see the following error: > DB configs consistency check found warnings. See > /var/log/ambari-server/ambari-server-check-database.log for more details. > /var/log/ambari-server/ambari-server-check-database.log: > 2018-09-06 11:12:49,455 WARN - You have config(s): ... that is(are) not > mapped (in serviceconfigmapping table) to any service! > You can use following command to cleanup the postgress database: > grep WARN /var/log/ambari-server/ambari-server-check-database.log | tail -n 1 > | awk '\{print $8}'| sed 's/,/\n/g' | sed 's/-version/ version/g' | awk > '\{printf "delete from clusterconfig WHERE type_name='\''%s'\'' AND > version_tag='\''%s'\'';\n", $1, $2}' | psql -U ambari ambari > There are no REST API calls that can be used to clean up the unwanted > configurations. > curl -u admin:admin -i -H 'X-Requested-By: ambari' -X DELETE > 'http://localhost:8080/api/v1/clusters/cc/configurations/service_config_versions?service_name=HDFS > HTTP/1.1 405 Method Not Allowed' > curl -u admin:admin -i -H 'X-Requested-By: ambari' -X DELETE > 'http://localhost:8080/api/v1/clusters/cc/configurations?type=hdfs-conf&tag=version1' > HTTP/1.1 405 Method Not Allowed' > > There are many defects related to this which are still opened: > https://issues.apache.org/jira/browse/AMBARI-18358 > https://issues.apache.org/jira/browse/AMBARI-14624 > https://issues.apache.org/jira/browse/AMBARI-19990 > https://issues.apache.org/jira/browse/AMBARI-21269 > https://issues.apache.org/jira/browse/AMBARI-12573 > https://issues.apache.org/jira/browse/AMBARI-11713 > > I haven't verified whether all of the issues described are still valid or not. -- This message was sent by Atlassian JIRA (v7.6.3#76005)