[ 
https://issues.apache.org/jira/browse/AMBARI-24606?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Thorpe updated AMBARI-24606:
--------------------------------
    Description: 
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.

  was:
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.

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.


> 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
>
> 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)

Reply via email to