Repository: ambari Updated Branches: refs/heads/trunk 8a8906671 -> 42b7b3f44
AMBARI-15513. Download Client Configurations failed with "Cannot open: No such file or directorydoes not exist" (dgrinenko via dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/42b7b3f4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/42b7b3f4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/42b7b3f4 Branch: refs/heads/trunk Commit: 42b7b3f44695c605af71a179ff22f55682b5ff37 Parents: 8a89066 Author: Lisnichenko Dmitro <dlysniche...@hortonworks.com> Authored: Tue Mar 22 16:53:17 2016 +0200 Committer: Lisnichenko Dmitro <dlysniche...@hortonworks.com> Committed: Tue Mar 22 16:53:17 2016 +0200 ---------------------------------------------------------------------- ambari-common/src/main/python/ambari_commons/str_utils.py | 3 +++ .../HBASE/0.96.0.2.0/package/scripts/params_linux.py | 4 ++-- .../HDFS/2.1.0.2.0/package/scripts/params_linux.py | 4 ++-- .../HIVE/0.12.0.2.0/package/scripts/params_linux.py | 4 ++-- .../OOZIE/4.0.0.2.0/package/scripts/params_linux.py | 4 ++-- .../stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py | 4 ++-- .../stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/params.py | 5 ++--- 7 files changed, 15 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/42b7b3f4/ambari-common/src/main/python/ambari_commons/str_utils.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/ambari_commons/str_utils.py b/ambari-common/src/main/python/ambari_commons/str_utils.py index 1a3e4f2..83fc29d 100644 --- a/ambari-common/src/main/python/ambari_commons/str_utils.py +++ b/ambari-common/src/main/python/ambari_commons/str_utils.py @@ -60,5 +60,8 @@ def cint(obj): return int(obj) except ValueError: raise ValueError('Unable to interpret value "%s" as integer' % obj) + elif obj is None: + return obj + return int(obj) http://git-wip-us.apache.org/repos/asf/ambari/blob/42b7b3f4/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 ec8a6c7..9b0a195 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 @@ -44,8 +44,8 @@ exec_tmp_dir = Script.get_tmp_dir() sudo = AMBARI_SUDO_BINARY stack_name = default("/hostLevelParams/stack_name", None) -agent_stack_retry_on_unavailability = cbool(config["hostLevelParams"]["agent_stack_retry_on_unavailability"]) -agent_stack_retry_count = cint(config["hostLevelParams"]["agent_stack_retry_count"]) +agent_stack_retry_on_unavailability = cbool(default("/hostLevelParams/agent_stack_retry_on_unavailability", None)) +agent_stack_retry_count = cint(default("/hostLevelParams/agent_stack_retry_count", None)) version = default("/commandParams/version", None) component_directory = status_params.component_directory http://git-wip-us.apache.org/repos/asf/ambari/blob/42b7b3f4/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 b4211a4..9fa3cd4 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 @@ -49,8 +49,8 @@ stack_name = default("/hostLevelParams/stack_name", None) upgrade_direction = default("/commandParams/upgrade_direction", None) stack_version_unformatted = str(config['hostLevelParams']['stack_version']) stack_version_formatted = format_stack_version(stack_version_unformatted) -agent_stack_retry_on_unavailability = cbool(config["hostLevelParams"]["agent_stack_retry_on_unavailability"]) -agent_stack_retry_count = cint(config["hostLevelParams"]["agent_stack_retry_count"]) +agent_stack_retry_on_unavailability = cbool(default("/hostLevelParams/agent_stack_retry_on_unavailability", None)) +agent_stack_retry_count = cint(default("/hostLevelParams/agent_stack_retry_count", None)) # there is a stack upgrade which has not yet been finalized; it's currently suspended upgrade_suspended = default("roleParams/upgrade_suspended", False) http://git-wip-us.apache.org/repos/asf/ambari/blob/42b7b3f4/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 b2d0041..6f05fbc 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 @@ -46,8 +46,8 @@ tmp_dir = Script.get_tmp_dir() sudo = AMBARI_SUDO_BINARY stack_name = default("/hostLevelParams/stack_name", None) -agent_stack_retry_on_unavailability = cbool(config["hostLevelParams"]["agent_stack_retry_on_unavailability"]) -agent_stack_retry_count = cint(config["hostLevelParams"]["agent_stack_retry_count"]) +agent_stack_retry_on_unavailability = cbool(default("/hostLevelParams/agent_stack_retry_on_unavailability", None)) +agent_stack_retry_count = cint(default("/hostLevelParams/agent_stack_retry_count", None)) # node hostname hostname = config["hostname"] http://git-wip-us.apache.org/repos/asf/ambari/blob/42b7b3f4/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py index 211f16f..f92d90c 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/params_linux.py @@ -48,8 +48,8 @@ hostname = config["hostname"] version = default("/commandParams/version", None) stack_name = default("/hostLevelParams/stack_name", None) upgrade_direction = default("/commandParams/upgrade_direction", None) -agent_stack_retry_on_unavailability = cbool(config["hostLevelParams"]["agent_stack_retry_on_unavailability"]) -agent_stack_retry_count = cint(config["hostLevelParams"]["agent_stack_retry_count"]) +agent_stack_retry_on_unavailability = cbool(default("/hostLevelParams/agent_stack_retry_on_unavailability", None)) +agent_stack_retry_count = cint(default("/hostLevelParams/agent_stack_retry_count", None)) stack_version_unformatted = str(config['hostLevelParams']['stack_version']) stack_version_formatted = format_stack_version(stack_version_unformatted) http://git-wip-us.apache.org/repos/asf/ambari/blob/42b7b3f4/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py index 9fff7507..3b8f73d 100644 --- a/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py +++ b/ambari-server/src/main/resources/stacks/BIGTOP/0.8/hooks/before-INSTALL/scripts/params.py @@ -29,8 +29,8 @@ tmp_dir = Script.get_tmp_dir() #RPM versioning support rpm_version = default("/configurations/cluster-env/rpm_version", None) -agent_stack_retry_on_unavailability = cbool(config["hostLevelParams"]["agent_stack_retry_on_unavailability"]) -agent_stack_retry_count = cint(config["hostLevelParams"]["agent_stack_retry_count"]) +agent_stack_retry_on_unavailability = cbool(default("/hostLevelParams/agent_stack_retry_on_unavailability", None)) +agent_stack_retry_count = cint(default("/hostLevelParams/agent_stack_retry_count", None)) #users and groups hbase_user = config['configurations']['hbase-env']['hbase_user'] http://git-wip-us.apache.org/repos/asf/ambari/blob/42b7b3f4/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 f49cb58..4d559dc 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 @@ -29,9 +29,8 @@ tmp_dir = Script.get_tmp_dir() sudo = AMBARI_SUDO_BINARY stack_version_unformatted = str(config['hostLevelParams']['stack_version']) -agent_stack_retry_on_unavailability = cbool(config["hostLevelParams"]["agent_stack_retry_on_unavailability"]) -agent_stack_retry_count = cint(config["hostLevelParams"]["agent_stack_retry_count"]) - +agent_stack_retry_on_unavailability = cbool(default("/hostLevelParams/agent_stack_retry_on_unavailability", None)) +agent_stack_retry_count = cint(default("/hostLevelParams/agent_stack_retry_count", None)) stack_version_formatted = format_stack_version(stack_version_unformatted) #users and groups