brooklyncentral/brooklyn-ambari

Can not add host to cluster

ikercrg opened this issue · 3 comments

I create the whole application (Ambari Server, Ambari cluster and 2 nodes).
With the efector, I resize the cluster with an extra node (I can see 3 nodes) --> entity.fqdn: r36misj7.ambari.local

When I tried to add the new node to the server (with the sensor addHostToCluster and the parameters Cluster1 and r36misj7.ambari.local), I always get:

Error invoking addHostToCluster at AmbariServerImpl{id=E76212t7}: io.brooklyn.ambari.rest.AmbariApiException: Unacceptable Response Code from Ambari Rest API {
"status" : 400,
"message" : "Attempted to add unknown hosts to a cluster. These hosts have not been registered with the server: r36misj7.ambari.local"
}

I try this and have the same error. If I use the resize effector to add one Node to the Ambari Cluster Entity the Entry for the Ambari Server is missing in the Ambari Agent /etc/hosts. If I add the host entry manual to the Ambari Agent hosts file it is working. In the other Ambari Agents this entry was automaticly created by deploment. This problem only existis if you create a new Ambari Agent after the Implementation of the Ambari Cluster is finished.

Indeed, the resize effector needs to be extended to talk with the Ambari REST API in order to registrer (or remove) an host to the Ambari server while Brooklyn spins up another VM.

This is something we will work on shortly.

I should mention that the PR #49 only makes hosts being able to communicate between themselves.

It does not register the new hosts on the server automatically so you still need to call the effector addHostToCluster. This will come later.