You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2015/04/30 15:25:48 UTC

ambari git commit: AMBARI-10865. Namenode start fails on HDP-2.0 and HDP-2.1 (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk e814ba20e -> 8727232cd


AMBARI-10865. Namenode start fails on HDP-2.0 and HDP-2.1 (aonishuk)


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

Branch: refs/heads/trunk
Commit: 8727232cd22933c463b7bb2a99376f74df98f1f2
Parents: e814ba2
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Apr 30 16:25:30 2015 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Apr 30 16:25:30 2015 +0300

----------------------------------------------------------------------
 .../0.96.0.2.0/package/scripts/params_linux.py  | 45 ++++++++--------
 .../2.1.0.2.0/package/scripts/params_linux.py   | 51 +++++++++---------
 .../0.12.0.2.0/package/scripts/params_linux.py  | 34 ++++++------
 .../KNOX/0.5.0.2.2/package/scripts/params.py    | 56 ++++++--------------
 .../0.9.1.2.1/package/scripts/params_linux.py   | 35 ++++++------
 5 files changed, 97 insertions(+), 124 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8727232c/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
index 1178223..bd0a7b1 100644
--- a/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
@@ -175,9 +175,6 @@ if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
     region_drainer = format("/usr/hdp/current/hbase-{role_root}/bin/draining_servers.rb")
     hbase_cmd = format("/usr/hdp/current/hbase-{role_root}/bin/hbase")
 
-if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
-  enable_ranger_hbase = (config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower() == 'yes')
-
 # ranger host
 ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
 has_ranger_admin = not len(ranger_admin_hosts) == 0    
@@ -213,6 +210,8 @@ policy_user = config['configurations']['ranger-hbase-plugin-properties']['policy
 jdk_location = config['hostLevelParams']['jdk_location']
 java_share_dir = '/usr/share/java'
 if has_ranger_admin:
+  enable_ranger_hbase = (config['configurations']['ranger-hbase-plugin-properties']['ranger-hbase-plugin-enabled'].lower() == 'yes')
+  
   if xa_audit_db_flavor.lower() == 'mysql':
     jdbc_symlink_name = "mysql-jdbc-driver.jar"
     jdbc_jar_name = "mysql-connector-java.jar"
@@ -231,26 +230,26 @@ if has_ranger_admin:
   driver_curl_source = format("{jdk_location}/{jdbc_symlink_name}")
   driver_curl_target = format("{java_share_dir}/{jdbc_jar_name}")
 
-hbase_ranger_plugin_config = {
-  'username': repo_config_username,
-  'password': repo_config_password,
-  'hadoop.security.authentication': hadoop_security_authentication,
-  'hbase.security.authentication': hbase_security_authentication,
-  'hbase.zookeeper.property.clientPort': hbase_zookeeper_property_clientPort,
-  'hbase.zookeeper.quorum': hbase_zookeeper_quorum,
-  'zookeeper.znode.parent': zookeeper_znode_parent,
-  'commonNameForCertificate': common_name_for_certificate,
-  'hbase.master.kerberos.principal': master_jaas_princ if security_enabled else ''
-}
-
-hbase_ranger_plugin_repo = {
-  'isActive': 'true',
-  'config': json.dumps(hbase_ranger_plugin_config),
-  'description': 'hbase repo',
-  'name': repo_name,
-  'repositoryType': 'hbase',
-  'assetType': '2'
-}
+  hbase_ranger_plugin_config = {
+    'username': repo_config_username,
+    'password': repo_config_password,
+    'hadoop.security.authentication': hadoop_security_authentication,
+    'hbase.security.authentication': hbase_security_authentication,
+    'hbase.zookeeper.property.clientPort': hbase_zookeeper_property_clientPort,
+    'hbase.zookeeper.quorum': hbase_zookeeper_quorum,
+    'zookeeper.znode.parent': zookeeper_znode_parent,
+    'commonNameForCertificate': common_name_for_certificate,
+    'hbase.master.kerberos.principal': master_jaas_princ if security_enabled else ''
+  }
+  
+  hbase_ranger_plugin_repo = {
+    'isActive': 'true',
+    'config': json.dumps(hbase_ranger_plugin_config),
+    'description': 'hbase repo',
+    'name': repo_name,
+    'repositoryType': 'hbase',
+    'assetType': '2'
+  }
 
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8727232c/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 094971c..c492f60 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
@@ -324,9 +324,6 @@ mapred_log_dir_prefix = default("/configurations/mapred-env/mapred_log_dir_prefi
 ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
 has_ranger_admin = not len(ranger_admin_hosts) == 0
 
-if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
-  enable_ranger_hdfs = (config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled'].lower() == 'yes')
-
 ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 #ranger hdfs properties
@@ -361,6 +358,8 @@ policy_user = config['configurations']['ranger-hdfs-plugin-properties']['policy_
 jdk_location = config['hostLevelParams']['jdk_location']
 java_share_dir = '/usr/share/java'
 if has_ranger_admin:
+  enable_ranger_hdfs = (config['configurations']['ranger-hdfs-plugin-properties']['ranger-hdfs-plugin-enabled'].lower() == 'yes')
+  
   if xa_audit_db_flavor.lower() == 'mysql':
     jdbc_symlink_name = "mysql-jdbc-driver.jar"
     jdbc_jar_name = "mysql-connector-java.jar"
@@ -378,28 +377,26 @@ if has_ranger_admin:
   
   driver_curl_source = format("{jdk_location}/{jdbc_symlink_name}")
   driver_curl_target = format("{java_share_dir}/{jdbc_jar_name}")
-  
 
-
-hdfs_ranger_plugin_config = {
-  'username': repo_config_username,
-  'password': repo_config_password,
-  'hadoop.security.authentication': hadoop_security_authentication,
-  'hadoop.security.authorization': hadoop_security_authorization,
-  'fs.default.name': fs_default_name,
-  'hadoop.security.auth_to_local': hadoop_security_auth_to_local,
-  'hadoop.rpc.protection': hadoop_rpc_protection,
-  'commonNameForCertificate': common_name_for_certificate,
-  'dfs.datanode.kerberos.principal': dn_principal_name if security_enabled else '',
-  'dfs.namenode.kerberos.principal': nn_principal_name if security_enabled else '',
-  'dfs.secondary.namenode.kerberos.principal': sn_principal_name if security_enabled else ''
-}
-
-hdfs_ranger_plugin_repo = {
-  'isActive': 'true',
-  'config': json.dumps(hdfs_ranger_plugin_config),
-  'description': 'hdfs repo',
-  'name': repo_name,
-  'repositoryType': 'hdfs',
-  'assetType': '1'
-}
\ No newline at end of file
+  hdfs_ranger_plugin_config = {
+    'username': repo_config_username,
+    'password': repo_config_password,
+    'hadoop.security.authentication': hadoop_security_authentication,
+    'hadoop.security.authorization': hadoop_security_authorization,
+    'fs.default.name': fs_default_name,
+    'hadoop.security.auth_to_local': hadoop_security_auth_to_local,
+    'hadoop.rpc.protection': hadoop_rpc_protection,
+    'commonNameForCertificate': common_name_for_certificate,
+    'dfs.datanode.kerberos.principal': dn_principal_name if security_enabled else '',
+    'dfs.namenode.kerberos.principal': nn_principal_name if security_enabled else '',
+    'dfs.secondary.namenode.kerberos.principal': sn_principal_name if security_enabled else ''
+  }
+  
+  hdfs_ranger_plugin_repo = {
+    'isActive': 'true',
+    'config': json.dumps(hdfs_ranger_plugin_config),
+    'description': 'hdfs repo',
+    'name': repo_name,
+    'repositoryType': 'hdfs',
+    'assetType': '1'
+  }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8727232c/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
index 62d1a8a..ee79a34 100644
--- a/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
@@ -395,23 +395,23 @@ if has_ranger_admin:
   
   ranger_driver_curl_source = format("{jdk_location}/{ranger_jdbc_symlink_name}")
   ranger_driver_curl_target = format("{java_share_dir}/{ranger_jdbc_jar_name}")
+  
+  hive_ranger_plugin_config = {
+    'username': repo_config_username,
+    'password': repo_config_password,
+    'jdbc.driverClassName': jdbc_driver_class_name,
+    'jdbc.url': format("{hive_url}/default;principal={hive_principal}") if security_enabled else hive_url,
+    'commonNameForCertificate': common_name_for_certificate
+  }
+  
+  hive_ranger_plugin_repo = {
+    'isActive': 'true',
+    'config': json.dumps(hive_ranger_plugin_config),
+    'description': 'hive repo',
+    'name': repo_name,
+    'repositoryType': 'hive',
+    'assetType': '3'
+  }
 
 if security_enabled:
   hive_principal = hive_server_principal.replace('_HOST',hostname.lower())
-  
-hive_ranger_plugin_config = {
-  'username': repo_config_username,
-  'password': repo_config_password,
-  'jdbc.driverClassName': jdbc_driver_class_name,
-  'jdbc.url': format("{hive_url}/default;principal={hive_principal}") if security_enabled else hive_url,
-  'commonNameForCertificate': common_name_for_certificate
-}
-
-hive_ranger_plugin_repo = {
-  'isActive': 'true',
-  'config': json.dumps(hive_ranger_plugin_config),
-  'description': 'hive repo',
-  'name': repo_name,
-  'repositoryType': 'hive',
-  'assetType': '3'
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/8727232c/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params.py
index 534a0b6..3c3db5b 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params.py
@@ -140,9 +140,6 @@ if security_enabled:
 ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
 has_ranger_admin = not len(ranger_admin_hosts) == 0
 
-if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
-  enable_ranger_knox = (config['configurations']['ranger-knox-plugin-properties']['ranger-knox-plugin-enabled'].lower() == 'yes')
-
 ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 # ranger knox properties
@@ -169,6 +166,8 @@ policy_user = config['configurations']['ranger-knox-plugin-properties']['policy_
 jdk_location = config['hostLevelParams']['jdk_location']
 java_share_dir = '/usr/share/java'
 if has_ranger_admin:
+  enable_ranger_knox = (config['configurations']['ranger-knox-plugin-properties']['ranger-knox-plugin-enabled'].lower() == 'yes')
+  
   if xa_audit_db_flavor.lower() == 'mysql':
     jdbc_symlink_name = "mysql-jdbc-driver.jar"
     jdbc_jar_name = "mysql-connector-java.jar"
@@ -187,39 +186,18 @@ if has_ranger_admin:
   driver_curl_source = format("{jdk_location}/{jdbc_symlink_name}")
   driver_curl_target = format("{java_share_dir}/{jdbc_jar_name}")
 
-knox_ranger_plugin_config = {
-  'username': repo_config_username,
-  'password': repo_config_password,
-  'knox.url': format("https://{knox_host_name}:{knox_host_port}/gateway/admin/api/v1/topologies"),
-  'commonNameForCertificate': common_name_for_certificate
-}
-
-knox_ranger_plugin_repo = {
-  'isActive': 'true',
-  'config': json.dumps(knox_ranger_plugin_config),
-  'description': 'knox repo',
-  'name': repo_name,
-  'repositoryType': 'knox',
-  'assetType': '5',
-}
-
-def knox_repo_properties():
-  import params
-
-  config_dict = dict()
-  config_dict['username'] = params.repo_config_username
-  config_dict['password'] = params.repo_config_password
-  config_dict['knox.url'] = 'https://' + params.knox_host_name + ':' + str(params.knox_host_port) +'/gateway/admin/api/v1/topologies'
-  config_dict['commonNameForCertificate'] = params.common_name_for_certificate
-
-  repo= dict()
-  repo['isActive'] = "true"
-  repo['config'] = json.dumps(config_dict)
-  repo['description'] = "knox repo"
-  repo['name'] = params.repo_name
-  repo['repositoryType'] = "knox"
-  repo['assetType'] = '5'
-
-  data = json.dumps(repo)
-
-  return data
\ No newline at end of file
+  knox_ranger_plugin_config = {
+    'username': repo_config_username,
+    'password': repo_config_password,
+    'knox.url': format("https://{knox_host_name}:{knox_host_port}/gateway/admin/api/v1/topologies"),
+    'commonNameForCertificate': common_name_for_certificate
+  }
+  
+  knox_ranger_plugin_repo = {
+    'isActive': 'true',
+    'config': json.dumps(knox_ranger_plugin_config),
+    'description': 'knox repo',
+    'name': repo_name,
+    'repositoryType': 'knox',
+    'assetType': '5',
+  }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8727232c/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py
index b5274fd..fbfe623 100644
--- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py
@@ -132,9 +132,6 @@ metric_collector_sink_jar = "/usr/lib/storm/lib/ambari-metrics-storm-sink*.jar"
 ranger_admin_hosts = default("/clusterHostInfo/ranger_admin_hosts", [])
 has_ranger_admin = not len(ranger_admin_hosts) == 0
 
-if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
-  enable_ranger_storm = (config['configurations']['ranger-storm-plugin-properties']['ranger-storm-plugin-enabled'].lower() == 'yes')
-
 ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0]
 
 #ranger storm properties
@@ -162,6 +159,8 @@ policy_user = config['configurations']['ranger-storm-plugin-properties']['policy
 jdk_location = config['hostLevelParams']['jdk_location']
 java_share_dir = '/usr/share/java'
 if has_ranger_admin:
+  enable_ranger_storm = (config['configurations']['ranger-storm-plugin-properties']['ranger-storm-plugin-enabled'].lower() == 'yes')
+  
   if xa_audit_db_flavor.lower() == 'mysql':
     jdbc_symlink_name = "mysql-jdbc-driver.jar"
     jdbc_jar_name = "mysql-connector-java.jar"
@@ -180,18 +179,18 @@ if has_ranger_admin:
   driver_curl_source = format("{jdk_location}/{jdbc_symlink_name}")
   driver_curl_target = format("{java_share_dir}/{jdbc_jar_name}")
 
-storm_ranger_plugin_config = {
-  'username': repo_config_username,
-  'password': repo_config_password,
-  'nimbus.url': 'http://' + storm_ui_host[0].lower() + ':' + str(storm_ui_port),
-  'commonNameForCertificate': common_name_for_certificate
-}
-
-storm_ranger_plugin_repo = {
-  'isActive': 'true',
-  'config': json.dumps(storm_ranger_plugin_config),
-  'description': 'storm repo',
-  'name': repo_name,
-  'repositoryType': 'storm',
-  'assetType': '6'
-}
+  storm_ranger_plugin_config = {
+    'username': repo_config_username,
+    'password': repo_config_password,
+    'nimbus.url': 'http://' + storm_ui_host[0].lower() + ':' + str(storm_ui_port),
+    'commonNameForCertificate': common_name_for_certificate
+  }
+  
+  storm_ranger_plugin_repo = {
+    'isActive': 'true',
+    'config': json.dumps(storm_ranger_plugin_config),
+    'description': 'storm repo',
+    'name': repo_name,
+    'repositoryType': 'storm',
+    'assetType': '6'
+  }