[39/50] [abbrv] ambari git commit: AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty)
AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/350dace6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/350dace6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/350dace6 Branch: refs/heads/branch-feature-AMBARI-20859 Commit: 350dace643e3edad2407c80f38edad5847b47706 Parents: 704eb52 Author: Sumit MohantyAuthored: Tue May 16 19:20:24 2017 -0700 Committer: Sumit Mohanty Committed: Tue May 16 19:20:24 2017 -0700 -- .../1.2.1/package/scripts/alerts/alert_spark_livy_port.py | 6 -- .../common-services/SPARK/1.2.1/package/scripts/params.py | 1 + .../SPARK/1.2.1/package/scripts/service_check.py | 2 +- .../2.0.0/package/scripts/alerts/alert_spark2_livy_port.py | 6 -- .../common-services/SPARK2/2.0.0/package/scripts/params.py | 1 + .../SPARK2/2.0.0/package/scripts/service_check.py | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/350dace6/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py index f15e747..f3a63b2 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py @@ -46,6 +46,7 @@ SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' +LIVY_SSL_ENABLED_KEY = '{{livy-conf/livy.keystore}}' # The configured Kerberos executable search paths, if any KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}' @@ -57,7 +58,7 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ -return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY) +return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY,LIVY_SSL_ENABLED_KEY) @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def execute(configurations={}, parameters={}, host_name=None): @@ -118,13 +119,14 @@ def execute(configurations={}, parameters={}, host_name=None): finally: kinit_lock.release() +http_scheme = 'https' if LIVY_SSL_ENABLED_KEY in configurations else 'http' result_code = None try: start_time = time.time() try: livy_livyserver_host = str(host_name) -livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k http://{livy_livyserver_host}:{port}/sessions | grep 200 ") +livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {http_scheme}://{livy_livyserver_host}:{port}/sessions | grep 200 ") Execute(livy_cmd, tries=3, http://git-wip-us.apache.org/repos/asf/ambari/blob/350dace6/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 42396bd..74fd76a 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 @@ -242,6 +242,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.launch.kerberos.principal'] livy_livyserver_hosts = default("/clusterHostInfo/livy_server_hosts", []) + livy_http_scheme = 'https' if 'livy.keystore' in config['configurations']['livy-conf'] else 'http' # ats 1.5 properties entity_groupfs_active_dir = config['configurations']['yarn-site']['yarn.timeline-service.entity-group-fs-store.active-dir']
[07/24] ambari git commit: AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty)
AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/350dace6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/350dace6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/350dace6 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 350dace643e3edad2407c80f38edad5847b47706 Parents: 704eb52 Author: Sumit MohantyAuthored: Tue May 16 19:20:24 2017 -0700 Committer: Sumit Mohanty Committed: Tue May 16 19:20:24 2017 -0700 -- .../1.2.1/package/scripts/alerts/alert_spark_livy_port.py | 6 -- .../common-services/SPARK/1.2.1/package/scripts/params.py | 1 + .../SPARK/1.2.1/package/scripts/service_check.py | 2 +- .../2.0.0/package/scripts/alerts/alert_spark2_livy_port.py | 6 -- .../common-services/SPARK2/2.0.0/package/scripts/params.py | 1 + .../SPARK2/2.0.0/package/scripts/service_check.py | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/350dace6/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py index f15e747..f3a63b2 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py @@ -46,6 +46,7 @@ SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' +LIVY_SSL_ENABLED_KEY = '{{livy-conf/livy.keystore}}' # The configured Kerberos executable search paths, if any KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}' @@ -57,7 +58,7 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ -return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY) +return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY,LIVY_SSL_ENABLED_KEY) @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def execute(configurations={}, parameters={}, host_name=None): @@ -118,13 +119,14 @@ def execute(configurations={}, parameters={}, host_name=None): finally: kinit_lock.release() +http_scheme = 'https' if LIVY_SSL_ENABLED_KEY in configurations else 'http' result_code = None try: start_time = time.time() try: livy_livyserver_host = str(host_name) -livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k http://{livy_livyserver_host}:{port}/sessions | grep 200 ") +livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {http_scheme}://{livy_livyserver_host}:{port}/sessions | grep 200 ") Execute(livy_cmd, tries=3, http://git-wip-us.apache.org/repos/asf/ambari/blob/350dace6/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 42396bd..74fd76a 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 @@ -242,6 +242,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.launch.kerberos.principal'] livy_livyserver_hosts = default("/clusterHostInfo/livy_server_hosts", []) + livy_http_scheme = 'https' if 'livy.keystore' in config['configurations']['livy-conf'] else 'http' # ats 1.5 properties entity_groupfs_active_dir = config['configurations']['yarn-site']['yarn.timeline-service.entity-group-fs-store.active-dir']
[11/25] ambari git commit: AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty)
AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/350dace6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/350dace6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/350dace6 Branch: refs/heads/branch-feature-AMBARI-14714 Commit: 350dace643e3edad2407c80f38edad5847b47706 Parents: 704eb52 Author: Sumit MohantyAuthored: Tue May 16 19:20:24 2017 -0700 Committer: Sumit Mohanty Committed: Tue May 16 19:20:24 2017 -0700 -- .../1.2.1/package/scripts/alerts/alert_spark_livy_port.py | 6 -- .../common-services/SPARK/1.2.1/package/scripts/params.py | 1 + .../SPARK/1.2.1/package/scripts/service_check.py | 2 +- .../2.0.0/package/scripts/alerts/alert_spark2_livy_port.py | 6 -- .../common-services/SPARK2/2.0.0/package/scripts/params.py | 1 + .../SPARK2/2.0.0/package/scripts/service_check.py | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/350dace6/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py index f15e747..f3a63b2 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py @@ -46,6 +46,7 @@ SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' +LIVY_SSL_ENABLED_KEY = '{{livy-conf/livy.keystore}}' # The configured Kerberos executable search paths, if any KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}' @@ -57,7 +58,7 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ -return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY) +return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY,LIVY_SSL_ENABLED_KEY) @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def execute(configurations={}, parameters={}, host_name=None): @@ -118,13 +119,14 @@ def execute(configurations={}, parameters={}, host_name=None): finally: kinit_lock.release() +http_scheme = 'https' if LIVY_SSL_ENABLED_KEY in configurations else 'http' result_code = None try: start_time = time.time() try: livy_livyserver_host = str(host_name) -livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k http://{livy_livyserver_host}:{port}/sessions | grep 200 ") +livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {http_scheme}://{livy_livyserver_host}:{port}/sessions | grep 200 ") Execute(livy_cmd, tries=3, http://git-wip-us.apache.org/repos/asf/ambari/blob/350dace6/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 42396bd..74fd76a 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 @@ -242,6 +242,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.launch.kerberos.principal'] livy_livyserver_hosts = default("/clusterHostInfo/livy_server_hosts", []) + livy_http_scheme = 'https' if 'livy.keystore' in config['configurations']['livy-conf'] else 'http' # ats 1.5 properties entity_groupfs_active_dir = config['configurations']['yarn-site']['yarn.timeline-service.entity-group-fs-store.active-dir']
ambari git commit: AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty)
Repository: ambari Updated Branches: refs/heads/branch-2.5 7f745d5fe -> b6bc82b77 AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b6bc82b7 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b6bc82b7 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b6bc82b7 Branch: refs/heads/branch-2.5 Commit: b6bc82b77766c2351cbaeec7760d44f006de2d7e Parents: 7f745d5 Author: Sumit MohantyAuthored: Tue May 16 19:20:24 2017 -0700 Committer: Sumit Mohanty Committed: Tue May 16 19:23:33 2017 -0700 -- .../1.2.1/package/scripts/alerts/alert_spark_livy_port.py | 6 -- .../common-services/SPARK/1.2.1/package/scripts/params.py | 1 + .../SPARK/1.2.1/package/scripts/service_check.py | 2 +- .../2.0.0/package/scripts/alerts/alert_spark2_livy_port.py | 6 -- .../common-services/SPARK2/2.0.0/package/scripts/params.py | 1 + .../SPARK2/2.0.0/package/scripts/service_check.py | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/b6bc82b7/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py index f15e747..f3a63b2 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py @@ -46,6 +46,7 @@ SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' +LIVY_SSL_ENABLED_KEY = '{{livy-conf/livy.keystore}}' # The configured Kerberos executable search paths, if any KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}' @@ -57,7 +58,7 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ -return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY) +return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY,LIVY_SSL_ENABLED_KEY) @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def execute(configurations={}, parameters={}, host_name=None): @@ -118,13 +119,14 @@ def execute(configurations={}, parameters={}, host_name=None): finally: kinit_lock.release() +http_scheme = 'https' if LIVY_SSL_ENABLED_KEY in configurations else 'http' result_code = None try: start_time = time.time() try: livy_livyserver_host = str(host_name) -livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k http://{livy_livyserver_host}:{port}/sessions | grep 200 ") +livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {http_scheme}://{livy_livyserver_host}:{port}/sessions | grep 200 ") Execute(livy_cmd, tries=3, http://git-wip-us.apache.org/repos/asf/ambari/blob/b6bc82b7/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 fd473ad..b54b565 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 @@ -243,6 +243,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.launch.kerberos.principal'] livy_livyserver_hosts = default("/clusterHostInfo/livy_server_hosts", []) + livy_http_scheme = 'https' if 'livy.keystore' in config['configurations']['livy-conf'] else 'http' # ats 1.5 properties entity_groupfs_active_dir =
ambari git commit: AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty)
Repository: ambari Updated Branches: refs/heads/trunk 704eb5254 -> 350dace64 AMBARI-21012. Fix Livy service check and alerts script with SSL enabled (Saisai Shao via smohanty) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/350dace6 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/350dace6 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/350dace6 Branch: refs/heads/trunk Commit: 350dace643e3edad2407c80f38edad5847b47706 Parents: 704eb52 Author: Sumit MohantyAuthored: Tue May 16 19:20:24 2017 -0700 Committer: Sumit Mohanty Committed: Tue May 16 19:20:24 2017 -0700 -- .../1.2.1/package/scripts/alerts/alert_spark_livy_port.py | 6 -- .../common-services/SPARK/1.2.1/package/scripts/params.py | 1 + .../SPARK/1.2.1/package/scripts/service_check.py | 2 +- .../2.0.0/package/scripts/alerts/alert_spark2_livy_port.py | 6 -- .../common-services/SPARK2/2.0.0/package/scripts/params.py | 1 + .../SPARK2/2.0.0/package/scripts/service_check.py | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/350dace6/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py -- diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py index f15e747..f3a63b2 100644 --- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py +++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/alerts/alert_spark_livy_port.py @@ -46,6 +46,7 @@ SECURITY_ENABLED_KEY = '{{cluster-env/security_enabled}}' SMOKEUSER_KEYTAB_KEY = '{{cluster-env/smokeuser_keytab}}' SMOKEUSER_PRINCIPAL_KEY = '{{cluster-env/smokeuser_principal_name}}' SMOKEUSER_KEY = '{{cluster-env/smokeuser}}' +LIVY_SSL_ENABLED_KEY = '{{livy-conf/livy.keystore}}' # The configured Kerberos executable search paths, if any KERBEROS_EXECUTABLE_SEARCH_PATHS_KEY = '{{kerberos-env/executable_search_paths}}' @@ -57,7 +58,7 @@ def get_tokens(): Returns a tuple of tokens in the format {{site/property}} that will be used to build the dictionary passed into execute """ -return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY) +return (LIVY_SERVER_PORT_KEY,LIVYUSER_DEFAULT,SECURITY_ENABLED_KEY,SMOKEUSER_KEYTAB_KEY,SMOKEUSER_PRINCIPAL_KEY,SMOKEUSER_KEY,LIVY_SSL_ENABLED_KEY) @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT) def execute(configurations={}, parameters={}, host_name=None): @@ -118,13 +119,14 @@ def execute(configurations={}, parameters={}, host_name=None): finally: kinit_lock.release() +http_scheme = 'https' if LIVY_SSL_ENABLED_KEY in configurations else 'http' result_code = None try: start_time = time.time() try: livy_livyserver_host = str(host_name) -livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k http://{livy_livyserver_host}:{port}/sessions | grep 200 ") +livy_cmd = format("curl -s -o /dev/null -w'%{{http_code}}' --negotiate -u: -k {http_scheme}://{livy_livyserver_host}:{port}/sessions | grep 200 ") Execute(livy_cmd, tries=3, http://git-wip-us.apache.org/repos/asf/ambari/blob/350dace6/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 42396bd..74fd76a 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 @@ -242,6 +242,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.launch.kerberos.principal'] livy_livyserver_hosts = default("/clusterHostInfo/livy_server_hosts", []) + livy_http_scheme = 'https' if 'livy.keystore' in config['configurations']['livy-conf'] else 'http' # ats 1.5 properties entity_groupfs_active_dir =