You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2019/02/26 17:53:02 UTC

[jira] [Commented] (AMBARI-22643) AmbariServer will throw internal server error in case of post existing version_definition

    [ https://issues.apache.org/jira/browse/AMBARI-22643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16778284#comment-16778284 ] 

Hudson commented on AMBARI-22643:
---------------------------------

SUCCESS: Integrated in Jenkins build Ambari-trunk-Commit #10471 (See [https://builds.apache.org/job/Ambari-trunk-Commit/10471/])
AMBARI-22643. Trying to create some duplicate resources leads to HTTP (vishalsuvagia: [https://gitbox.apache.org/repos/asf?p=ambari.git&a=commit&h=cfe33291ec2aa2a5aea556e7f2d92512f691d447])
* (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CredentialResourceProvider.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserResourceProvider.java


> AmbariServer will throw internal server error in case of post existing version_definition
> -----------------------------------------------------------------------------------------
>
>                 Key: AMBARI-22643
>                 URL: https://issues.apache.org/jira/browse/AMBARI-22643
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.6.0
>            Reporter: Ferenc Schneider
>            Assignee: Doroszlai, Attila
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.8.0
>
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The following curl will result in 500 if post it more than once:
> {noformat}
> curl -vvv -u admin:admin -k -H "X-Requested-By:ambari" -X POST https://$AMBARI_SERVER/api/v1/version_definitions -d '{
>   "VersionDefinition": {
>    "version_url":
> "http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0/HDP-2.6.3.0-235.xml"
>     }
>   }'
> {noformat}
> The http response is:
> {noformat}
> {
>   "status" : 500,
>   "message" : "An internal system exception occurred: Base url http://public-repo-1.hortonworks.com/HDP/centos7/2.x/updates/2.6.3.0 is already defined for another repository version. Setting up base urls that contain the same versions of components will cause stack upgrade to fail."
> }
> {noformat}
> It would be better, if in this case the http response status would be {noformat}409 - Conflict{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)