ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-19996 Perform Kinit on Kafka Start (Bharat Viswanadham via dili)
Date Thu, 13 Apr 2017 20:55:03 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 0c778e77a -> 14c1ffd32


AMBARI-19996 Perform Kinit on Kafka Start (Bharat Viswanadham via dili)


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

Branch: refs/heads/trunk
Commit: 14c1ffd3288742354f17cbf49b6cebfee913a16f
Parents: 0c778e7
Author: Di Li <dili@apache.org>
Authored: Thu Apr 13 16:54:34 2017 -0400
Committer: Di Li <dili@apache.org>
Committed: Thu Apr 13 16:54:34 2017 -0400

----------------------------------------------------------------------
 .../KAFKA/0.8.1/package/scripts/kafka_broker.py                | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/14c1ffd3/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
index 96a8293..81715f9 100644
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/kafka_broker.py
@@ -77,6 +77,12 @@ class KafkaBroker(Script):
     import params
     env.set_params(params)
     self.configure(env, upgrade_type=upgrade_type)
+
+    if params.security_enabled:
+      if params.version and check_stack_feature(StackFeature.KAFKA_KERBEROS, params.version):
+        kafka_kinit_cmd = format("{kinit_path_local} -kt {kafka_keytab_path} {kafka_jaas_principal};")
+        Execute(kafka_kinit_cmd, user=params.kafka_user)
+
     if params.is_supported_kafka_ranger:
       setup_ranger_kafka() #Ranger Kafka Plugin related call 
     daemon_cmd = format('source {params.conf_dir}/kafka-env.sh ; {params.kafka_bin} start')


Mime
View raw message