ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject ambari git commit: AMBARI-20013. Appendum - Add Solr authorization settings during LogSearch/Atlas/Ranger startup (oleewere)
Date Fri, 17 Feb 2017 17:08:17 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 e5f188dd7 -> 9260620ec


AMBARI-20013. Appendum - Add Solr authorization settings during LogSearch/Atlas/Ranger startup
(oleewere)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9260620e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9260620e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9260620e

Branch: refs/heads/branch-2.5
Commit: 9260620ec4fced444db2a4f153515a48d2a60597
Parents: e5f188d
Author: oleewere <oleewere@gmail.com>
Authored: Fri Feb 17 17:52:29 2017 +0100
Committer: oleewere <oleewere@gmail.com>
Committed: Fri Feb 17 18:07:13 2017 +0100

----------------------------------------------------------------------
 .../src/test/python/stacks/2.3/ATLAS/test_metadata_server.py   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9260620e/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
index 12f8412..388aa57 100644
--- a/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
+++ b/ambari-server/src/test/python/stacks/2.3/ATLAS/test_metadata_server.py
@@ -20,6 +20,7 @@ limitations under the License.
 
 from mock.mock import MagicMock, call, patch
 from resource_management.libraries.script.script import Script
+from resource_management.libraries.functions import get_kinit_path
 from stacks.utils.RMFTestCase import *
 import json
 import sys
@@ -302,8 +303,9 @@ class TestMetadataServer(RMFTestCase):
     self.assertResourceCalledRegexp('^Directory$', '^/tmp/solr_config_atlas_configs_0.[0-9]*',
                                     action=['delete'],
                                     create_parents=True)
-
-    self.assertResourceCalled('Execute', "ambari-sudo.sh /usr/bin/kinit -kt /etc/security/keytabs/ambari-infra-solr.keytab
infra-solr/c6401.ambari.apache.org@EXAMPLE.COM; ambari-sudo.sh curl -k -s --negotiate -u :
http://c6401.ambari.apache.org:8886/solr/admin/authorization | grep authorization.enabled
&& ambari-sudo.sh /usr/bin/kinit -kt /etc/security/keytabs/ambari-infra-solr.keytab
infra-solr/c6401.ambari.apache.org@EXAMPLE.COM; ambari-sudo.sh curl -H 'Content-type:application/json'
-d '{\"set-user-role\": {\"atlas@EXAMPLE.COM\": [\"atlas_user\", \"ranger_audit_user\", \"dev\"]}}'
-s -o /dev/null -w'%{http_code}' --negotiate -u: -k http://c6401.ambari.apache.org:8886/solr/admin/authorization
| grep 200",
+    kinit_path_local = get_kinit_path()
+    self.assertResourceCalled('Execute', "ambari-sudo.sh " + kinit_path_local + " -kt /etc/security/keytabs/ambari-infra-solr.keytab
infra-solr/c6401.ambari.apache.org@EXAMPLE.COM; ambari-sudo.sh curl -k -s --negotiate -u :
http://c6401.ambari.apache.org:8886/solr/admin/authorization | grep authorization.enabled
&& ambari-sudo.sh "
+                              + kinit_path_local +" -kt /etc/security/keytabs/ambari-infra-solr.keytab
infra-solr/c6401.ambari.apache.org@EXAMPLE.COM; ambari-sudo.sh curl -H 'Content-type:application/json'
-d '{\"set-user-role\": {\"atlas@EXAMPLE.COM\": [\"atlas_user\", \"ranger_audit_user\", \"dev\"]}}'
-s -o /dev/null -w'%{http_code}' --negotiate -u: -k http://c6401.ambari.apache.org:8886/solr/admin/authorization
| grep 200",
                               logoutput = True, tries = 30, try_sleep = 10)
 
     self.assertResourceCalledRegexp('^Execute$', '^ambari-sudo.sh JAVA_HOME=/usr/jdk64/jdk1.7.0_45
/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string c6401.ambari.apache.org:2181/infra-solr
--create-collection --collection vertex_index --config-set atlas_configs --shards 1 --replication
1 --max-shards 1 --retry 5 --interval 10')


Mime
View raw message