Martin Bohacek created AMBARI-20298:
---------------------------------------
Summary: Delete Service in Ambari 2.4 does not work properly
Key: AMBARI-20298
URL: https://issues.apache.org/jira/browse/AMBARI-20298
Project: Ambari
Issue Type: Bug
Components: ambari-sever
Affects Versions: 2.4.2
Reporter: Martin Bohacek
Attachments: add_service_errors.log
Deleting a service using Ambari UI (Service Actions > Delete Service) does not
delete the service completely.
We have custom service for Fluentd, on which I observe the problem. After using
deletion from UI, whe infor about the service still remains in Ambari database
tables - in our case e.g.:
{noformat}
ambari=> select * from clusterservices where service_name like 'FLUENT%';
service_name | cluster_id | service_enabled
--------------+------------+-----------------
FLUENTD | 2 | 0
(1 row)
ambari=> select * from servicecomponentdesiredstate where component_name like
'FLUENT%';
id | component_name | cluster_id | desired_stack_id |
desired_version | desired_state | service_name | recovery_enabled
-----+----------------------------------+------------+------------------+-----------------+---------------+--------------+------------------
107 | FLUENTD_KNOX_GATEWAY_COLLECTOR | 2 | 3 |
UNKNOWN | INSTALLED | FLUENTD | 0
101 | FLUENTD_CONSUMER | 2 | 3 |
UNKNOWN | STARTED | FLUENTD | 0
102 | FLUENTD_HDFS_NAMENODE_COLLECTOR | 2 | 3 |
UNKNOWN | INSTALLED | FLUENTD | 0
103 | FLUENTD_HIVE_SERVER2_COLLECTOR | 2 | 3 |
UNKNOWN | INSTALLED | FLUENTD | 0
104 | FLUENTD_SYSTEM_COLLECTOR | 2 | 3 |
UNKNOWN | INSTALLED | FLUENTD | 0
105 | FLUENTD_FORWARDER | 2 | 3 |
UNKNOWN | INSTALLED | FLUENTD | 0
106 | FLUENTD_HIVE_METASTORE_COLLECTOR | 2 | 3 |
UNKNOWN | INSTALLED | FLUENTD | 0
{noformat}
This is problem, when I want to redeploy the service again - error occurs on
database integrity check level (see attached stack trace from Ambari server
log).
To fix the problem, there is a workaround to manually clean the database tables
after performing service deletion from web UI:
{noformat}
delete from hostcomponentdesiredstate where component_name like 'FLUENT%';
delete from hostcomponentstate where component_name like 'FLUENT%';
delete from servicecomponentdesiredstate where component_name like 'FLUENT%';
delete from servicedesiredstate where service_name like 'FLUENT%';
delete from clusterservices where service_name like 'FLUENT%';
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)