Forward this email to user group for help. Thanks Emma
From: Qinghe Jin <[email protected]<mailto:[email protected]>> Date: Wednesday, 9 July, 2014 3:00 pm To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Cc: Kevin Leong <[email protected]<mailto:[email protected]>>, Gavin Lu <[email protected]<mailto:[email protected]>>, VMware <[email protected]<mailto:[email protected]>> Subject: Cannot delete ambari cluster by rest api Hi, I deployed ambari server with the following repo: http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.0/ambari.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: http://hortonworks.com/community/forums/topic/delete-cluster/ 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: https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md If there is no other ways to delete the cluster, is there any plan to enable the rest api in the future? Sincerely, Qinghe
