You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rl...@apache.org on 2016/06/21 23:44:26 UTC
ambari git commit: AMBARI-17243. Change livy principal to service
type (Jeff Zhang via rlevas)
Repository: ambari
Updated Branches:
refs/heads/trunk 58198f533 -> 97b14647c
AMBARI-17243. Change livy principal to service type (Jeff Zhang via rlevas)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/97b14647
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/97b14647
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/97b14647
Branch: refs/heads/trunk
Commit: 97b14647cf02a252ff092652c298b23314df6ec5
Parents: 58198f5
Author: Jeff Zhang <zj...@apache.org>
Authored: Tue Jun 21 19:44:14 2016 -0400
Committer: Robert Levas <rl...@hortonworks.com>
Committed: Tue Jun 21 19:44:20 2016 -0400
----------------------------------------------------------------------
.../common-services/SPARK/1.2.1/package/scripts/params.py | 2 ++
.../SPARK/1.2.1/package/scripts/service_check.py | 2 +-
.../common-services/SPARK/1.2.1/package/scripts/setup_livy.py | 2 +-
.../main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json | 6 +++---
4 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/97b14647/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
index d7aa725..67bbac7 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
@@ -101,6 +101,8 @@ spark_submit_cmd = format("{spark_home}/bin/spark-submit")
spark_smoke_example = "org.apache.spark.examples.SparkPi"
spark_service_check_cmd = format(
"{spark_submit_cmd} --class {spark_smoke_example} --master yarn-cluster --num-executors 1 --driver-memory 256m --executor-memory 256m --executor-cores 1 {spark_home}/lib/spark-examples*.jar 1")
+smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab']
+smokeuser_principal = config['configurations']['cluster-env']['smokeuser_principal_name']
spark_jobhistoryserver_hosts = default("/clusterHostInfo/spark_jobhistoryserver_hosts", [])
http://git-wip-us.apache.org/repos/asf/ambari/blob/97b14647/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/service_check.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/service_check.py
index ba59b95..297761e 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/service_check.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/service_check.py
@@ -31,7 +31,7 @@ class SparkServiceCheck(Script):
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):
- livy_kinit_cmd = format("{kinit_path_local} -kt {livy_kerberos_keytab} {livy_kerberos_principal}; ")
+ livy_kinit_cmd = format("{kinit_path_local} -kt {smoke_user_keytab} {smokeuser_principal}; ")
Execute(livy_kinit_cmd, user=params.livy_user)
Execute(format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k http://{spark_history_server_host}:{spark_history_ui_port} | grep 200"),
http://git-wip-us.apache.org/repos/asf/ambari/blob/97b14647/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py
index a09a8db..07b704f 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/setup_livy.py
@@ -65,7 +65,7 @@ def setup_livy(env, type, upgrade_type = None, action = None):
)
# create spark-blacklist.properties in etc/conf dir
- File(os.path.join(params.livy_conf, 'spark-blacklist.properties'),
+ File(os.path.join(params.livy_conf, 'spark-blacklist.conf'),
owner=params.livy_user,
group=params.livy_group,
content=params.livy_spark_blacklist_properties,
http://git-wip-us.apache.org/repos/asf/ambari/blob/97b14647/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json
index d75364b..e479354 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/SPARK/kerberos.json
@@ -30,13 +30,13 @@
{
"name": "livyuser",
"principal": {
- "value": "livy@${realm}",
- "type" : "user",
+ "value": "${livy-env/livy_user}/_HOST@${realm}",
+ "type" : "service",
"configuration": "livy-conf/livy.server.kerberos.principal",
"local_username": "${livy-env/livy_user}"
},
"keytab": {
- "file": "${keytab_dir}/livy.keytab",
+ "file": "${keytab_dir}/livy.service.keytab",
"owner": {
"name": "${livy-env/livy_user}",
"access": "r"