ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stoa...@apache.org
Subject ambari git commit: AMBARI-15645. Upgrading Kerberized JournalNode requires HDFS principal to perform 'role edits' task. (Robert Levas via stoader)
Date Fri, 01 Apr 2016 08:13:08 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 aa59546bb -> 7a39a9905


AMBARI-15645. Upgrading Kerberized JournalNode requires HDFS principal to perform 'role edits'
task. (Robert Levas via stoader)


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

Branch: refs/heads/branch-2.2
Commit: 7a39a9905a170cea43dd550f2c034b3ed88bd5b1
Parents: aa59546
Author: Robert Levas <rlevas@hortonworks.com>
Authored: Fri Apr 1 10:09:18 2016 +0200
Committer: Toader, Sebastian <stoader@hortonworks.com>
Committed: Fri Apr 1 10:09:18 2016 +0200

----------------------------------------------------------------------
 .../HDFS/2.1.0.2.0/package/scripts/journalnode_upgrade.py       | 4 +++-
 .../HDFS/2.1.0.2.0/package/scripts/params_linux.py              | 5 ++---
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7a39a990/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode_upgrade.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode_upgrade.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode_upgrade.py
index d598840..da44e3c 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode_upgrade.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/journalnode_upgrade.py
@@ -39,7 +39,9 @@ def post_upgrade_check():
   Logger.info("Ensuring Journalnode quorum is established")
 
   if params.security_enabled:
-    Execute(params.jn_kinit_cmd, user=params.hdfs_user)
+    # We establish HDFS identity instead of JN Kerberos identity
+    # since this is an administrative HDFS call that requires the HDFS administrator user
to perform.
+    Execute(params.hdfs_kinit_cmd, user=params.hdfs_user)
 
   time.sleep(5)
   hdfs_roll_edits()

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a39a990/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
index e61f7f5..21f4a28 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/params_linux.py
@@ -315,12 +315,11 @@ if security_enabled:
   if jn_principal_name:
     jn_principal_name = jn_principal_name.replace('_HOST', hostname.lower())
   jn_keytab = default("/configurations/hdfs-site/dfs.journalnode.keytab.file", None)
-  jn_kinit_cmd = format("{kinit_path_local} -kt {jn_keytab} {jn_principal_name};")
+  hdfs_kinit_cmd = format("{kinit_path_local} -kt {hdfs_user_keytab} {hdfs_principal_name};")
 else:
   dn_kinit_cmd = ""
   nn_kinit_cmd = ""
-  jn_kinit_cmd = ""
-  
+  hdfs_kinit_cmd = ""
 
 hdfs_site = config['configurations']['hdfs-site']
 default_fs = config['configurations']['core-site']['fs.defaultFS']


Mime
View raw message