You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Sandor Molnar (JIRA)" <ji...@apache.org> on 2018/07/25 21:57:00 UTC

[jira] [Resolved] (AMBARI-24333) User is able to set the same short URLs for different view instances

     [ https://issues.apache.org/jira/browse/AMBARI-24333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sandor Molnar resolved AMBARI-24333.
------------------------------------
    Resolution: Fixed

> 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
>            Priority: Critical
>              Labels: pull-request-available
>             Fix For: 2.7.1
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> *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)