You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ambari.apache.org by Clark Breyman <cl...@breyman.com> on 2015/06/27 02:18:21 UTC

Creating a second cluster via REST api corrupts ambari configuration

While experimenting with the REST api, I attempted to create a second
cluster via POST to /api/v1/clusters/test. The result was having the
service is a corrupted state as follows:

- Clusters lists the second cluster I created with the status "cluster
creation is in progress". The original cluster and the third attempts were
not listed.
- All three clusters are listed in the popup associated with the Versions
"Install on" button.

I understand (now) that Ambari does not yet support multiple clusters but
it seems odd that the data model can be corrupted by an API operation.

Is there any way to fix my database without scraping and reprovisioning the
entire cluster?

Re: Creating a second cluster via REST api corrupts ambari configuration

Posted by Clark Breyman <cl...@breyman.com>.
Thanks Sumit. https://issues.apache.org/jira/browse/AMBARI-12181

The following steps seemed to have gotten the cluster back operational.

delete from clusterstate where cluster_id <> 2;
delete from alert_grouping where definition_id in (select definition_id
from alert_definition where cluster_id <> 2);
delete from alert_definition where cluster_id <> 2;



On Fri, Jun 26, 2015 at 5:43 PM, Sumit Mohanty <sm...@hortonworks.com>
wrote:

>  While it is possible the data model is indeed corrupt but more than
> likely there are sections of code that stop at the first cluster they see
> and that is creating some confusion. I think you can delete the
> second/third cluster from the cluster* tables and after a restart Ambari
> Server should get back in shape.
>
>
>  Tables to check ...
>
>
>  * clusters
>
> * clusterstate
>
> * cluster_version
>
> * clusterservices
>
> * clusterconfig
>
> * clusterhostmapping​
>
>
>  Also, please go ahead a create bugs based on your observation.
>  ------------------------------
> *From:* clarkbreyman@gmail.com <cl...@gmail.com> on behalf of
> Clark Breyman <cl...@breyman.com>
> *Sent:* Friday, June 26, 2015 5:18 PM
> *To:* user@ambari.apache.org
> *Subject:* Creating a second cluster via REST api corrupts ambari
> configuration
>
>  While experimenting with the REST api, I attempted to create a second
> cluster via POST to /api/v1/clusters/test. The result was having the
> service is a corrupted state as follows:
>
>  - Clusters lists the second cluster I created with the status "cluster
> creation is in progress". The original cluster and the third attempts were
> not listed.
> - All three clusters are listed in the popup associated with the Versions
> "Install on" button.
>
>  I understand (now) that Ambari does not yet support multiple clusters
> but it seems odd that the data model can be corrupted by an API operation.
>
>  Is there any way to fix my database without scraping and reprovisioning
> the entire cluster?
>

Re: Creating a second cluster via REST api corrupts ambari configuration

Posted by Sumit Mohanty <sm...@hortonworks.com>.
While it is possible the data model is indeed corrupt but more than likely there are sections of code that stop at the first cluster they see and that is creating some confusion. I think you can delete the second/third cluster from the cluster* tables and after a restart Ambari Server should get back in shape.


Tables to check ...


* clusters

* clusterstate

* cluster_version

* clusterservices

* clusterconfig

* clusterhostmapping?


Also, please go ahead a create bugs based on your observation.

________________________________
From: clarkbreyman@gmail.com <cl...@gmail.com> on behalf of Clark Breyman <cl...@breyman.com>
Sent: Friday, June 26, 2015 5:18 PM
To: user@ambari.apache.org
Subject: Creating a second cluster via REST api corrupts ambari configuration

While experimenting with the REST api, I attempted to create a second cluster via POST to /api/v1/clusters/test. The result was having the service is a corrupted state as follows:

- Clusters lists the second cluster I created with the status "cluster creation is in progress". The original cluster and the third attempts were not listed.
- All three clusters are listed in the popup associated with the Versions "Install on" button.

I understand (now) that Ambari does not yet support multiple clusters but it seems odd that the data model can be corrupted by an API operation.

Is there any way to fix my database without scraping and reprovisioning the entire cluster?