Hi,

I'm trying to remove the Storm service/component from Ambari 2.0 on HDP-2.2.4 and the curl API commands fail to remove it completely.

After upgrading the stack from HDP-2.1 (with Storm installed) to HDP-2.2.4.2 I followed the Hortonworks documentation for Ambari upgrade from HDP2.1 to HDP2.2.4 which states to stop the component with:

curl -u admin:admin -X PUT -H 'X-Requested-By:1' -d '{"RequestInfo":{"context":"Stop Component"},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://server:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/STORM_REST_API

The Ambari server log then states:

13 May 2015 16:42:16,329 ERROR [qtp-client-3745] AmbariManagementControllerImpl:924 - Unable to find service for component STORM_REST_API

The Hortonworks doc then states to delete the component with:

curl -u admin:admin -X DELETE -H 'X-Requested-By:1' http://server:8080/api/v1/clusters/helm/hosts/service-10-0.local/host_components/STORM_REST_API

The Ambari server log then states:

ERROR [qtp-client-4420] AbstractResourceProvider:338 - Caught AmbariException when modifying a resource org.apache.ambari.server.AmbariException: Could not find service for component, componentName=STORM_REST_API, clusterName=helm, stackInfo=HDP-2.2 at org.apache.ambari.server.controller.AmbariManagementControllerImpl.findServiceName(AmbariManagementControllerImpl.java:2316) at org.apache.ambari.server.controller.AmbariManagementControllerImpl.deleteHostComponents(AmbariManagementControllerImpl.java:2405)
(etc.....)

I then tried to delete the entire STORM service with:

curl -u admin:admin -X DELETE -H 'X-Requested-By:1' http://localhost:8080/api/v1/clusters/helm/services/STORM

This removed it from the Ambari dashboard, but not from the alerts, and a subsequent try to add it again with the Ambari add-service wizard failed due to non-unique key in ambari db, and a quick look in the db confirmed that STORM parts were still present in several tables.

Ambari server log for the above curl states:

13 May 2015 17:13:24,972 INFO [qtp-client-3745] ClusterImpl:1755 - Deleting service for cluster, clusterName=helm, serviceName=STORM 13 May 2015 17:13:24,973 INFO [qtp-client-3745] ServiceImpl:529 - Deleting all components for service, clusterName=helm, serviceName=STORM 13 May 2015 17:13:24,974 INFO [qtp-client-3745] ServiceComponentImpl:551 - Deleting all servicecomponenthosts for component, clusterName=helm, serviceName=STORM, componentName=STORM_UI_SERVER 13 May 2015 17:13:25,029 INFO [qtp-client-3745] ServiceComponentImpl:551 - Deleting all servicecomponenthosts for component, clusterName=helm, serviceName=STORM, componentName=SUPERVISOR 13 May 2015 17:13:25,382 INFO [qtp-client-3745] ServiceComponentImpl:551 - Deleting all servicecomponenthosts for component, clusterName=helm, serviceName=STORM, componentName=NIMBUS 13 May 2015 17:13:25,448 INFO [qtp-client-3745] ServiceComponentImpl:551 - Deleting all servicecomponenthosts for component, clusterName=helm, serviceName=STORM, componentName=DRPC_SERVER 13 May 2015 17:13:25,547 WARN [alert-event-bus-2] AlertReceivedListener:302 - Unable to process alert storm_supervisor_process for an invalid service STORM and component SUPERVISOR on host compute-10-0.local 13 May 2015 17:13:25,575 WARN [qtp-client-3745] ServletHandler:514 - /api/v1/clusters/helm/services/STORM javax.persistence.RollbackException: Transaction rolled back because transaction was set to RollbackOnly. at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:141) at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:91) at org.apache.ambari.server.state.cluster.ClusterImpl.deleteService(ClusterImpl.java:1763) at org.apache.ambari.server.controller.internal.ServiceResourceProvider.deleteServices(ServiceResourceProvider.java:934)
(etc.....)

continues with:

13 May 2015 17:13:25,597 WARN [alert-event-bus-1] AlertReceivedListener:302 - Unable to process alert storm_supervisor_process for an invalid service STORM and component SUPERVISOR on host compute-10-2.local 13 May 2015 17:13:25,741 WARN [alert-event-bus-2] AlertReceivedListener:302 - Unable to process alert storm_webui for an invalid service STORM and component STORM_UI_SERVER on host service-10-0.local 13 May 2015 17:13:25,753 WARN [alert-event-bus-2] AlertReceivedListener:302 - Unable to process alert storm_drpc_server for an invalid service STORM and component DRPC_SERVER on host service-10-0.local 13 May 2015 17:13:25,764 WARN [alert-event-bus-2] AlertReceivedListener:302 - Unable to process alert storm_server_process for an invalid service STORM and component STORM_UI_SERVER on host service-10-0.local 13 May 2015 17:13:27,257 WARN [alert-event-bus-1] AlertReceivedListener:302 - Unable to process alert storm_nimbus_process for an invalid service STORM and component NIMBUS on host service-10-1.local 13 May 2015 17:13:48,951 INFO [qtp-client-2980] ClusterImpl:1755 - Deleting service for cluster, clusterName=helm, serviceName=STORM 13 May 2015 17:13:48,955 INFO [qtp-client-2980] ServiceImpl:529 - Deleting all components for service, clusterName=helm, serviceName=STORM 13 May 2015 17:14:00,137 INFO [qtp-client-3745] PersistKeyValueService:82 - Looking for keyName user-pref-eithor-dashboard 13 May 2015 17:14:06,639 INFO [qtp-client-4421] PersistKeyValueService:82 - Looking for keyName CLUSTER_CURRENT_STATUS 13 May 2015 17:14:11,674 INFO [qtp-client-2081] PersistKeyValueService:82 - Looking for keyName user-pref-eithor-dashboard
13 May 2015 17:14:25,5



I also have a test cluster which is now left in the state prior to running any curl commands and that could be used for further testing.

To me it looks like the new HDP-2.2 stack doesn't know anything about STORM_REST_API and is thus out-of-sync on how to delete it. I see from the release-notes that this Storm component was moved into the Storm-ui-server in the latest stack version, and thus is no longer a dedicated service/daemon.

Any advice on how to proceed would be very welcome.


Thanks,

Eirik Thorsnes

Reply via email to