Re: Review Request 73363: RANGER-3291: NPE in BasePlugin if the first policy download contains no policies and no policy-deltas
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73363/#review223019 --- Ship it! Ship It! - Madhan Neethiraj On May 20, 2021, 9:03 p.m., Abhay Kulkarni wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73363/ > --- > > (Updated May 20, 2021, 9:03 p.m.) > > > Review request for ranger, Madhan Neethiraj, Mahesh Bandal, Ramesh Mani, > Sailaja Polavarapu, and Velmurugan Periasamy. > > > Bugs: RANGER-3291 > https://issues.apache.org/jira/browse/RANGER-3291 > > > Repository: ranger > > > Description > --- > > This issue is seen only if incremental policy downloads are enabled. If the > first ever policy download request made by the service returns no policies or > policy-deltas (because ranger repository does not contain any policies), then > the policy-engine's value remains null. This causes any subsequent > incremental downloads to fail with NPE. > > The fix is if the policy-engine does not require any update after policy > download, then ensure that it is initialized with default-service-policies. > > > Diffs > - > > > agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java > 0aab80945 > security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java > 2369f4193 > > > Diff: https://reviews.apache.org/r/73363/diff/2/ > > > Testing > --- > > Passes all unit tests. > > > Thanks, > > Abhay Kulkarni > >
Re: Review Request 73363: RANGER-3291: NPE in BasePlugin if the first policy download contains no policies and no policy-deltas
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73363/ --- (Updated May 20, 2021, 9:03 p.m.) Review request for ranger, Madhan Neethiraj, Mahesh Bandal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy. Changes --- Ensure that policyVersion is set correctly in the default service policies. Bugs: RANGER-3291 https://issues.apache.org/jira/browse/RANGER-3291 Repository: ranger Description --- This issue is seen only if incremental policy downloads are enabled. If the first ever policy download request made by the service returns no policies or policy-deltas (because ranger repository does not contain any policies), then the policy-engine's value remains null. This causes any subsequent incremental downloads to fail with NPE. The fix is if the policy-engine does not require any update after policy download, then ensure that it is initialized with default-service-policies. Diffs (updated) - agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java 0aab80945 security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 2369f4193 Diff: https://reviews.apache.org/r/73363/diff/2/ Changes: https://reviews.apache.org/r/73363/diff/1-2/ Testing --- Passes all unit tests. Thanks, Abhay Kulkarni
Re: Review Request 73363: RANGER-3291: NPE in BasePlugin if the first policy download contains no policies and no policy-deltas
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73363/#review223018 --- Ship it! Ship It! - Velmurugan Periasamy On May 20, 2021, 8:23 p.m., Abhay Kulkarni wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73363/ > --- > > (Updated May 20, 2021, 8:23 p.m.) > > > Review request for ranger, Madhan Neethiraj, Mahesh Bandal, Ramesh Mani, > Sailaja Polavarapu, and Velmurugan Periasamy. > > > Bugs: RANGER-3291 > https://issues.apache.org/jira/browse/RANGER-3291 > > > Repository: ranger > > > Description > --- > > This issue is seen only if incremental policy downloads are enabled. If the > first ever policy download request made by the service returns no policies or > policy-deltas (because ranger repository does not contain any policies), then > the policy-engine's value remains null. This causes any subsequent > incremental downloads to fail with NPE. > > The fix is if the policy-engine does not require any update after policy > download, then ensure that it is initialized with default-service-policies. > > > Diffs > - > > > agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java > 0aab80945 > security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java > 2369f4193 > > > Diff: https://reviews.apache.org/r/73363/diff/1/ > > > Testing > --- > > Passes all unit tests. > > > Thanks, > > Abhay Kulkarni > >
Review Request 73363: RANGER-3291: NPE in BasePlugin if the first policy download contains no policies and no policy-deltas
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73363/ --- Review request for ranger, Madhan Neethiraj, Mahesh Bandal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy. Bugs: RANGER-3291 https://issues.apache.org/jira/browse/RANGER-3291 Repository: ranger Description --- This issue is seen only if incremental policy downloads are enabled. If the first ever policy download request made by the service returns no policies or policy-deltas (because ranger repository does not contain any policies), then the policy-engine's value remains null. This causes any subsequent incremental downloads to fail with NPE. The fix is if the policy-engine does not require any update after policy download, then ensure that it is initialized with default-service-policies. Diffs - agents-common/src/main/java/org/apache/ranger/plugin/service/RangerBasePlugin.java 0aab80945 security-admin/src/main/java/org/apache/ranger/rest/ServiceREST.java 2369f4193 Diff: https://reviews.apache.org/r/73363/diff/1/ Testing --- Passes all unit tests. Thanks, Abhay Kulkarni
[jira] [Created] (RANGER-3291) NPE in BasePlugin if the first policy download contains no policies and no policy-deltas
Abhay Kulkarni created RANGER-3291: -- Summary: NPE in BasePlugin if the first policy download contains no policies and no policy-deltas Key: RANGER-3291 URL: https://issues.apache.org/jira/browse/RANGER-3291 Project: Ranger Issue Type: Bug Components: Ranger Reporter: Abhay Kulkarni Assignee: Abhay Kulkarni This issue is seen only if incremental policy downloads are enabled. If the first ever policy download request made by the service returns no policies or policy-deltas (because ranger repository does not contain any policies), then the policy-engine's value remains null. This causes any subsequent incremental downloads to fail with NPE. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (RANGER-3287) Implement best practices for logging
[ https://issues.apache.org/jira/browse/RANGER-3287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vishal Suvagia updated RANGER-3287: --- Attachment: RANGER-3287.01.patch > Implement best practices for logging > > > Key: RANGER-3287 > URL: https://issues.apache.org/jira/browse/RANGER-3287 > Project: Ranger > Issue Type: Bug > Components: admin >Affects Versions: 3.0.0, 2.2.0 >Reporter: Vishal Suvagia >Assignee: Vishal Suvagia >Priority: Major > Attachments: RANGER-3287.01.patch, RANGER-3287.patch > > > Implement best practice. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (RANGER-3290) ArrayIndexOutOfBoundsException if solr is down
[ https://issues.apache.org/jira/browse/RANGER-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17348603#comment-17348603 ] Abhay Kulkarni commented on RANGER-3290: [~asalamon74] Please consider changing if (nodes.size() == 0) { to if (CollectionUtils.isEmpty(nodes)) { > ArrayIndexOutOfBoundsException if solr is down > -- > > Key: RANGER-3290 > URL: https://issues.apache.org/jira/browse/RANGER-3290 > Project: Ranger > Issue Type: Improvement > Components: audit >Reporter: Andras Salamon >Priority: Minor > Attachments: RANGER-3290-01.patch > > > [SolrCollectionBootstrapper|https://github.com/apache/ranger/blob/master/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/SolrCollectionBootstrapper.java] > uploads a config to solr and creates a collection. > If solr is down (there are no live servers) during the collection creation > phase, we got a meaningful error message (from catalina.out): > {noformat}May 19, 2021 4:37:44 PM > org.apache.ranger.server.tomcat.SolrCollectionBootstrapper getCollections > SEVERE: getCollections() operation failed : > org.apache.solr.client.solrj.SolrServerException: No live SolrServers > available to handle this request{noformat} > On the other hand, if solr is down during the config upload phase the error > message is not too useful: > {noformat}May 20, 2021 8:07:59 AM > org.apache.ranger.server.tomcat.SolrCollectionBootstrapper uploadConfiguration > SEVERE: Error while uploading configs : > java.lang.ArrayIndexOutOfBoundsException: 0{noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
Re: Review Request 73360: RANGER-3287 : Implement best practices for logging.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73360/#review223016 --- Ship it! Ship It! - Abhay Kulkarni On May 20, 2021, 12:15 p.m., Vishal Suvagia wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73360/ > --- > > (Updated May 20, 2021, 12:15 p.m.) > > > Review request for ranger, Ankita Sinha, Dhaval Shah, Dineshkumar Yadav, > Gautam Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Madhan > Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, > and Velmurugan Periasamy. > > > Bugs: RANGER-3287 > https://issues.apache.org/jira/browse/RANGER-3287 > > > Repository: ranger > > > Description > --- > > Implement best practices for logging > > > Diffs > - > > security-admin/src/main/java/org/apache/ranger/common/PropertiesUtil.java > fb892d5c1c3ea6a2b8b74db4d09a886cf1363187 > > > Diff: https://reviews.apache.org/r/73360/diff/2/ > > > Testing > --- > > Validated changes locally. > > > Thanks, > > Vishal Suvagia > >
Re: Review Request 73360: RANGER-3287 : Implement best practices for logging.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73360/#review223015 --- Ship it! Ship It! - Ramesh Mani On May 20, 2021, 12:15 p.m., Vishal Suvagia wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73360/ > --- > > (Updated May 20, 2021, 12:15 p.m.) > > > Review request for ranger, Ankita Sinha, Dhaval Shah, Dineshkumar Yadav, > Gautam Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Madhan > Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, > and Velmurugan Periasamy. > > > Bugs: RANGER-3287 > https://issues.apache.org/jira/browse/RANGER-3287 > > > Repository: ranger > > > Description > --- > > Implement best practices for logging > > > Diffs > - > > security-admin/src/main/java/org/apache/ranger/common/PropertiesUtil.java > fb892d5c1c3ea6a2b8b74db4d09a886cf1363187 > > > Diff: https://reviews.apache.org/r/73360/diff/2/ > > > Testing > --- > > Validated changes locally. > > > Thanks, > > Vishal Suvagia > >
[jira] [Updated] (RANGER-3290) ArrayIndexOutOfBoundsException if solr is down
[ https://issues.apache.org/jira/browse/RANGER-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andras Salamon updated RANGER-3290: --- Attachment: RANGER-3290-01.patch > ArrayIndexOutOfBoundsException if solr is down > -- > > Key: RANGER-3290 > URL: https://issues.apache.org/jira/browse/RANGER-3290 > Project: Ranger > Issue Type: Improvement > Components: audit >Reporter: Andras Salamon >Priority: Minor > Attachments: RANGER-3290-01.patch > > > [SolrCollectionBootstrapper|https://github.com/apache/ranger/blob/master/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/SolrCollectionBootstrapper.java] > uploads a config to solr and creates a collection. > If solr is down (there are no live servers) during the collection creation > phase, we got a meaningful error message (from catalina.out): > {noformat}May 19, 2021 4:37:44 PM > org.apache.ranger.server.tomcat.SolrCollectionBootstrapper getCollections > SEVERE: getCollections() operation failed : > org.apache.solr.client.solrj.SolrServerException: No live SolrServers > available to handle this request{noformat} > On the other hand, if solr is down during the config upload phase the error > message is not too useful: > {noformat}May 20, 2021 8:07:59 AM > org.apache.ranger.server.tomcat.SolrCollectionBootstrapper uploadConfiguration > SEVERE: Error while uploading configs : > java.lang.ArrayIndexOutOfBoundsException: 0{noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (RANGER-3290) ArrayIndexOutOfBoundsException if solr is down
Andras Salamon created RANGER-3290: -- Summary: ArrayIndexOutOfBoundsException if solr is down Key: RANGER-3290 URL: https://issues.apache.org/jira/browse/RANGER-3290 Project: Ranger Issue Type: Improvement Components: audit Reporter: Andras Salamon [SolrCollectionBootstrapper|https://github.com/apache/ranger/blob/master/embeddedwebserver/src/main/java/org/apache/ranger/server/tomcat/SolrCollectionBootstrapper.java] uploads a config to solr and creates a collection. If solr is down (there are no live servers) during the collection creation phase, we got a meaningful error message (from catalina.out): {noformat}May 19, 2021 4:37:44 PM org.apache.ranger.server.tomcat.SolrCollectionBootstrapper getCollections SEVERE: getCollections() operation failed : org.apache.solr.client.solrj.SolrServerException: No live SolrServers available to handle this request{noformat} On the other hand, if solr is down during the config upload phase the error message is not too useful: {noformat}May 20, 2021 8:07:59 AM org.apache.ranger.server.tomcat.SolrCollectionBootstrapper uploadConfiguration SEVERE: Error while uploading configs : java.lang.ArrayIndexOutOfBoundsException: 0{noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
Re: Review Request 73360: RANGER-3287 : Implement best practices for logging.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73360/ --- (Updated May 20, 2021, 12:15 p.m.) Review request for ranger, Ankita Sinha, Dhaval Shah, Dineshkumar Yadav, Gautam Borad, Jayendra Parab, Kishor Gollapalliwar, Abhay Kulkarni, Madhan Neethiraj, Mehul Parikh, Pradeep Agrawal, Ramesh Mani, Sailaja Polavarapu, and Velmurugan Periasamy. Changes --- Updated changes as recommended Bugs: RANGER-3287 https://issues.apache.org/jira/browse/RANGER-3287 Repository: ranger Description --- Implement best practices for logging Diffs (updated) - security-admin/src/main/java/org/apache/ranger/common/PropertiesUtil.java fb892d5c1c3ea6a2b8b74db4d09a886cf1363187 Diff: https://reviews.apache.org/r/73360/diff/2/ Changes: https://reviews.apache.org/r/73360/diff/1-2/ Testing --- Validated changes locally. Thanks, Vishal Suvagia