Created 03-01-2018 10:19 PM
Hi
I am trying to delete a specific host (downscale with specific instance) from cluster and terminate the instance. I used Ambari rest API (https://cwiki.apache.org/confluence/display/AMBARI/Using+APIs+to+delete+a+service+or+all+host+components+on+a+host)
to
decommission the Node Manager
Stop All components
Delete all components
Delete Host
and used cloudbreak api to terminate the instance with stackId and instance Id. But it is failing with cause host is in Healthy state. (com.sequenceiq.cloudbreak.service.stack.flow.ScalingFailedException: Host (xxxx) is in HEALTHY state. Cannot be removed.)
I am not sure how cloudbreak is updating host status. Is it hitting any Ambari API to know the status? Is there any API available to delete the host from cloudbreak?
Thanks
Created 03-02-2018 06:41 PM
After some research into cloudbreak code base, i found out that, If we decommission hosts from ambari and give downscale in cloudbreak, it is going to delete the decommissioned hosts first. So, in the above scenario, after executing all Ambari APIs, if we use cloudbreak api for downscale, it automatically deletes the hosts we decommissioned. Following is the code from Cloudbreak to find out the instances to downscale.
for (InstanceMetaData metaData : instanceMetaDatas) { if (!metaData.getAmbariServer() && (metaData.isDecommissioned() || metaData.isUnRegistered() || metaData.isCreated() || metaData.isFailed())) { instanceIds.put(metaData.getInstanceId(), metaData.getDiscoveryFQDN()); if (++i >= scalingAdjustment * -1) { break; } } }
Created 03-05-2018 02:16 PM
@Sudhakara Vasiraju what version of cloudbreak do you use?
Created 03-05-2018 04:23 PM
If you remove the instance from the cloud provider and after this you sync the cluster in cloudbreak, the node will be removed automatically.
Created 03-21-2018 07:51 AM
Hi,
I am using cloudbreak version 2.4 GA and tried to resize the cluster to reduce few nodes. The cluster is in hung state where it says `update in progress`. the hosts have been removed from ambari and cloudbreak UI shows hosts as decommisioned . But its been hours the cluster did not change state(checked the cloud provider and instances still exist). Any help appreciated!