-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57123/#review167156
-----------------------------------------------------------
In addition to changes in this patch, Consider moving line 1491 in
ServiceDBStore.java:
List<XXTrxLog> trxLogList = svcService.getTransactionLog(service, existing,
RangerServiceService.OPERATION_UPDATE_CONTEXT)
to after line 1507, preferably just before line 1532:
if(populateExistingBaseFields) {
This is to ensure that for old clients, the setting of tagServiceName in new
RangerService object, if required, is performed by line 1502:
service.setTagService(newTagServiceName);
and transaction-log contains correct values in the case of old client.
- Abhay Kulkarni
On Feb. 28, 2017, 6:53 a.m., Pradeep Agrawal wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57123/
> -----------------------------------------------------------
>
> (Updated Feb. 28, 2017, 6:53 a.m.)
>
>
> Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay
> Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Selvamohan Neethiraj,
> Sailaja Polavarapu, and Velmurugan Periasamy.
>
>
> Bugs: RANGER-1407
> https://issues.apache.org/jira/browse/RANGER-1407
>
>
> Repository: ranger
>
>
> Description
> -------
>
> **Problem Statement:** If a Ranger service is updated to change its
> associated tag service name, then the service-update transaction log is not
> generated.
>
> **Proposed Solution :** 'tagService' attribute of RangerService class need to
> be enabled for logging the changes in value of this attribute in
> RangerServiceService class.
>
>
> Diffs
> -----
>
>
> security-admin/src/main/java/org/apache/ranger/service/RangerServiceService.java
> 004524b
>
> Diff: https://reviews.apache.org/r/57123/diff/
>
>
> Testing
> -------
>
> **Steps performed with patch : **
> 1. Installed and Started Ranger admin.
> 2. Created hdfs service 'hdfsdev'
> 3. Created Tagbased service 'tagdev'
> 4. Clicked on edit button of 'hdfsdev' service and updated tag service name
> to 'tagdev'
> 5. tag service name 'tagdev' got updated in 'hdfsdev'
> 6. visited Audit menu->Admin tab to check whether log for the tag service
> name update event is appearing or not.
>
> **Expected Behaviour : **
> Tag service name update log should appear under the Admin tab.
>
> **Actual Behaviour : **
> 1. Tag service name update log was appearring under the Admin tab and after
> clicking on the log was able to see log details like given below :
>
> Fields : Tag Service Name
> Old Value : --
> New Value :tagdev
>
> 2. Created tag service 'tagdev1' and after changing tag service name of
> 'hdfsdev' to 'tagdev1 was able to see log details like given below :
>
> Fields : Tag Service Name
> Old Value : tagdev
> New Value :tagdev1
>
> 3. Also was able to see logs of removal of tag service name 'tagdev1' from
> service 'hdfsdev' like given below :
> Fields : Tag Service Name
> Old Value : tagdev1
> New Value : --
>
>
> Thanks,
>
> Pradeep Agrawal
>
>