> On April 26, 2017, 6:37 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
> > Lines 510 (patched)
> > <https://reviews.apache.org/r/58497/diff/2-3/?file=1699268#file1699268line510>
> >
> >     I think you still need has_hdfs_client_on_node
> 
> Mugdha Varadkar wrote:
>     Hi Alejandro,
>     
>     create_kms_audit_dir is calcluated using security_enabled and 
> has_hdfs_client_on_node flags, if has_hdfs_client_on_node is false then 
> create_kms_audit_dir will be false, so the resulting HDFS resource will not 
> be created.

If security is disabled and HDFS Client is not present, create_kms_audit_dir 
will still be True, which will fail.
instead, initialize create_kms_audit_dir to false, and set to true if security 
is diabled and has hdfs client.


- Alejandro


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


On April 26, 2017, 9:56 a.m., Mugdha Varadkar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58497/
> -----------------------------------------------------------
> 
> (Updated April 26, 2017, 9:56 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Gautam Borad, Sumit Mohanty, 
> and Velmurugan Periasamy.
> 
> 
> Bugs: AMBARI-20779
>     https://issues.apache.org/jira/browse/AMBARI-20779
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create audit directory /ranger/audit/kms in hdfs, if 
> xasecure.audit.destination.hdfs (Audit To HDFS) property is set to true.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/resources/common-services/RANGER/0.5.0/role_command_order.json
>  df62dfd 
>   
> ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/metainfo.xml
>  b20201c 
>   
> ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
>  423cdec 
>   
> ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/params.py
>  9fe0a61 
>   
> ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/role_command_order.json
>  006d177 
>   ambari-server/src/main/resources/stacks/HDP/2.3/role_command_order.json 
> 4f279c6 
>   ambari-server/src/test/python/stacks/2.5/RANGER_KMS/test_kms_server.py 
> 7082a33 
>   ambari-server/src/test/python/stacks/2.5/configs/ranger-kms-secured.json 
> 7054e8f 
> 
> 
> Diff: https://reviews.apache.org/r/58497/diff/3/
> 
> 
> Testing
> -------
> 
> Unit Test Result:
> 
> Running tests for stack:2.5 service:RANGER_KMS
> test_configure_default (test_kms_server.TestRangerKMS) ... 2017-04-18 
> 13:13:22,030 - Stack Feature Version Info: stack_version=2.5, 
> version=2.5.0.0-777, current_cluster_version=2.5.0.0-777 -> 2.5.0.0-777
> 2017-04-18 13:13:22,046 - Using hadoop conf dir: 
> /usr/hdp/current/hadoop-client/conf
> ok
> test_configure_secured (test_kms_server.TestRangerKMS) ... 2017-04-18 
> 13:13:22,062 - Stack Feature Version Info: stack_version=2.5, 
> version=2.5.0.0-801, current_cluster_version=2.5.0.0-801 -> 2.5.0.0-801
> 2017-04-18 13:13:22,080 - Using hadoop conf dir: 
> /usr/hdp/current/hadoop-client/conf
> ok
> test_start_default (test_kms_server.TestRangerKMS) ... 2017-04-18 
> 13:13:22,095 - Stack Feature Version Info: stack_version=2.5, 
> version=2.5.0.0-777, current_cluster_version=2.5.0.0-777 -> 2.5.0.0-777
> 2017-04-18 13:13:22,111 - Using hadoop conf dir: 
> /usr/hdp/current/hadoop-client/conf
> 2017-04-18 13:13:22,116 - Rangeradmin: Skip ranger admin if it's down !
> ok
> test_start_secured (test_kms_server.TestRangerKMS) ... 2017-04-18 
> 13:13:22,129 - Stack Feature Version Info: stack_version=2.5, 
> version=2.5.0.0-801, current_cluster_version=2.5.0.0-801 -> 2.5.0.0-801
> 2017-04-18 13:13:22,145 - Using hadoop conf dir: 
> /usr/hdp/current/hadoop-client/conf
> 2017-04-18 13:13:22,150 - RangeradminV2: Skip ranger admin if it's down !
> 2017-04-18 13:13:22,151 - KMS repository c1_kms exist
> ok
> test_stop_default (test_kms_server.TestRangerKMS) ... 2017-04-18 13:13:22,163 
> - Stack Feature Version Info: stack_version=2.5, version=2.5.0.0-777, 
> current_cluster_version=2.5.0.0-777 -> 2.5.0.0-777
> 2017-04-18 13:13:22,179 - Using hadoop conf dir: 
> /usr/hdp/current/hadoop-client/conf
> ok
> 
> ----------------------------------------------------------------------
> Ran 5 tests in 0.164s
> 
> OK
> 
> 
> Thanks,
> 
> Mugdha Varadkar
> 
>

Reply via email to