You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/02/21 16:39:44 UTC
[13/25] ambari git commit: AMBARI-20052. Spark2 service check is
failing in secure cluster (echekanskiy)
AMBARI-20052. Spark2 service check is failing in secure cluster (echekanskiy)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1ecdee0d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1ecdee0d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1ecdee0d
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 1ecdee0d559540204c66634871e6252d622552cd
Parents: ece4d36
Author: Eugene Chekanskiy <ec...@hortonworks.com>
Authored: Mon Feb 20 16:53:25 2017 +0200
Committer: Eugene Chekanskiy <ec...@hortonworks.com>
Committed: Mon Feb 20 16:53:25 2017 +0200
----------------------------------------------------------------------
.../common-services/SPARK2/2.0.0/package/scripts/params.py | 2 ++
.../SPARK2/2.0.0/package/scripts/service_check.py | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/1ecdee0d/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
index b6889e4..45a8c07 100755
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
@@ -131,6 +131,8 @@ security_enabled = config['configurations']['cluster-env']['security_enabled']
kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None))
spark_kerberos_keytab = config['configurations']['spark2-defaults']['spark.history.kerberos.keytab']
spark_kerberos_principal = config['configurations']['spark2-defaults']['spark.history.kerberos.principal']
+smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
+smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name']
spark_thriftserver_hosts = default("/clusterHostInfo/spark2_thriftserver_hosts", [])
has_spark_thriftserver = not len(spark_thriftserver_hosts) == 0
http://git-wip-us.apache.org/repos/asf/ambari/blob/1ecdee0d/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
index acd3340..8e7a766 100755
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/service_check.py
@@ -31,7 +31,7 @@ class SparkServiceCheck(Script):
if params.security_enabled:
spark_kinit_cmd = format("{kinit_path_local} -kt {spark_kerberos_keytab} {spark_principal}; ")
Execute(spark_kinit_cmd, user=params.spark_user)
- if (params.has_livyserver):
+ if params.has_livyserver:
livy_kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal}; ")
Execute(livy_kinit_cmd, user=params.livy2_user)
@@ -41,7 +41,7 @@ class SparkServiceCheck(Script):
logoutput=True
)
if params.has_livyserver:
- live_livyserver_host = "";
+ live_livyserver_host = ""
for livyserver_host in params.livy2_livyserver_hosts:
try:
Execute(format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k http://{livyserver_host}:{livy2_livyserver_port}/sessions | grep 200"),