[
https://issues.apache.org/jira/browse/AMBARI-14965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15139973#comment-15139973
]
Jayush Luniya commented on AMBARI-14965:
----------------------------------------
Committed to trunk
$ git log
commit 73fbe14c2a14619a5023ea0698cda72858c05fbe
Author: Jayush Luniya <[email protected]>
Date: Tue Feb 9 15:08:42 2016 -0800
AMBARI-14965: Ambari server lists service even though service creation
fails (Ajit Kumar via jluniya)
> 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
> Components: ambari-server
> Affects Versions: 2.2.0
> Reporter: Ajit Kumar
> Assignee: Ajit Kumar
> Fix For: 2.4.0
>
> Attachments: rb43349.patch
>
>
> 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)