Ajit Kumar created AMBARI-14965:
-----------------------------------
Summary: Ambari server lists service even though service creation
fails
Key: AMBARI-14965
URL: https://issues.apache.org/jira/browse/AMBARI-14965
Project: Ambari
Issue Type: Bug
Reporter: Ajit Kumar
Assignee: Ajit Kumar
If post request of service creation fails due to db error, Get request shows
service is created. If you send post request again, it fails stating service
already exists though DB doesn't have any corresponding entry.
{code}
$ curl -u admin:admin -H 'X-Requested-By: ambari' -X POST
http://c6401.ambari.apache.org:8080/api/v1/clusters/a/services/ZOOKEEPER
{
"status": 500,
"message": "Server Error"
}
$ curl -u admin:admin -H 'X-Requested-By: ambari' -X GET
http://c6401.ambari.apache.org:8080/api/v1/clusters/a/services/
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/a/services/",
"items" : [
{
"href" :
"http://c6401.ambari.apache.org:8080/api/v1/clusters/a/services/ZOOKEEPER",
"ServiceInfo" : {
"cluster_name" : "a",
"service_name" : "ZOOKEEPER"
}
}
]
}
{code}
{code}
ambari=> select * from ambari.clusterservices;
service_instance_id | service_name | service_instance_name | cluster_id |
service_enabled
---------------------+--------------+-----------------------+------------+-----------------
(0 rows)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)