Hi,

  I'm working on the Savanna HDP plugin, currently working on the capability to 
scale a cluster (add hosts, remove hosts).  The current approach to adding a 
host is to:

  1)  Install the ambari agent on the host
  2)  start the ambari agent 
  3) register the host
  4)  add the required host components (based on the node group to which it is 
being added)
  5)  install components (transition state from INIT to INSTALLED)
  6)  start the components (transition state from INSTALLED to STARTED)

  I have a couple of questions regarding this approach:

  1)  Is it the ideal approach?  Is there a more direct way of interacting with 
ambari to provision a new host?

  2)  I am having an issue with the final step.  During the invocation I get 
the following error:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 Invalid desired state for a client component</title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing 
/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal/host_components.
 Reason:
<pre>    Invalid desired state for a client component</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>

  The mix of components that are in the installed state is:

{
  "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal/host_components?HostRoles/state=INSTALLED";,
  "items" : [
    {
      "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal/host_components/DATANODE";,
      "HostRoles" : {
        "cluster_name" : "my-cluster",
        "component_name" : "DATANODE",
        "state" : "INSTALLED",
        "host_name" : "my-cluster-slave-003.novalocal"
      },
      "host" : {
        "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal";
      }
    },
    {
      "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal/host_components/MAPREDUCE_CLIENT";,
      "HostRoles" : {
        "cluster_name" : "my-cluster",
        "component_name" : "MAPREDUCE_CLIENT",
        "state" : "INSTALLED",
        "host_name" : "my-cluster-slave-003.novalocal"
      },
      "host" : {
        "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal";
      }
    },
    {
      "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal/host_components/HDFS_CLIENT";,
      "HostRoles" : {
        "cluster_name" : "my-cluster",
        "component_name" : "HDFS_CLIENT",
        "state" : "INSTALLED",
        "host_name" : "my-cluster-slave-003.novalocal"
      },
      "host" : {
        "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal";
      }
    },
    {
      "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal/host_components/GANGLIA_MONITOR";,
      "HostRoles" : {
        "cluster_name" : "my-cluster",
        "component_name" : "GANGLIA_MONITOR",
        "state" : "INSTALLED",
        "host_name" : "my-cluster-slave-003.novalocal"
      },
      "host" : {
        "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal";
      }
    },
    {
      "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal/host_components/TASKTRACKER";,
      "HostRoles" : {
        "cluster_name" : "my-cluster",
        "component_name" : "TASKTRACKER",
        "state" : "INSTALLED",
        "host_name" : "my-cluster-slave-003.novalocal"
      },
      "host" : {
        "href" : 
"http://172.18.3.5:8080/api/v1/clusters/my-cluster/hosts/my-cluster-slave-003.novalocal";
      }
    }
  ]
}

  So it appears that "CLIENT" components are not transitioned into the STARTED 
state?  Do I need to iterate thru these and avoid starting components with 
CLIENT in their name?

-- Jon
-- 
CONFIDENTIALITY NOTICE
NOTICE: This message is intended for the use of the individual or entity to 
which it is addressed and may contain information that is confidential, 
privileged and exempt from disclosure under applicable law. If the reader 
of this message is not the intended recipient, you are hereby notified that 
any printing, copying, dissemination, distribution, disclosure or 
forwarding of this communication is strictly prohibited. If you have 
received this communication in error, please contact the sender immediately 
and delete it from your system. Thank You.

Reply via email to