You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Jonathan Hurley <jh...@hortonworks.com> on 2016/03/02 18:54:37 UTC

Re: Review Request 44057: AMBARI-15197 : Make use of log dir properties while installing Ranger

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




ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py (line 240)
<https://reviews.apache.org/r/44057/#comment183442>

    So the only purpose of this file is to provide a single export which sets the log directory? Wouldn't it just be simpler to store this value as a property in the XML directly and read from that?



ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/ranger-ugsync-site.xml (lines 309 - 317)
<https://reviews.apache.org/r/44057/#comment183441>

    Are there upgrade concerns here? Will using a fixed directly continue to work post-upgrade of Ambari and of the stack?


- Jonathan Hurley


On Feb. 26, 2016, 1:19 a.m., Gautam Borad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44057/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2016, 1:19 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, Jonathan Hurley, Mahadev Konar, Sumit Mohanty, Selvamohan Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: AMBARI-15197
>     https://issues.apache.org/jira/browse/AMBARI-15197
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> **PROBLEM:**
> The ranger_admin_log_dir and ranger_usersync_log_dir settings under "Advanced ranger-env" doesn't do anything.
> It is not using the value given in above properties to create / set the log directory for Ranger service. 
> 
> **PROPOSED SOLUTION:**
> Need to use these properties and create / set log dir and set correct permissions for log dir.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml d73272d 
>   ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_service.py 8bbab02 
>   ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py 4660cf8 
>   ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-env.xml 305282e 
>   ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py 706e525 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/ranger-ugsync-site.xml 5551e51 
> 
> Diff: https://reviews.apache.org/r/44057/diff/
> 
> 
> Testing
> -------
> 
> 1) Tested Ranger (Ranger Admin, Ranger Usersync and Ranger KMS) install by setting a non-existing log directory and verified that log directory is getting generated and logs are getting saved in that directory.
> 
> 2) Tested Ranger install by setting a existing directory as a log directory and verified logs are getting saved in that directory.
> 
> 
> Thanks,
> 
> Gautam Borad
> 
>


Re: Review Request 44057: AMBARI-15197 : Make use of log dir properties while installing Ranger

Posted by Gautam Borad <gb...@gmail.com>.

> On March 2, 2016, 5:54 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py, line 240
> > <https://reviews.apache.org/r/44057/diff/1/?file=1271855#file1271855line240>
> >
> >     So the only purpose of this file is to provide a single export which sets the log directory? Wouldn't it just be simpler to store this value as a property in the XML directly and read from that?

Yes, currently ranger doesn't have log related properties in XML files.


> On March 2, 2016, 5:54 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/ranger-ugsync-site.xml, lines 309-317
> > <https://reviews.apache.org/r/44057/diff/1/?file=1271856#file1271856line309>
> >
> >     Are there upgrade concerns here? Will using a fixed directly continue to work post-upgrade of Ambari and of the stack?

No, this property is not used by ranger code, that's why marked it as invisible. To polulate the right log dir, using macro to auto-populate value for this property from ranger-env/ranger_usersync_log_dir


- Gautam


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


On Feb. 26, 2016, 6:19 a.m., Gautam Borad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44057/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2016, 6:19 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, Jonathan Hurley, Mahadev Konar, Sumit Mohanty, Selvamohan Neethiraj, and Velmurugan Periasamy.
> 
> 
> Bugs: AMBARI-15197
>     https://issues.apache.org/jira/browse/AMBARI-15197
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> **PROBLEM:**
> The ranger_admin_log_dir and ranger_usersync_log_dir settings under "Advanced ranger-env" doesn't do anything.
> It is not using the value given in above properties to create / set the log directory for Ranger service. 
> 
> **PROPOSED SOLUTION:**
> Need to use these properties and create / set log dir and set correct permissions for log dir.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/resources/common-services/RANGER/0.4.0/configuration/ranger-env.xml d73272d 
>   ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_service.py 8bbab02 
>   ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py 4660cf8 
>   ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/configuration/kms-env.xml 305282e 
>   ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py 706e525 
>   ambari-server/src/main/resources/stacks/HDP/2.3/services/RANGER/configuration/ranger-ugsync-site.xml 5551e51 
> 
> Diff: https://reviews.apache.org/r/44057/diff/
> 
> 
> Testing
> -------
> 
> 1) Tested Ranger (Ranger Admin, Ranger Usersync and Ranger KMS) install by setting a non-existing log directory and verified that log directory is getting generated and logs are getting saved in that directory.
> 
> 2) Tested Ranger install by setting a existing directory as a log directory and verified logs are getting saved in that directory.
> 
> 
> Thanks,
> 
> Gautam Borad
> 
>