ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qing Chi 79624 <>
Subject Re: Is it OK to delete cluster through rest API?
Date Thu, 10 Jul 2014 01:23:27 GMT
It is OK to delete cluster through rest API. Stop cluster service before delete.

From: Emma Lin <<>>
Reply-To: <<>>
Date: Wed, 9 Jul 2014 07:44:08 +0000
To: "<>" <<>>
Cc: Qinghe Jin <<>>
Subject: Is it OK to delete cluster through rest API?

Forward this email to user group for help.


From: Qinghe Jin <<>>
Date: Wednesday, 9 July, 2014 3:00 pm
To: "<>" <<>>
Cc: Kevin Leong <<>>, Gavin Lu <<>>,
VMware <<>>
Subject: Cannot delete ambari cluster by rest api


I deployed ambari server with the following repo:<>

I can stop/start clusters using PUT, but when I try DELETE(curl -i -H 'X-Requested-By: myname'
-X DELETE --user admin:admin http://ambari-server:8080/api/v1/clusters/ambari2<>)
to delete cluster, I got the following the error:

HTTP/1.1 500 Server Error
Set-Cookie: AMBARISESSIONID=f9zpj5aq7ujhvjqaj8bsfac1;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Content-Length: 179
Server: Jetty(7.6.7.v20120910)

  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: An internal system
exception occurred: Could not delete cluster, clusterName=ambari2"

I got the same exception in my java code.

I had saw an link for the problem:<>

In the old link, it seems that the delete-cluster is forbidden on purpose. For the work around(run
ambari-server reset cmd), it's not easy for us to use directly. I wonder if there is other
ways to delete the cluster? Does I using the wrong way to delete the cluster? I just follow
the doc on this page:<>

If there is no other ways to delete the cluster, is there any plan to enable the rest api
in the future?


View raw message