Pivotal Knowledge Base

Follow

Delete Option is Disabled when Removing HAWQ Segment from Ambari 2.4 UI

Environment

 Product  Version
 HDP  2.4
 Pivotal HDB  1.3.x
 Ambari  2.4

Purpose

Ambari 2.4 UI presents the user with an option to delete HAWQ services on segments. While deleting HAWQ segment from a host, sometimes the DELETE option is grayed out and disabled as shown in the image below. This article explains the cause of the delete option getting disabled. Also, it touches upon the concept of auto recovery in Ambari.

The auto recovery process has a completely different implementation for versions before Ambari 2.4. This article is specific to version 2.4 and later. To delve into Ambari's auto recovery feature, please refer to Recovery: Auto Start Components.

Cause

Ambari auto start is a feature that enables certain components to be marked for the auto start so that whenever a node restarts, the Ambari agent automatically restarts the stopped components. Auto start of a component is based on its current state and desired state.

In this scenario, the affected host was restarted and auto recovery kicked in. Auto recovery started the stopped components and marked its desired state to STARTED for this HAWQ segment. This can be seen in Ambari agent log from the affected server. The message is logged as shown below -

INFO 2016-11-14 14:22:51,944 RecoveryManager.py:204 - New status, desired status is set to STARTED for HAWQSEGMENT

Resolution

Remove the segment on the affected host using Ambari API calls.

NOTE: This process assumes that the necessary backup has been taken before removing the segment. Do confirm this before proceeding further.

This is the process to be followed:

1. Stop the HAWQ segment -

curl -u admin:admin -H "X-Requested-By: ambari" -X PUT -d '{"RequestInfo":{"context":"Stop Component"},"Body":{"HostRoles":{"state":"INSTALLED"}}}' http://<AMBARI_SERVER>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/<AFFECTED_HOST>/host_components/HAWQSEGMENT

2. Delete the HAWQ segment from the affected host -

curl -u admin:admin -H "X-Requested-By: ambari" -X DELETE http://<AMBARI_SERVER>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/<AFFECTED_HOST>/host_components/HAWQSEGMENT

3. The segment should be deleted now.

 

 

Comments

Powered by Zendesk