You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Zhiguo Wu (Jira)" <ji...@apache.org> on 2022/12/01 02:37:00 UTC
[jira] [Resolved] (AMBARI-24606) Deleting a service should do a better job of cleaning up the Ambari DB
[ https://issues.apache.org/jira/browse/AMBARI-24606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhiguo Wu resolved AMBARI-24606.
--------------------------------
Fix Version/s: 2.8.0
Resolution: Fixed
> 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
> Fix For: 2.8.0
>
> 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
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ambari.apache.org
For additional commands, e-mail: issues-help@ambari.apache.org