ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-20462) Duplicate entries in DB for auto_<view>_instance privileges upon Ambari server restart
Date Fri, 17 Mar 2017 19:18:42 GMT

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

Hudson commented on AMBARI-20462:
---------------------------------

FAILURE: Integrated in Jenkins build Ambari-trunk-Commit #7075 (See [https://builds.apache.org/job/Ambari-trunk-Commit/7075/])
AMBARI-20462. Duplicate entries in DB for auto_<view>_instance (rlevas: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=64b493c49bc7c6eac766e4194683441683f75d75])
* (edit) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrivilegeEntity.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/security/TestAuthenticationFactory.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AmbariPrivilegeResourceProviderTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
* (edit) ambari-server/src/test/resources/TestAmbaryServer.samples/dummy_stack/HIVE/package/.hash
* (edit) ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java


> Duplicate entries in DB for auto_<view>_instance privileges upon Ambari server
restart
> --------------------------------------------------------------------------------------
>
>                 Key: AMBARI-20462
>                 URL: https://issues.apache.org/jira/browse/AMBARI-20462
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.5.0
>            Reporter: Vivek Sharma
>            Assignee: Robert Levas
>            Priority: Critical
>              Labels: system_test
>             Fix For: 2.5.0
>
>         Attachments: AMBARI-20462_branch-2.5_01.patch, AMBARI-20462_branch-2.5_02.patch,
AMBARI-20462_trunk_01.patch, AMBARI-20462_trunk_02.patch
>
>
> When I create a new user from Ambari UI and let’s say give him ‘Cluster User’ role;
later go to Users page it shows the permissions as seen in the screenshot
> The UI display is fine, however when I make an API call like below
> /api/v1/users/tom/privileges?fields=*
>  
> It shows three entries for each auto_<view>_instance privilege. As an example:
for ‘AUTO_FILES_INSTANCE’ I see three entries like:
> api/v1/users/tom/privileges/6
> api/v1/users/tom/privileges/56
> api/v1/users/tom/privileges/106
>  
> and so on, so we have 16 entries (One for Cluster.User + 3 * privileges for each of five
View instances)
>  
> The same behavior is seen for groups too like: /api/v1/groups/gp1/privileges?fields=*

> *Example*
> It is expected that only one of the following rows exists:
> {noformat}
> ambaricustom=> select * from adminprivilege where privilege_id in (6, 56, 106);
> privilege_id | permission_id | resource_id | principal_id
> --------------+---------------+-------------+--------------
>             6 |             4 |          54 |            8
>            56 |             4 |          54 |            8
>           106 |             4 |          54 |            8
> (3 rows)
> {noformat}
>  
> * permission_id (4): VIEW.USER
> * resource_id (54): AUTO_FILES_INSTANCE
> * principal_id (8): CLUSTER.USER
> *Cause*
> When Ambari server restarts, it installs the automatically created view instances without
first checking to see if they have been previously created. Each restart of Ambari server
will create a new set of duplicated records.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message