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




security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java
Line 4408 (original), 4408 (patched)
<https://reviews.apache.org/r/74840/#comment314426>

    To avoid creation of one tag service per resource service, I suggest to use 
linkedServiceType as the tag service name. Consider replacing #4408 with the 
following:
    
     ret = (lastIndexOfSep != -1) ? resourceServiceName.substring(0, 
lastIndexOfSep) + SEP + linkedServiceType : linkedServiceType;


- Madhan Neethiraj


On Jan. 17, 2024, 11:27 a.m., Siddhesh Phatak wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/74840/
> -----------------------------------------------------------
> 
> (Updated Jan. 17, 2024, 11:27 a.m.)
> 
> 
> Review request for ranger, Anand Nadar, Ankita Sinha, Madhan Neethiraj, 
> Monika Kachhadiya, Prashant Satam, and Subhrat Chaudhary.
> 
> 
> Bugs: RANGER-4660
>     https://issues.apache.org/jira/browse/RANGER-4660
> 
> 
> Repository: ranger
> 
> 
> Description
> -------
> 
> When we create a service, a linked tag service also gets created for the 
> same. While doing so, ranger generates a name for the tag service based on 
> the service name. In this, ranger replaces word after the last underscore 
> with 'tag'. If the name does not contain any underscore, it returns null. Due 
> to this, ranger tries to create a tag service with name null. This causes 
> errors and service creation takes lot of time because of this.
> 
> 
> Diffs
> -----
> 
>   security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 
> f9fd4941e 
> 
> 
> Diff: https://reviews.apache.org/r/74840/diff/1/
> 
> 
> Testing
> -------
> 
> After the changes, created service mytestknox and a tag service 
> mytestknox_tag also got created successfully.
> Steps to check
> 1) On ranger UI, click on add new service.
> 2) Service should get created successfully.
> 3) Click on tag tab. A tag service associated with our created service will 
> be also creted.
> 
> 
> Thanks,
> 
> Siddhesh Phatak
> 
>

Reply via email to