Sandor Molnar created AMBARI-24333:
--------------------------------------

             Summary: User is able to set the same short URLs for different 
view instances
                 Key: AMBARI-24333
                 URL: https://issues.apache.org/jira/browse/AMBARI-24333
             Project: Ambari
          Issue Type: Bug
          Components: ambari-server
    Affects Versions: 2.7.0
            Reporter: Sandor Molnar
            Assignee: Sandor Molnar
             Fix For: 2.7.1


*STR*
 # Let's say the user has CAPACITY-SCHEDULER view instance with 
{{/main/view/CAPACITY-SCHEDULER/auto_cs_instance}} short URL set
 # Clone this instance or create another CAPACITY-SCHEDULER instance manually
 # Set the same short URL as for the first instance

*Result*
 - If 'Name' property is the same, request for adding new URL fails
request:
{noformat}
POST api/v1/view/urls/auto_cs_instance

{
    "ViewUrlInfo": {
        "url_name": "auto_cs_instance",
        "url_suffix": "auto_cs_instance",
        "view_instance_version": "1.0.0",
        "view_instance_name": "AUTO_CS_INSTANCE_Copy",
        "view_instance_common_name": "CAPACITY-SCHEDULER"
    }
}
{noformat}
response:
{noformat}
{
  "status" : 500,
  "message" : "An internal system exception occurred: This view URL name 
exists, URL names should be unique"
}
{noformat}

 - If name is different, the REST call succeeds even if URL itself is duplicate:
{noformat}
POST api/v1/view/urls/auto_cs_instance1

{
    "ViewUrlInfo": {
        "url_name": "auto_cs_instance1",
        "url_suffix": "auto_cs_instance",
        "view_instance_version": "1.0.0",
        "view_instance_name": "AUTO_CS_INSTANCE_Copy",
        "view_instance_common_name": "CAPACITY-SCHEDULER"
    }
}
{noformat}
response is 201 in this case; URL is created

 - As result there are two view instances with the same URL, and the first one 
is no longer accessible by this URL
 



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

Reply via email to