ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emma Lin <l...@vmware.com>
Subject Re: Is it OK to delete cluster through rest API?
Date Thu, 10 Jul 2014 01:49:47 GMT
Will try it. Thanks for your response.
Thanks
Emma

From: Qing Chi 79624 <chiq@vmware.com<mailto:chiq@vmware.com>>
Reply-To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" <user@ambari.apache.org<mailto:user@ambari.apache.org>>
Date: Thursday, 10 July, 2014 9:23 am
To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" <user@ambari.apache.org<mailto:user@ambari.apache.org>>
Cc: Qinghe Jin <qjin@vmware.com<mailto:qjin@vmware.com>>
Subject: Re: Is it OK to delete cluster through rest API?

It is OK to delete cluster through rest API. Stop cluster service before delete.

From: Emma Lin <line@vmware.com<mailto:line@vmware.com>>
Reply-To: <user@ambari.apache.org<mailto:user@ambari.apache.org>>
Date: Wed, 9 Jul 2014 07:44:08 +0000
To: "user@ambari.apache.org<mailto:user@ambari.apache.org>" <user@ambari.apache.org<mailto:user@ambari.apache.org>>
Cc: Qinghe Jin <qjin@vmware.com<mailto:qjin@vmware.com>>
Subject: Is it OK to delete cluster through rest API?

Forward this email to user group for help.

Thanks
Emma

From: Qinghe Jin <qjin@vmware.com<mailto:qjin@vmware.com>>
Date: Wednesday, 9 July, 2014 3:00 pm
To: "dev@ambari.apache.org<mailto:dev@ambari.apache.org>" <dev@ambari.apache.org<mailto:dev@ambari.apache.org>>
Cc: Kevin Leong <kleong@vmware.com<mailto:kleong@vmware.com>>, Gavin Lu <gguanglu@vmware.com<mailto:gguanglu@vmware.com>>,
VMware <line@vmware.com<mailto:line@vmware.com>>
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<https://urldefense.proofpoint.com/v1/url?u=http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.6.0/ambari.repo&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=XFPetyuh5lGv3twiMNs7nw%3D%3D%0A&m=l%2BIbMLSruiJW8dyKO0M%2F7b3eOfOaL6qcy1BIL4i1Hfc%3D%0A&s=fff852109a4329fc1aa85f0ced00ab5a890d589b4fcb77bda5ed0ded15968158>

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<https://urldefense.proofpoint.com/v1/url?u=http://ambari-server:8080/api/v1/clusters/ambari2&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=XFPetyuh5lGv3twiMNs7nw%3D%3D%0A&m=l%2BIbMLSruiJW8dyKO0M%2F7b3eOfOaL6qcy1BIL4i1Hfc%3D%0A&s=f97dc6b438fde1d69e06c18960d918bc0977cce5fb8f18c06c9c3ffc9168c079>)
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/<https://urldefense.proofpoint.com/v1/url?u=http://hortonworks.com/community/forums/topic/delete-cluster/&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=XFPetyuh5lGv3twiMNs7nw%3D%3D%0A&m=l%2BIbMLSruiJW8dyKO0M%2F7b3eOfOaL6qcy1BIL4i1Hfc%3D%0A&s=ebac7b4a206f152eff1222e05c7b073dcc19d98ec9766d8add73b31e4806ed9f>

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<https://urldefense.proofpoint.com/v1/url?u=https://github.com/apache/ambari/blob/trunk/ambari-server/docs/api/v1/index.md&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=XFPetyuh5lGv3twiMNs7nw%3D%3D%0A&m=l%2BIbMLSruiJW8dyKO0M%2F7b3eOfOaL6qcy1BIL4i1Hfc%3D%0A&s=0f17fdc28c3ded7a2eed45b8524f707426121ec17df01fddfce92447f1a83938>

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


Sincerely,
Qinghe

Mime
View raw message