Repository: ambari Updated Branches: refs/heads/branch-3.0-perf f3e98bf7d -> 7da02bb9f
AMBARI-22251. A bunch of services fail to start (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7da02bb9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7da02bb9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7da02bb9 Branch: refs/heads/branch-3.0-perf Commit: 7da02bb9ff07b5934c7a474ce3b4eb5870d0e1a8 Parents: f3e98bf Author: Andrew Onishuk <[email protected]> Authored: Thu Oct 19 14:25:18 2017 +0300 Committer: Andrew Onishuk <[email protected]> Committed: Thu Oct 19 14:25:18 2017 +0300 ---------------------------------------------------------------------- .../main/python/ambari_agent/ClusterTopologyCache.py | 12 ++++++++++++ .../python/ambari_agent/CustomServiceOrchestrator.py | 1 + .../libraries/functions/solr_cloud_util.py | 2 +- .../ACCUMULO/1.6.1.2.2.0/package/scripts/params.py | 2 +- .../AMBARI_INFRA/0.1.0/package/scripts/params.py | 2 +- .../ATLAS/0.7.0.3.0/package/scripts/params.py | 8 ++++---- .../ATLAS/0.7.0.3.0/package/scripts/status_params.py | 2 +- .../FLUME/1.4.0.2.0/package/scripts/params.py | 4 ++-- .../GANGLIA/3.5.0/package/scripts/params.py | 4 ++-- .../HAWQ/2.0.0/package/scripts/params.py | 4 ++-- .../HBASE/0.96.0.2.0/package/scripts/params_linux.py | 2 +- .../HDFS/2.1.0.2.0/package/scripts/params_linux.py | 10 +++++----- .../HDFS/3.0.0.3.0/package/scripts/params_linux.py | 10 +++++----- .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 8 ++++---- .../HIVE/2.1.0.3.0/package/scripts/params_linux.py | 8 ++++---- .../KAFKA/0.10.0.3.0/package/scripts/params.py | 12 ++++++------ .../KAFKA/0.8.1/package/scripts/params.py | 6 +++--- .../KERBEROS/1.10.3-30/package/scripts/params.py | 2 +- .../KERBEROS/1.10.3-30/package/scripts/status_params.py | 2 +- .../KNOX/0.5.0.2.2/package/scripts/params_linux.py | 4 ++-- .../KNOX/0.5.0.3.0/package/scripts/params_linux.py | 12 ++++++------ .../KNOX/0.5.0.3.0/package/scripts/params_windows.py | 2 +- .../KNOX/0.5.0.3.0/package/scripts/status_params.py | 2 +- .../common-services/PXF/3.0.0/package/scripts/params.py | 2 +- .../PXF/3.0.0/package/scripts/service_check.py | 2 +- .../RANGER/1.0.0.3.0/package/scripts/params.py | 4 ++-- .../RANGER_KMS/1.0.0.3.0/package/scripts/params.py | 4 ++-- .../SPARK/1.2.1/package/scripts/params.py | 2 +- .../SPARK/2.2.0/package/scripts/params.py | 4 ++-- .../SPARK2/2.0.0/package/scripts/params.py | 2 +- .../STORM/1.0.1.3.0/package/scripts/params_linux.py | 8 ++++---- .../STORM/1.0.1.3.0/package/scripts/status_params.py | 2 +- .../SUPERSET/0.15.0/package/scripts/params.py | 2 +- .../YARN/2.1.0.2.0/package/scripts/params_windows.py | 2 +- .../YARN/3.0.0.3.0/package/scripts/params_windows.py | 2 +- .../ZEPPELIN/0.6.0/package/scripts/params.py | 7 +++---- .../ZEPPELIN/0.7.0/package/scripts/params.py | 7 +++---- .../stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py | 2 +- .../HDP/2.0.6/hooks/before-INSTALL/scripts/params.py | 8 ++++---- .../HDP/2.0.6/hooks/before-START/scripts/params.py | 8 ++++---- 40 files changed, 100 insertions(+), 89 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py b/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py index af11cc5..e7ad8d2 100644 --- a/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py +++ b/ambari-agent/src/main/python/ambari_agent/ClusterTopologyCache.py @@ -45,6 +45,7 @@ class ClusterTopologyCache(ClusterCache): self.components_by_key = ImmutableDictionary({}) self.hostname = hostname.hostname(config) self.current_host_ids_to_cluster = {} + self.cluster_local_components = {} self.cluster_host_info = None super(ClusterTopologyCache, self).__init__(cluster_cache_dir) @@ -70,6 +71,14 @@ class ClusterTopologyCache(ClusterCache): key = "{0}/{1}".format(component_dict.serviceName, component_dict.componentName) components_by_key[cluster_id][key] = component_dict + for cluster_id, cluster_topology in self.iteritems(): + current_host_id = self.current_host_ids_to_cluster[cluster_id] + self.cluster_local_components[cluster_id] = [] + for component_dict in self[cluster_id].components: + if current_host_id in component_dict.hostIds: + self.cluster_local_components[cluster_id].append(component_dict.componentName) + + self.hosts_to_id = ImmutableDictionary(hosts_to_id) self.components_by_key = ImmutableDictionary(components_by_key) @@ -100,6 +109,9 @@ class ClusterTopologyCache(ClusterCache): except KeyError: return None + def get_cluster_local_components(self, cluster_id): + return self.cluster_local_components[cluster_id] + def get_host_info_by_id(self, cluster_id, host_id): """ Find host by id in list of host dictionaries. http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py index 8813243..f99c5c5 100644 --- a/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py +++ b/ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py @@ -466,6 +466,7 @@ class CustomServiceOrchestrator(): 'clusterLevelParams': metadata_cache.clusterLevelParams, 'hostLevelParams': host_level_params_cache, 'clusterHostInfo': self.topology_cache.get_cluster_host_info(cluster_id), + 'localComponents': self.topology_cache.get_cluster_local_components(cluster_id), 'agentLevelParams': {'hostname': self.topology_cache.get_current_host_info(cluster_id)['hostName']} } http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py index 12356ed..6e2510b 100644 --- a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py +++ b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py @@ -322,7 +322,7 @@ def add_solr_roles(config, roles = [], new_service_principals = [], tries = 30, and solr_hosts is not None \ and len(solr_hosts) > 0: solr_protocol = "https" if solr_ssl_enabled else "http" - hostname = config['hostname'].lower() + hostname = config['agentLevelParams']['hostname'].lower() solr_host = __get_random_solr_host(hostname, solr_hosts) solr_url = format("{solr_protocol}://{solr_host}:{solr_port}/solr/admin/authorization") solr_user = config['configurations']['infra-solr-env']['infra_solr_user'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py index aed635e..38396f3 100644 --- a/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ACCUMULO/1.6.1.2.2.0/package/scripts/params.py @@ -120,7 +120,7 @@ info_log_size = config['configurations']['accumulo-log4j']['info_log_size'] info_num_logs = config['configurations']['accumulo-log4j']['info_num_logs'] # metrics2 properties -ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_host', []) # is not passed when ganglia is not present +ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_hosts', []) # is not passed when ganglia is not present ganglia_server_host = '' if len(ganglia_server_hosts) == 0 else ganglia_server_hosts[0] set_instanceId = "false" http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py index e039606..4dbb343 100644 --- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/params.py @@ -49,7 +49,7 @@ stack_version = default("/commandParams/version", None) sudo = AMBARI_SUDO_BINARY security_enabled = status_params.security_enabled -hostname = config['hostname'].lower() +hostname = config['agentLevelParams']['hostname'].lower() infra_solr_conf = "/etc/ambari-infra-solr/conf" http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py index b01884c..35927c0 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py @@ -93,7 +93,7 @@ stack_supports_zk_security = check_stack_feature(StackFeature.SECURE_ZOOKEEPER, atlas_kafka_group_id = default('/configurations/application-properties/atlas.kafka.hook.group.id', None) if security_enabled: - _hostname_lowercase = config['hostname'].lower() + _hostname_lowercase = config['agentLevelParams']['hostname'].lower() _atlas_principal_name = config['configurations']['application-properties']['atlas.authentication.principal'] atlas_jaas_principal = _atlas_principal_name.replace('_HOST',_hostname_lowercase) atlas_keytab_path = config['configurations']['application-properties']['atlas.authentication.keytab'] @@ -143,7 +143,7 @@ else: metadata_port = http_port metadata_protocol = 'http' -metadata_host = config['hostname'] +metadata_host = config['agentLevelParams']['hostname'] atlas_hosts = sorted(default('/clusterHostInfo/atlas_server_hosts', [])) metadata_server_host = atlas_hosts[0] if len(atlas_hosts) > 0 else "UNKNOWN_HOST" @@ -278,7 +278,7 @@ if check_stack_feature(StackFeature.ATLAS_UPGRADE_SUPPORT, version_for_stack_fea (config['configurations']['kafka-broker']['security.inter.broker.protocol'] == "SASL_PLAINTEXT"))) if security_enabled and stack_version_formatted != "" and 'kafka_principal_name' in config['configurations']['kafka-env'] \ and check_stack_feature(StackFeature.KAFKA_KERBEROS, stack_version_formatted): - _hostname_lowercase = config['hostname'].lower() + _hostname_lowercase = config['agentLevelParams']['hostname'].lower() _kafka_principal_name = config['configurations']['kafka-env']['kafka_principal_name'] kafka_jaas_principal = _kafka_principal_name.replace('_HOST', _hostname_lowercase) kafka_keytab_path = config['configurations']['kafka-env']['kafka_keytab'] @@ -289,7 +289,7 @@ if check_stack_feature(StackFeature.ATLAS_UPGRADE_SUPPORT, version_for_stack_fea kafka_jaas_principal = None kafka_keytab_path = None -namenode_host = set(default("/clusterHostInfo/namenode_host", [])) +namenode_host = set(default("/clusterHostInfo/namenode_hosts", [])) has_namenode = not len(namenode_host) == 0 # ranger altas plugin section start http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/status_params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/status_params.py index 6590478..68765c7 100644 --- a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/status_params.py @@ -50,7 +50,7 @@ hbase_user = default("/configurations/hbase-env/hbase_user", None) kafka_user = default("/configurations/kafka-env/kafka_user", None) # Security related/required params -hostname = config['hostname'] +hostname = config['agentLevelParams']['hostname'] security_enabled = default("/configurations/cluster-env/security_enabled", None) kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) tmp_dir = Script.get_tmp_dir() http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py index afbbb5f..d798a83 100644 --- a/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/FLUME/1.4.0.2.0/package/scripts/params.py @@ -81,13 +81,13 @@ flume_command_targets = [] if targets is None else targets.split(',') flume_env_sh_template = config['configurations']['flume-env']['content'] -ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_host', []) +ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_hosts', []) ganglia_server_host = None if 0 != len(ganglia_server_hosts): ganglia_server_host = ganglia_server_hosts[0] hostname = None -if config.has_key('hostname'): +if config['agentLevelParams'].has_key('hostname'): hostname = config['agentLevelParams']['hostname'] set_instanceId = "false" http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/scripts/params.py index 8cb7a0b..de4642a 100644 --- a/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/GANGLIA/3.5.0/package/scripts/params.py @@ -59,11 +59,11 @@ rrdcached_flush_timeout = default("/configurations/ganglia-env/rrdcached_flush_t rrdcached_delay = default("/configurations/ganglia-env/rrdcached_delay", 1800) rrdcached_write_threads = default("/configurations/ganglia-env/rrdcached_write_threads", 4) -ganglia_server_host = config["clusterHostInfo"]["ganglia_server_host"][0] +ganglia_server_host = config["clusterHostInfo"]["ganglia_server_hosts"][0] hostname = config['agentLevelParams']['hostname'] namenode_host = set(default("/clusterHostInfo/namenode_hosts", [])) -jtnode_host = set(default("/clusterHostInfo/jtnode_host", [])) +jtnode_host = set(default("/clusterHostInfo/jtnode_hosts", [])) rm_host = set(default("/clusterHostInfo/resourcemanager_hosts", [])) hs_host = set(default("/clusterHostInfo/historyserver_hosts", [])) hbase_master_hosts = set(default("/clusterHostInfo/hbase_master_hosts", [])) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py index 79bfd62..65d8ada 100644 --- a/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/HAWQ/2.0.0/package/scripts/params.py @@ -103,7 +103,7 @@ XmlConfig = functools.partial(XmlConfig, # For service Check is_pxf_installed = __get_component_host("pxf_hosts") is not None -namenode_path = "{0}:{1}".format(__get_component_host("namenode_host"), hawq_constants.PXF_PORT) if dfs_nameservice is None else dfs_nameservice +namenode_path = "{0}:{1}".format(__get_component_host("namenode_hosts"), hawq_constants.PXF_PORT) if dfs_nameservice is None else dfs_nameservice table_definition = { "HAWQ": { "name": "ambari_hawq_test", @@ -128,7 +128,7 @@ table_definition = { # YARN # Note: YARN is not mandatory for HAWQ. It is required only when the users set HAWQ to use YARN as resource manager -rm_host = __get_component_host('rm_host') +rm_host = __get_component_host('resourcemanager_hosts') is_yarn_ha_enabled = True if str(default('/configurations/yarn-site/yarn.resourcemanager.ha.enabled', False)).lower() == "true" else False # Config files http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/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 58b44c4..cc5bc20 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 @@ -154,7 +154,7 @@ master_jaas_config_file = format("{hbase_conf_dir}/hbase_master_jaas.conf") regionserver_jaas_config_file = format("{hbase_conf_dir}/hbase_regionserver_jaas.conf") queryserver_jaas_config_file = format("{hbase_conf_dir}/hbase_queryserver_jaas.conf") -ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_host', []) # is not passed when ganglia is not present +ganglia_server_hosts = default('/clusterHostInfo/ganglia_server_hosts', []) # is not passed when ganglia is not present has_ganglia_server = not len(ganglia_server_hosts) == 0 if has_ganglia_server: ganglia_server_host = ganglia_server_hosts[0] http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/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 3b4ab30..f0cc9d9 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 @@ -180,14 +180,14 @@ hostname = config['agentLevelParams']['hostname'] rm_host = default("/clusterHostInfo/resourcemanager_hosts", []) public_hostname = config["public_hostname"] oozie_servers = default("/clusterHostInfo/oozie_server", []) -hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", []) -hive_server_host = default("/clusterHostInfo/hive_server_host", []) +hcat_server_hosts = default("/clusterHostInfo/webhcat_server_hosts", []) +hive_server_host = default("/clusterHostInfo/hive_server_hosts", []) hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", []) hs_host = default("/clusterHostInfo/historyserver_hosts", []) -jtnode_host = default("/clusterHostInfo/jtnode_host", []) +jtnode_host = default("/clusterHostInfo/jtnode_hosts", []) namenode_host = default("/clusterHostInfo/namenode_hosts", []) -nm_host = default("/clusterHostInfo/nm_host", []) -ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", []) +nm_host = default("/clusterHostInfo/nodemanager_hosts", []) +ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_hosts", []) journalnode_hosts = default("/clusterHostInfo/journalnode_hosts", []) zkfc_hosts = default("/clusterHostInfo/zkfc_hosts", []) falcon_host = default("/clusterHostInfo/falcon_server_hosts", []) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/params_linux.py index fff1167..6a7de4b 100644 --- a/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/params_linux.py @@ -173,14 +173,14 @@ kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executab hostname = config['agentLevelParams']['hostname'] rm_host = default("/clusterHostInfo/resourcemanager_hosts", []) oozie_servers = default("/clusterHostInfo/oozie_server", []) -hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", []) -hive_server_host = default("/clusterHostInfo/hive_server_host", []) +hcat_server_hosts = default("/clusterHostInfo/webhcat_server_hosts", []) +hive_server_host = default("/clusterHostInfo/hive_server_hosts", []) hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", []) hs_host = default("/clusterHostInfo/historyserver_hosts", []) -jtnode_host = default("/clusterHostInfo/jtnode_host", []) +jtnode_host = default("/clusterHostInfo/jtnode_hosts", []) namenode_host = default("/clusterHostInfo/namenode_hosts", []) -nm_host = default("/clusterHostInfo/nm_host", []) -ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", []) +nm_host = default("/clusterHostInfo/nodemanager_hosts", []) +ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_hosts", []) journalnode_hosts = default("/clusterHostInfo/journalnode_hosts", []) zkfc_hosts = default("/clusterHostInfo/zkfc_hosts", []) falcon_host = default("/clusterHostInfo/falcon_server_hosts", []) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/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 c733ddb..5b7298e 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 @@ -343,11 +343,11 @@ if sqla_db_used: # Start, Common Hosts and Ports ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0] -hive_metastore_hosts = default('/clusterHostInfo/hive_metastore_host', []) +hive_metastore_hosts = default('/clusterHostInfo/hive_metastore_hosts', []) hive_metastore_host = hive_metastore_hosts[0] if len(hive_metastore_hosts) > 0 else None hive_metastore_port = get_port_from_url(config['configurations']['hive-site']['hive.metastore.uris']) -hive_server_hosts = default("/clusterHostInfo/hive_server_host", []) +hive_server_hosts = default("/clusterHostInfo/hive_server_hosts", []) hive_server_host = hive_server_hosts[0] if len(hive_server_hosts) > 0 else None hive_server_interactive_hosts = default('/clusterHostInfo/hive_server_interactive_hosts', []) @@ -454,7 +454,7 @@ java_version = expect("/ambariLevelParams/java_version", int) ##### MYSQL db_name = config['configurations']['hive-env']['hive_database_name'] mysql_group = 'mysql' -mysql_host = config['clusterHostInfo']['hive_mysql_host'] +mysql_host = config['clusterHostInfo']['mysql_server_hosts'] mysql_adduser_path = format("{tmp_dir}/addMysqlUser.sh") mysql_deluser_path = format("{tmp_dir}/removeMysqlUser.sh") @@ -600,7 +600,7 @@ webhcat_pid_file = status_params.webhcat_pid_file templeton_jar = config['configurations']['webhcat-site']['templeton.jar'] -webhcat_server_host = config['clusterHostInfo']['webhcat_server_host'] +webhcat_server_host = config['clusterHostInfo']['webhcat_server_hosts'] hcat_hdfs_user_dir = format("/user/{webhcat_user}") hcat_hdfs_user_mode = 0755 http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py index c18e422..e5eb30e 100644 --- a/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/HIVE/2.1.0.3.0/package/scripts/params_linux.py @@ -341,11 +341,11 @@ if sqla_db_used: # Start, Common Hosts and Ports ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0] -hive_metastore_hosts = default('/clusterHostInfo/hive_metastore_host', []) +hive_metastore_hosts = default('/clusterHostInfo/hive_metastore_hosts', []) hive_metastore_host = hive_metastore_hosts[0] if len(hive_metastore_hosts) > 0 else None hive_metastore_port = get_port_from_url(config['configurations']['hive-site']['hive.metastore.uris']) -hive_server_hosts = default("/clusterHostInfo/hive_server_host", []) +hive_server_hosts = default("/clusterHostInfo/hive_server_hosts", []) hive_server_host = hive_server_hosts[0] if len(hive_server_hosts) > 0 else None hive_server_interactive_hosts = default('/clusterHostInfo/hive_server_interactive_hosts', []) @@ -452,7 +452,7 @@ java_version = expect("/ambariLevelParams/java_version", int) ##### MYSQL db_name = config['configurations']['hive-env']['hive_database_name'] mysql_group = 'mysql' -mysql_host = config['clusterHostInfo']['hive_mysql_host'] +mysql_host = config['clusterHostInfo']['mysql_server_hosts'] mysql_adduser_path = format("{tmp_dir}/addMysqlUser.sh") mysql_deluser_path = format("{tmp_dir}/removeMysqlUser.sh") @@ -596,7 +596,7 @@ webhcat_pid_file = status_params.webhcat_pid_file templeton_jar = config['configurations']['webhcat-site']['templeton.jar'] -webhcat_server_host = config['clusterHostInfo']['webhcat_server_host'] +webhcat_server_host = config['clusterHostInfo']['webhcat_server_hosts'] hcat_hdfs_user_dir = format("/user/{webhcat_user}") hcat_hdfs_user_mode = 0755 http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/package/scripts/params.py index 937c4b5..32ca71c 100644 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.10.0.3.0/package/scripts/params.py @@ -62,7 +62,7 @@ stack_supports_core_site_for_ranger_plugin = check_stack_feature(StackFeature.CO # downgrade_from_version provides the source-version the downgrade is happening from downgrade_from_version = upgrade_summary.get_downgrade_from_version("KAFKA") -hostname = config['hostname'] +hostname = config['agentLevelParams']['hostname'] # default kafka parameters kafka_home = '/usr/lib/kafka' @@ -116,10 +116,10 @@ if (('kafka-log4j' in config['configurations']) and ('content' in config['config else: log4j_props = None -if 'ganglia_server_host' in config['clusterHostInfo'] and \ - len(config['clusterHostInfo']['ganglia_server_host'])>0: +if 'ganglia_server_hosts' in config['clusterHostInfo'] and \ + len(config['clusterHostInfo']['ganglia_server_hosts'])>0: ganglia_installed = True - ganglia_server = config['clusterHostInfo']['ganglia_server_host'][0] + ganglia_server = config['clusterHostInfo']['ganglia_server_hosts'][0] ganglia_report_interval = 60 else: ganglia_installed = False @@ -167,7 +167,7 @@ kafka_kerberos_enabled = (('security.inter.broker.protocol' in config['configura if security_enabled and stack_version_formatted != "" and 'kafka_principal_name' in config['configurations']['kafka-env'] \ and check_stack_feature(StackFeature.KAFKA_KERBEROS, stack_version_formatted): - _hostname_lowercase = config['hostname'].lower() + _hostname_lowercase = config['agentLevelParams']['hostname'].lower() _kafka_principal_name = config['configurations']['kafka-env']['kafka_principal_name'] kafka_jaas_principal = _kafka_principal_name.replace('_HOST',_hostname_lowercase) kafka_keytab_path = config['configurations']['kafka-env']['kafka_keytab'] @@ -310,7 +310,7 @@ cluster_name = config['clusterName'] # ranger kafka plugin section end -namenode_hosts = default("/clusterHostInfo/namenode_host", []) +namenode_hosts = default("/clusterHostInfo/namenode_hosts", []) has_namenode = not len(namenode_hosts) == 0 hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] if has_namenode else None http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py index e46ce78..c26ca2b 100644 --- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1/package/scripts/params.py @@ -111,10 +111,10 @@ if (('kafka-log4j' in config['configurations']) and ('content' in config['config else: log4j_props = None -if 'ganglia_server_host' in config['clusterHostInfo'] and \ - len(config['clusterHostInfo']['ganglia_server_host'])>0: +if 'ganglia_server_hosts' in config['clusterHostInfo'] and \ + len(config['clusterHostInfo']['ganglia_server_hosts'])>0: ganglia_installed = True - ganglia_server = config['clusterHostInfo']['ganglia_server_host'][0] + ganglia_server = config['clusterHostInfo']['ganglia_server_hosts'][0] ganglia_report_interval = 60 else: ganglia_installed = False http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/params.py b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/params.py index 0f2acca..8eb4c75 100644 --- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/params.py @@ -51,7 +51,7 @@ default_group = None kdc_server_host = None cluster_host_info = None -hostname = config['hostname'] +hostname = config['agentLevelParams']['hostname'] kdb5_util_path = 'kdb5_util' http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/status_params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/status_params.py index 8a840fb..cfec53d1a 100644 --- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-30/package/scripts/status_params.py @@ -24,7 +24,7 @@ from resource_management.libraries.functions import default config = Script.get_config() tmp_dir = Script.get_tmp_dir() -hostname = config['hostname'] +hostname = config['agentLevelParams']['hostname'] kinit_path_local = functions.get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) security_enabled = config['configurations']['cluster-env']['security_enabled'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py index 16c59ca..f2d8478 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py @@ -220,14 +220,14 @@ if has_rm: hive_http_port = default('/configurations/hive-site/hive.server2.thrift.http.port', "10001") hive_http_path = default('/configurations/hive-site/hive.server2.thrift.http.path', "cliservice") -hive_server_hosts = default("/clusterHostInfo/hive_server_host", None) +hive_server_hosts = default("/clusterHostInfo/hive_server_hosts", None) if type(hive_server_hosts) is list: hive_server_host = hive_server_hosts[0] else: hive_server_host = hive_server_hosts templeton_port = default('/configurations/webhcat-site/templeton.port', "50111") -webhcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", None) +webhcat_server_hosts = default("/clusterHostInfo/webhcat_server_hosts", None) if type(webhcat_server_hosts) is list: webhcat_server_host = webhcat_server_hosts[0] else: http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_linux.py index b12ffef..c4da932 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_linux.py @@ -141,7 +141,7 @@ if dfs_ha_enabled: namenode_port_map[nn_host_parts[0]] = nn_host_parts[1] -namenode_hosts = default("/clusterHostInfo/namenode_host", None) +namenode_hosts = default("/clusterHostInfo/namenode_hosts", None) if type(namenode_hosts) is list: namenode_host = namenode_hosts[0] else: @@ -199,7 +199,7 @@ if yarn_http_policy != None : yarn_https_on = ( yarn_http_policy.upper() == 'HTTPS_ONLY') yarn_scheme = 'http' if not yarn_https_on else 'https' -rm_hosts = default("/clusterHostInfo/rm_host", None) +rm_hosts = default("/clusterHostInfo/resourcemanager_hosts", None) if type(rm_hosts) is list: rm_host = rm_hosts[0] else: @@ -218,14 +218,14 @@ if has_rm: hive_http_port = default('/configurations/hive-site/hive.server2.thrift.http.port', "10001") hive_http_path = default('/configurations/hive-site/hive.server2.thrift.http.path', "cliservice") -hive_server_hosts = default("/clusterHostInfo/hive_server_host", None) +hive_server_hosts = default("/clusterHostInfo/hive_server_hosts", None) if type(hive_server_hosts) is list: hive_server_host = hive_server_hosts[0] else: hive_server_host = hive_server_hosts templeton_port = default('/configurations/webhcat-site/templeton.port', "50111") -webhcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", None) +webhcat_server_hosts = default("/clusterHostInfo/webhcat_server_hosts", None) if type(webhcat_server_hosts) is list: webhcat_server_host = webhcat_server_hosts[0] else: @@ -351,7 +351,7 @@ knox_ldap_log_maxbackupindex = default('/configurations/ldap-log4j/knox_ldap_log # server configurations knox_master_secret = config['configurations']['knox-env']['knox_master_secret'] knox_host_name = config['clusterHostInfo']['knox_gateway_hosts'][0] -knox_host_name_in_cluster = config['hostname'] +knox_host_name_in_cluster = config['agentLevelParams']['hostname'] knox_host_port = config['configurations']['gateway-site']['gateway.port'] topology_template = config['configurations']['topology']['content'] admin_topology_template = default('/configurations/admin-topology/content', None) @@ -367,7 +367,7 @@ smoke_user_keytab = config['configurations']['cluster-env']['smokeuser_keytab'] kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) if security_enabled: knox_keytab_path = config['configurations']['knox-env']['knox_keytab_path'] - _hostname_lowercase = config['hostname'].lower() + _hostname_lowercase = config['agentLevelParams']['hostname'].lower() knox_principal_name = config['configurations']['knox-env']['knox_principal_name'].replace('_HOST',_hostname_lowercase) # for curl command in ranger plugin to get db connector http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_windows.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_windows.py index 631146d..6c0e940 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/params_windows.py @@ -54,7 +54,7 @@ except: knox_host_port = config['configurations']['gateway-site']['gateway.port'] knox_host_name = config['clusterHostInfo']['knox_gateway_hosts'][0] -knox_host_name_in_cluster = config['hostname'] +knox_host_name_in_cluster = config['agentLevelParams']['hostname'] knox_master_secret = config['configurations']['knox-env']['knox_master_secret'] topology_template = config['configurations']['topology']['content'] admin_topology_template = default('/configurations/admin-topology/content', None) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/status_params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/status_params.py index 699d9a8..8b441d5 100644 --- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.3.0/package/scripts/status_params.py @@ -51,7 +51,7 @@ else: knox_keytab_path = None knox_principal_name = None - hostname = config['hostname'].lower() + hostname = config['agentLevelParams']['hostname'].lower() knox_user = default("/configurations/knox-env/knox_user", "knox") kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) temp_dir = Script.get_tmp_dir() http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py index 64d7c5a..a0bf339 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py @@ -59,7 +59,7 @@ realm_name = config['configurations']['kerberos-env']['realm'] is_hbase_installed = default("/clusterHostInfo/hbase_master_hosts", None) is not None #Hive -is_hive_installed = default("/clusterHostInfo/hive_server_host", None) is not None +is_hive_installed = default("/clusterHostInfo/hive_server_hosts", None) is not None # HDFS hdfs_site = config['configurations']['hdfs-site'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py index b090e98..3c83e32 100644 --- a/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/service_check.py @@ -341,7 +341,7 @@ class PXFServiceCheck(Script): # Get the parameters required to create jdbc url for beeline hive_server_port = default("/configurations/hive-site/hive.server2.thrift.port", None) - hive_server_host = default("/clusterHostInfo/hive_server_host", None) + hive_server_host = default("/clusterHostInfo/hive_server_hosts", None) if hive_server_host is None or hive_server_port is None: raise Fail("Input parameters are invalid for beeline connection string, both hive_server_host and " \ "hive.server2.thrift.port should be not None. Current values are:\nhive_server_host={0}\n" \ http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py index 1e968a3..912329d 100644 --- a/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/RANGER/1.0.0.3.0/package/scripts/params.py @@ -251,7 +251,7 @@ ranger_ug_ldap_user_searchfilter = config["configurations"]["ranger-ugsync-site" ranger_ug_ldap_group_searchbase = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.group.searchbase"] ranger_ug_ldap_group_searchfilter = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.group.searchfilter"] ug_sync_source = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.source.impl.class"] -current_host = config['hostname'] +current_host = config['agentLevelParams']['hostname'] if current_host in ranger_admin_hosts: ranger_host = current_host @@ -280,7 +280,7 @@ tagsync_log4j = config['configurations']['tagsync-log4j']['content'] # ranger kerberos security_enabled = config['configurations']['cluster-env']['security_enabled'] -namenode_hosts = default("/clusterHostInfo/namenode_host", []) +namenode_hosts = default("/clusterHostInfo/namenode_hosts", []) has_namenode = len(namenode_hosts) > 0 ugsync_policymgr_alias = config["configurations"]["ranger-ugsync-site"]["ranger.usersync.policymgr.alias"] http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py index 156db10..9ef127b 100755 --- a/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/RANGER_KMS/1.0.0.3.0/package/scripts/params.py @@ -237,7 +237,7 @@ ssl_truststore_password = unicode(config['configurations']['ranger-kms-policymgr if xa_audit_db_flavor == 'sqla': xa_audit_db_is_enabled = False -current_host = config['hostname'] +current_host = config['agentLevelParams']['hostname'] ranger_kms_hosts = config['clusterHostInfo']['ranger_kms_server_hosts'] if current_host in ranger_kms_hosts: kms_host = current_host @@ -299,7 +299,7 @@ ranger_kms_ssl_passwd = config['configurations']['ranger-kms-site']['ranger.serv ranger_kms_ssl_enabled = config['configurations']['ranger-kms-site']['ranger.service.https.attrib.ssl.enabled'] xa_audit_hdfs_is_enabled = default("/configurations/ranger-kms-audit/xasecure.audit.destination.hdfs", False) -namenode_host = default("/clusterHostInfo/namenode_host", []) +namenode_host = default("/clusterHostInfo/namenode_hosts", []) # need this to capture cluster name from where ranger kms plugin is enabled cluster_name = config['clusterName'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/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 63cee09..3569450 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 @@ -130,7 +130,7 @@ spark_env_sh = config['configurations']['spark-env']['content'] spark_log4j_properties = config['configurations']['spark-log4j-properties']['content'] spark_metrics_properties = config['configurations']['spark-metrics-properties']['content'] -hive_server_host = default("/clusterHostInfo/hive_server_host", []) +hive_server_host = default("/clusterHostInfo/hive_server_hosts", []) is_hive_installed = not len(hive_server_host) == 0 full_stack_version = get_stack_version('spark-client') http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/SPARK/2.2.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/SPARK/2.2.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/2.2.0/package/scripts/params.py index 1d36a75..a7df33a 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/2.2.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SPARK/2.2.0/package/scripts/params.py @@ -126,7 +126,7 @@ spark_env_sh = config['configurations']['spark-env']['content'] spark_log4j_properties = config['configurations']['spark-log4j-properties']['content'] spark_metrics_properties = config['configurations']['spark-metrics-properties']['content'] -hive_server_host = default("/clusterHostInfo/hive_server_host", []) +hive_server_host = default("/clusterHostInfo/hive_server_hosts", []) is_hive_installed = not len(hive_server_host) == 0 security_enabled = config['configurations']['cluster-env']['security_enabled'] @@ -242,7 +242,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac if len(livy_livyserver_hosts) > 0: has_livyserver = True if security_enabled: - livy_principal = livy_kerberos_principal.replace('_HOST', config['hostname'].lower()) + livy_principal = livy_kerberos_principal.replace('_HOST', config['agentLevelParams']['hostname'].lower()) livy_livyserver_port = default('configurations/livy-conf/livy.server.port',8999) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py index 2d6469c..6eb434b 100755 --- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py @@ -125,7 +125,7 @@ spark_env_sh = config['configurations']['spark2-env']['content'] spark_log4j_properties = config['configurations']['spark2-log4j-properties']['content'] spark_metrics_properties = config['configurations']['spark2-metrics-properties']['content'] -hive_server_host = default("/clusterHostInfo/hive_server_host", []) +hive_server_host = default("/clusterHostInfo/hive_server_hosts", []) is_hive_installed = not len(hive_server_host) == 0 security_enabled = config['configurations']['cluster-env']['security_enabled'] http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py index 664c582..07ae182 100644 --- a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/params_linux.py @@ -131,9 +131,9 @@ rest_api_conf_file = format("{conf_dir}/config.yaml") storm_env_sh_template = config['configurations']['storm-env']['content'] jmxremote_port = config['configurations']['storm-env']['jmxremote_port'] -if 'ganglia_server_host' in config['clusterHostInfo'] and len(config['clusterHostInfo']['ganglia_server_host'])>0: +if 'ganglia_server_hosts' in config['clusterHostInfo'] and len(config['clusterHostInfo']['ganglia_server_hosts'])>0: ganglia_installed = True - ganglia_server = config['clusterHostInfo']['ganglia_server_host'][0] + ganglia_server = config['clusterHostInfo']['ganglia_server_hosts'][0] ganglia_report_interval = 60 else: ganglia_installed = False @@ -146,7 +146,7 @@ storm_user_nofile_limit = default('/configurations/storm-env/storm_user_nofile_l storm_user_nproc_limit = default('/configurations/storm-env/storm_user_noproc_limit', 65536) if security_enabled: - _hostname_lowercase = config['hostname'].lower() + _hostname_lowercase = config['agentLevelParams']['hostname'].lower() _storm_principal_name = config['configurations']['storm-env']['storm_principal_name'] storm_jaas_principal = _storm_principal_name.replace('_HOST',_hostname_lowercase) _ambari_principal_name = default('/configurations/cluster-env/ambari_principal_name', None) @@ -391,7 +391,7 @@ if enable_ranger_storm: # ranger storm plugin end section -namenode_hosts = default("/clusterHostInfo/namenode_host", []) +namenode_hosts = default("/clusterHostInfo/namenode_hosts", []) has_namenode = not len(namenode_hosts) == 0 hdfs_user = config['configurations']['hadoop-env']['hdfs_user'] if has_namenode else None http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/status_params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/status_params.py b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/status_params.py index 7d97203..d08880b 100644 --- a/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/status_params.py +++ b/ambari-server/src/main/resources/common-services/STORM/1.0.1.3.0/package/scripts/status_params.py @@ -65,7 +65,7 @@ else: } # Security related/required params - hostname = config['hostname'] + hostname = config['agentLevelParams']['hostname'] security_enabled = config['configurations']['cluster-env']['security_enabled'] kinit_path_local = get_kinit_path(default('/configurations/kerberos-env/executable_search_paths', None)) tmp_dir = Script.get_tmp_dir() http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/SUPERSET/0.15.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/SUPERSET/0.15.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SUPERSET/0.15.0/package/scripts/params.py index df0d9fd..695dcb1 100644 --- a/ambari-server/src/main/resources/common-services/SUPERSET/0.15.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/SUPERSET/0.15.0/package/scripts/params.py @@ -38,7 +38,7 @@ user_group = config['configurations']['cluster-env']['user_group'] # stack version stack_version = default("/commandParams/version", None) -hostname = config['hostname'] +hostname = config['agentLevelParams']['hostname'] # status params status_pid_dir = status_params.superset_pid_dir http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_windows.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_windows.py index a1faf77..1e6d3cf 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_windows.py @@ -50,7 +50,7 @@ rm_https_port = "8090" rm_webui_address = format("{rm_host}:{rm_port}") rm_webui_https_address = format("{rm_host}:{rm_https_port}") -hs_host = config['clusterHostInfo']['hs_host'][0] +hs_host = config['clusterHostInfo']['historyserver_hosts'][0] hs_port = config['configurations']['mapred-site']['mapreduce.jobhistory.webapp.address'].split(':')[-1] hs_webui_address = format("{hs_host}:{hs_port}") http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_windows.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_windows.py index a1faf77..1e6d3cf 100644 --- a/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/package/scripts/params_windows.py @@ -50,7 +50,7 @@ rm_https_port = "8090" rm_webui_address = format("{rm_host}:{rm_port}") rm_webui_https_address = format("{rm_host}:{rm_https_port}") -hs_host = config['clusterHostInfo']['hs_host'][0] +hs_host = config['clusterHostInfo']['historyserver_hosts'][0] hs_port = config['configurations']['mapred-site']['mapreduce.jobhistory.webapp.address'].split(':')[-1] hs_webui_address = format("{hs_host}:{hs_port}") http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/params.py index dd370bd..23dd4dd 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/params.py @@ -116,7 +116,6 @@ log4j_properties_content = config['configurations']['zeppelin-log4j-properties'] # detect configs master_configs = config['clusterHostInfo'] java64_home = config['ambariLevelParams']['java_home'] -ambari_host = str(master_configs['ambari_server_host'][0]) zeppelin_host = str(master_configs['zeppelin_master_hosts'][0]) ui_ssl_enabled = config['configurations']['zeppelin-config']['zeppelin.ssl'] @@ -132,13 +131,13 @@ is_hive_installed = False hive_zookeeper_namespace = None hive_interactive_zookeeper_namespace = None -if 'hive_server_host' in master_configs and len(master_configs['hive_server_host']) != 0: +if 'hive_server_hosts' in master_configs and len(master_configs['hive_server_hosts']) != 0: is_hive_installed = True spark_hive_properties = { 'hive.metastore.uris': default('/configurations/hive-site/hive.metastore.uris', '') } - hive_server_host = str(master_configs['hive_server_host'][0]) - hive_metastore_host = str(master_configs['hive_metastore_host'][0]) + hive_server_host = str(master_configs['hive_server_hosts'][0]) + hive_metastore_host = str(master_configs['hive_metastore_hosts'][0]) hive_metastore_port = str( get_port_from_url(default('/configurations/hive-site/hive.metastore.uris', ''))) hive_server_port = str(config['configurations']['hive-site']['hive.server2.thrift.http.port']) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py index dd370bd..23dd4dd 100644 --- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/params.py @@ -116,7 +116,6 @@ log4j_properties_content = config['configurations']['zeppelin-log4j-properties'] # detect configs master_configs = config['clusterHostInfo'] java64_home = config['ambariLevelParams']['java_home'] -ambari_host = str(master_configs['ambari_server_host'][0]) zeppelin_host = str(master_configs['zeppelin_master_hosts'][0]) ui_ssl_enabled = config['configurations']['zeppelin-config']['zeppelin.ssl'] @@ -132,13 +131,13 @@ is_hive_installed = False hive_zookeeper_namespace = None hive_interactive_zookeeper_namespace = None -if 'hive_server_host' in master_configs and len(master_configs['hive_server_host']) != 0: +if 'hive_server_hosts' in master_configs and len(master_configs['hive_server_hosts']) != 0: is_hive_installed = True spark_hive_properties = { 'hive.metastore.uris': default('/configurations/hive-site/hive.metastore.uris', '') } - hive_server_host = str(master_configs['hive_server_host'][0]) - hive_metastore_host = str(master_configs['hive_metastore_host'][0]) + hive_server_host = str(master_configs['hive_server_hosts'][0]) + hive_metastore_host = str(master_configs['hive_metastore_hosts'][0]) hive_metastore_port = str( get_port_from_url(default('/configurations/hive-site/hive.metastore.uris', ''))) hive_server_port = str(config['configurations']['hive-site']['hive.server2.thrift.http.port']) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py index efd00bf..0cbf66b 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/params.py @@ -186,7 +186,7 @@ zeppelin_group = config['configurations']['zeppelin-env']["zeppelin_group"] user_group = config['configurations']['cluster-env']['user_group'] -ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", []) +ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_hosts", []) namenode_host = default("/clusterHostInfo/namenode_hosts", []) hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", []) oozie_servers = default("/clusterHostInfo/oozie_server", []) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py index 811cc11..36deb2c 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py @@ -55,14 +55,14 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0] rm_host = default("/clusterHostInfo/resourcemanager_hosts", []) slave_hosts = default("/clusterHostInfo/datanode_hosts", []) oozie_servers = default("/clusterHostInfo/oozie_server", []) -hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", []) -hive_server_host = default("/clusterHostInfo/hive_server_host", []) +hcat_server_hosts = default("/clusterHostInfo/webhcat_server_hosts", []) +hive_server_host = default("/clusterHostInfo/hive_server_hosts", []) hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", []) hs_host = default("/clusterHostInfo/historyserver_hosts", []) -jtnode_host = default("/clusterHostInfo/jtnode_host", []) +jtnode_host = default("/clusterHostInfo/jtnode_hosts", []) namenode_host = default("/clusterHostInfo/namenode_hosts", []) zk_hosts = default("/clusterHostInfo/zookeeper_hosts", []) -ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", []) +ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_hosts", []) storm_server_hosts = default("/clusterHostInfo/nimbus_hosts", []) falcon_host = default('/clusterHostInfo/falcon_server_hosts', []) http://git-wip-us.apache.org/repos/asf/ambari/blob/7da02bb9/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py index 466837c..455f7a4 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py @@ -113,14 +113,14 @@ ambari_server_hostname = config['clusterHostInfo']['ambari_server_host'][0] rm_host = default("/clusterHostInfo/resourcemanager_hosts", []) slave_hosts = default("/clusterHostInfo/datanode_hosts", []) oozie_servers = default("/clusterHostInfo/oozie_server", []) -hcat_server_hosts = default("/clusterHostInfo/webhcat_server_host", []) -hive_server_host = default("/clusterHostInfo/hive_server_host", []) +hcat_server_hosts = default("/clusterHostInfo/webhcat_server_hosts", []) +hive_server_host = default("/clusterHostInfo/hive_server_hosts", []) hbase_master_hosts = default("/clusterHostInfo/hbase_master_hosts", []) hs_host = default("/clusterHostInfo/historyserver_hosts", []) -jtnode_host = default("/clusterHostInfo/jtnode_host", []) +jtnode_host = default("/clusterHostInfo/jtnode_hosts", []) namenode_host = default("/clusterHostInfo/namenode_hosts", []) zk_hosts = default("/clusterHostInfo/zookeeper_hosts", []) -ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_host", []) +ganglia_server_hosts = default("/clusterHostInfo/ganglia_server_hosts", []) cluster_name = config["clusterName"] set_instanceId = "false" if 'cluster-env' in config['configurations'] and \
