Repository: ambari Updated Branches: refs/heads/branch-2.1 261fd7f76 -> ef71690b5 refs/heads/trunk 6ca17505b -> 913121389
AMBARI-12310. Yarn Service check from Ambari fails on WireEncrypted Cluster (aonishuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/91312138 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/91312138 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/91312138 Branch: refs/heads/trunk Commit: 9131213895c9bf9cb05023f4ffba74e21a41549e Parents: 6ca1750 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Tue Jul 7 14:10:58 2015 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Tue Jul 7 14:10:58 2015 +0300 ---------------------------------------------------------------------- .../YARN/2.1.0.2.0/package/scripts/params_linux.py | 11 ++++++----- .../YARN/2.1.0.2.0/package/scripts/service_check.py | 4 ++-- .../test/python/stacks/2.0.6/configs/client-upgrade.json | 3 ++- .../src/test/python/stacks/2.0.6/configs/default.json | 3 ++- .../src/test/python/stacks/2.0.6/configs/secured.json | 3 ++- 5 files changed, 14 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/91312138/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py index 790c51b..0b1bec5 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py @@ -281,6 +281,11 @@ else: ranger_admin_log_dir = default("/configurations/ranger-env/ranger_admin_log_dir","/var/log/ranger/admin") +yarn_http_policy = config['configurations']['yarn-site']['yarn.http.policy'] +yarn_https_on = (yarn_http_policy.upper() == 'HTTPS_ONLY') +scheme = 'http' if not yarn_https_on else 'https' +yarn_rm_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] if not yarn_https_on else config['configurations']['yarn-site']['yarn.resourcemanager.webapp.https.address'] + #ranger yarn properties if has_ranger_admin: is_supported_yarn_ranger = config['configurations']['yarn-env']['is_supported_yarn_ranger'] @@ -299,11 +304,7 @@ if has_ranger_admin: ranger_env = config['configurations']['ranger-env'] ranger_plugin_properties = config['configurations']['ranger-yarn-plugin-properties'] policy_user = config['configurations']['ranger-yarn-plugin-properties']['policy_user'] - yarn_rest_url = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] - yarn_http_policy = config['configurations']['yarn-site']['yarn.http.policy'] - scheme = 'http' - if yarn_http_policy.upper() == 'HTTPS_ONLY': - scheme = 'https' + yarn_rest_url = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address'] ranger_plugin_config = { 'username' : config['configurations']['ranger-yarn-plugin-properties']['REPOSITORY_CONFIG_USERNAME'], http://git-wip-us.apache.org/repos/asf/ambari/blob/91312138/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py index f4b0969..a58db1d 100644 --- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py +++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service_check.py @@ -114,9 +114,9 @@ class ServiceCheckDefault(ServiceCheck): json_response_received = False for rm_host in params.rm_hosts: - info_app_url = "http://" + rm_host + ":" + params.rm_port + "/ws/v1/cluster/apps/" + application_name + info_app_url = params.scheme + "://" + params.yarn_rm_address + "/ws/v1/cluster/apps/" + application_name - get_app_info_cmd = "curl --negotiate -u : -sL --connect-timeout " + CURL_CONNECTION_TIMEOUT + " " + info_app_url + get_app_info_cmd = "curl --negotiate -u : -ksL --connect-timeout " + CURL_CONNECTION_TIMEOUT + " " + info_app_url return_code, stdout = shell.checked_call(get_app_info_cmd, path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin', http://git-wip-us.apache.org/repos/asf/ambari/blob/91312138/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json index 4c7b090..a8bc490 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/client-upgrade.json @@ -483,7 +483,8 @@ "yarn.resourcemanager.admin.address": "c6402.ambari.apache.org:8141", "yarn.timeline-service.webapp.https.address": "c6402.ambari.apache.org:8190", "yarn.resourcemanager.connect.retry-interval.ms": "30000", - "yarn.timeline-service.leveldb-timeline-store.start-time-write-cache-size": "10000" + "yarn.timeline-service.leveldb-timeline-store.start-time-write-cache-size": "10000", + "yarn.http.policy": "HTTP_ONLY" }, "capacity-scheduler": { "yarn.scheduler.capacity.default.minimum-user-limit-percent": "100", http://git-wip-us.apache.org/repos/asf/ambari/blob/91312138/ambari-server/src/test/python/stacks/2.0.6/configs/default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json index 08247c7..e8163ee 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/default.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/default.json @@ -473,7 +473,8 @@ "yarn.application.classpath": "/etc/hadoop/conf,/usr/lib/hadoop/*,/usr/lib/hadoop/lib/*,/usr/lib/hadoop-hdfs/*,/usr/lib/hadoop-hdfs/lib/*,/usr/lib/hadoop-yarn/*,/usr/lib/hadoop-yarn/lib/*,/usr/lib/hadoop-mapreduce/*,/usr/lib/hadoop-mapreduce/lib/*", "yarn.resourcemanager.admin.address": "c6402.ambari.apache.org:8141", "yarn.nodemanager.aux-services.mapreduce_shuffle.class": "org.apache.hadoop.mapred.ShuffleHandler", - "yarn.timeline-service.leveldb-timeline-store.path": "/var/log/hadoop-yarn/timeline" + "yarn.timeline-service.leveldb-timeline-store.path": "/var/log/hadoop-yarn/timeline", + "yarn.http.policy": "HTTP_ONLY" }, "tez-site": { "tez.am.log.level": "WARN", http://git-wip-us.apache.org/repos/asf/ambari/blob/91312138/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json index c50a923..88cbe5f 100644 --- a/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json +++ b/ambari-server/src/test/python/stacks/2.0.6/configs/secured.json @@ -528,7 +528,8 @@ "yarn.nodemanager.aux-services.mapreduce_shuffle.class": "org.apache.hadoop.mapred.ShuffleHandler", "yarn.timeline-service.leveldb-timeline-store.path": "/var/log/hadoop-yarn/timeline", "yarn.timeline-service.principal": "yarn/_h...@example.com", - "yarn.timeline-service.keytab" : "/etc/security/keytabs/yarn.service.keytab" + "yarn.timeline-service.keytab" : "/etc/security/keytabs/yarn.service.keytab", + "yarn.http.policy": "HTTP_ONLY" }, "yarn-env": { "yarn_pid_dir_prefix": "/var/run/hadoop-yarn",