[
https://issues.apache.org/jira/browse/AMBARI-14965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15140168#comment-15140168
]
Hudson commented on AMBARI-14965:
---------------------------------
SUCCESS: Integrated in Ambari-trunk-Commit #4302 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/4302/])
AMBARI-14965: Ambari server lists service even though service creation
(jluniya:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=73fbe14c2a14619a5023ea0698cda72858c05fbe])
*
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
> 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)