> On April 24, 2017, 6:48 p.m., Alejandro Fernandez wrote: > > ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py > > Lines 509 (patched) > > <https://reviews.apache.org/r/58497/diff/1/?file=1693617#file1693617line509> > > > > Can you confirm this will work even if HDFS Client is not installed on > > this host? > > That scenario may happen on upgraded clusters.
Hi Alejandro, For Simple env it will work. It uses WebHDFS RESTAPI to create Hdfs related operation using curl. For Kerberos env will require HDFS Client to be installed on same node because before executing WebHDFS RESTAPI using curl, script does kinit using hdfs pricncipal. Correct principal to use is only hdfs user principal for authentication. If used other pricipal WebHDFS RESTAPI gives 403 Forbidden response for creation of directory. I can skip the creation of directory during upgrade. As Ranger KMS service(dependent on HDFS) works with HDFS service, I have added HDFS_CLIENT dependency for host where Ranger KMS will be installed. - Mugdha ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58497/#review172220 ----------------------------------------------------------- On April 18, 2017, 7:51 a.m., Mugdha Varadkar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58497/ > ----------------------------------------------------------- > > (Updated April 18, 2017, 7:51 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/1/ > > > 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 > >