You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Ferenc Schneider (JIRA)" <ji...@apache.org> on 2017/12/13 15:50:02 UTC

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

Ferenc Schneider created AMBARI-22643:
-----------------------------------------

             Summary: 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


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 -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
(v6.4.14#64029)