Repository: ambari
Updated Branches:
  refs/heads/trunk f69d157c8 -> 7c3015fee


AMBARI-10550. NameNode Restart fails after attempt to Kerberize Cluster (rlevas)


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

Branch: refs/heads/trunk
Commit: 7c3015fee5afd647c73b1af6ac492569dc958ee4
Parents: f69d157
Author: Robert Levas <rle...@hortonworks.com>
Authored: Fri Apr 17 21:35:16 2015 -0400
Committer: Robert Levas <rle...@hortonworks.com>
Committed: Fri Apr 17 21:35:16 2015 -0400

----------------------------------------------------------------------
 .../2.1.0.2.0/package/scripts/params_linux.py   | 30 ++++++++++----------
 .../package/scripts/setup_ranger_hdfs.py        |  6 ++--
 2 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7c3015fe/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 b0e100f..034d544 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
@@ -244,23 +244,23 @@ if journalnode_address:
   
   
 if security_enabled:
-  _dn_principal_name = 
config['configurations']['hdfs-site']['dfs.datanode.kerberos.principal']
-  _dn_keytab = 
config['configurations']['hdfs-site']['dfs.datanode.keytab.file']
-  _dn_principal_name = _dn_principal_name.replace('_HOST',hostname.lower())
+  dn_principal_name = 
config['configurations']['hdfs-site']['dfs.datanode.kerberos.principal']
+  dn_keytab = config['configurations']['hdfs-site']['dfs.datanode.keytab.file']
+  dn_principal_name = dn_principal_name.replace('_HOST',hostname.lower())
   
-  dn_kinit_cmd = format("{kinit_path_local} -kt {_dn_keytab} 
{_dn_principal_name};")
+  dn_kinit_cmd = format("{kinit_path_local} -kt {dn_keytab} 
{dn_principal_name};")
   
-  _nn_principal_name = 
config['configurations']['hdfs-site']['dfs.namenode.kerberos.principal']
-  _nn_keytab = 
config['configurations']['hdfs-site']['dfs.namenode.keytab.file']
-  _nn_principal_name = _nn_principal_name.replace('_HOST',hostname.lower())
+  nn_principal_name = 
config['configurations']['hdfs-site']['dfs.namenode.kerberos.principal']
+  nn_keytab = config['configurations']['hdfs-site']['dfs.namenode.keytab.file']
+  nn_principal_name = nn_principal_name.replace('_HOST',hostname.lower())
   
-  nn_kinit_cmd = format("{kinit_path_local} -kt {_nn_keytab} 
{_nn_principal_name};")
+  nn_kinit_cmd = format("{kinit_path_local} -kt {nn_keytab} 
{nn_principal_name};")
 
-  _jn_principal_name = 
default("/configurations/hdfs-site/dfs.journalnode.kerberos.principal", None)
-  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};")
+  jn_principal_name = 
default("/configurations/hdfs-site/dfs.journalnode.kerberos.principal", None)
+  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};")
 else:
   dn_kinit_cmd = ""
   nn_kinit_cmd = ""
@@ -372,8 +372,8 @@ repo_config_username = 
default("/configurations/ranger-hdfs-plugin-properties/RE
 repo_config_password = 
default("/configurations/ranger-hdfs-plugin-properties/REPOSITORY_CONFIG_PASSWORD",
 "hadoop")
 
 if security_enabled:
-  _sn_principal_name = 
default("/configurations/hdfs-site/dfs.secondary.namenode.kerberos.principal", 
"nn/_h...@example.com")
-  _sn_principal_name = _sn_principal_name.replace('_HOST',hostname.lower())
+  sn_principal_name = 
default("/configurations/hdfs-site/dfs.secondary.namenode.kerberos.principal", 
"nn/_h...@example.com")
+  sn_principal_name = sn_principal_name.replace('_HOST',hostname.lower())
 
 admin_uname = default("/configurations/ranger-env/admin_username", "admin")
 admin_password = default("/configurations/ranger-env/admin_password", "admin")

http://git-wip-us.apache.org/repos/asf/ambari/blob/7c3015fe/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
index 9413d8e..876e70d 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/setup_ranger_hdfs.py
@@ -191,9 +191,9 @@ def hdfs_repo_properties():
   config_dict['commonNameForCertificate'] = params.common_name_for_certificate
 
   if params.security_enabled:
-    config_dict['dfs.datanode.kerberos.principal'] = params._dn_principal_name
-    config_dict['dfs.namenode.kerberos.principal'] = params._nn_principal_name
-    config_dict['dfs.secondary.namenode.kerberos.principal'] = 
params._sn_principal_name
+    config_dict['dfs.datanode.kerberos.principal'] = params.dn_principal_name
+    config_dict['dfs.namenode.kerberos.principal'] = params.nn_principal_name
+    config_dict['dfs.secondary.namenode.kerberos.principal'] = 
params.sn_principal_name
   else:
     config_dict['dfs.datanode.kerberos.principal'] = ''
     config_dict['dfs.namenode.kerberos.principal'] = ''

Reply via email to