> On March 18, 2018, 2:02 a.m., Madhan Neethiraj wrote:
> > security-admin/src/main/java/org/apache/ranger/patch/PatchForAtlasServiceDefUpdate_J10013.java
> > Lines 90 (patched)
> > <https://reviews.apache.org/r/66085/diff/1/?file=1979423#file1979423line90>
> >
> >     Why is it critical to bail out when "serviceId != 11"? If the intention 
> > is to avoid rename on multiple runs of this patch, then I would suggest to 
> > check for resource-names and access-types to determine if the service-def 
> > is older version or not. If the service-def has all resources and 
> > accessTypes listed below, then it is an older service-def and should be 
> > renamed:
> >     
> >      - resources: entity, type, operation, taxonomy, term
> >      - accessTypes: read, create, update, delete, all

In Case of fresh install its possible that new service def is already created 
before the execution of this patch. So skip the renaming of newer version of 
service def, I added that line to process only older service def, but you are 
right that we should check the resources and access types rather  the ID.


- Pradeep


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66085/#review199382
-----------------------------------------------------------


On March 17, 2018, 9:33 p.m., Pradeep Agrawal wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66085/
> -----------------------------------------------------------
> 
> (Updated March 17, 2018, 9:33 p.m.)
> 
> 
> Review request for ranger, bhavik patel, Gautam Borad, Abhay Kulkarni, Madhan 
> Neethiraj, Mehul Parikh, Ramesh Mani, Sailaja Polavarapu, and Velmurugan 
> Periasamy.
> 
> 
> Bugs: RANGER-2019
>     https://issues.apache.org/jira/browse/RANGER-2019
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> **Problem Statement:** Based on this RANGER-2004 commit, Atlas service def is 
> updated. During the upgrade of existing env, old Atlas service def should be 
> renamed so that new service def can be used.
> 
> **Proposed Solution:** Proposed Java patch can address the atlas service def 
> rename fix. During migration to latest Ranger, this Java patch should do the 
> following:
> 1. Check for service-def named 'atlas'. If it is not found - nothing more to 
> do.
> 2. Rename all service instances of type 'atlas', with addition of suffix 
> "-v1". Existing service named 'cl1_atlas' will become 'cl1_atlas-v1'. If 
> 'cl1_atlas-v1' already exists, append an count like 'cl1_atlas-v1.1', 
> 'cl1_atlas-v1.2'
> 3. After all service instances are renamed, rename service-def as 'atlas-v1'.
> 
> **Note:** In Upgrade case, as the old atlas service def id can't be used to 
> create the new atlas service def so I am proposing change to update the atlas 
> servicedef id from 11 to 15.
> 
> 
> Diffs
> -----
> 
>   agents-common/src/main/resources/service-defs/ranger-servicedef-atlas.json 
> 2891129 
>   
> security-admin/src/main/java/org/apache/ranger/patch/PatchForAtlasServiceDefUpdate_J10013.java
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/66085/diff/1/
> 
> 
> Testing
> -------
> 
> Tested for fresh and upgrade case.
> 
> 
> Thanks,
> 
> Pradeep Agrawal
> 
>

Reply via email to