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 2018/07/23 18:55:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=16553258#comment-16553258 ] 

Hudson commented on AMBARI-24333:
---------------------------------

SUCCESS: Integrated in Jenkins build Ambari-trunk-Commit #9668 (See [https://builds.apache.org/job/Ambari-trunk-Commit/9668/])
[AMBARI-24333] Raising an error when user is trying to create a view URL (github: [https://gitbox.apache.org/repos/asf?p=ambari.git&a=commit&h=e374842ba7a9dda0a44c274dba77fbb9bd59efa1])
* (edit) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewURLResourceProviderTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewURLDAO.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewURLResourceProvider.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewURLEntity.java


> 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: 1h 20m
>  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)