ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-13739. RESTART ZOOKEEPER_SERVER failed after Upgrade from 1.6.1 to 2.1.3.(vbrodetskyi)
Date Thu, 05 Nov 2015 13:42:52 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 0e7cb759f -> b4b7df682


AMBARI-13739. RESTART ZOOKEEPER_SERVER failed after Upgrade from 1.6.1 to 2.1.3.(vbrodetskyi)


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

Branch: refs/heads/branch-2.1
Commit: b4b7df682736809b7d5dedc0e70b4670eea3b748
Parents: 0e7cb75
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Thu Nov 5 15:42:37 2015 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Thu Nov 5 15:42:37 2015 +0200

----------------------------------------------------------------------
 .../ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py             | 4 +++-
 .../ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_service.py     | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b4b7df68/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py
b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py
index ce5545f..c78acd9 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper.py
@@ -24,6 +24,7 @@ import sys
 from resource_management import *
 from resource_management.libraries.functions import conf_select
 from resource_management.libraries.functions import hdp_select
+from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
 from ambari_commons import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 
@@ -34,7 +35,8 @@ def zookeeper(type = None, upgrade_type=None):
   if type == 'server':
     # This path may be missing after Ambari upgrade. We need to create it. We need to do
this before any configs will
     # be applied.
-    if upgrade_type is None and not os.path.exists("/usr/hdp/current/zookeeper-server") and
params.current_version:
+    if upgrade_type is None and not os.path.exists("/usr/hdp/current/zookeeper-server") and
params.current_version\
+      and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
       conf_select.select(params.stack_name, "zookeeper", params.current_version)
       hdp_select.select("zookeeper-server", params.version)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4b7df68/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_service.py
b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_service.py
index ac371b6..c7ac64e 100644
--- a/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_service.py
+++ b/ambari-server/src/main/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_service.py
@@ -25,13 +25,15 @@ from ambari_commons import OSConst
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from resource_management.libraries.functions import conf_select
 from resource_management.libraries.functions import hdp_select
+from resource_management.libraries.functions.version import compare_versions, format_hdp_stack_version
 
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
 def zookeeper_service(action='start', upgrade_type=None):
   import params
 
   # This path may be missing after Ambari upgrade. We need to create it.
-  if upgrade_type is None and not os.path.exists("/usr/hdp/current/zookeeper-server") and
params.current_version:
+  if upgrade_type is None and not os.path.exists("/usr/hdp/current/zookeeper-server") and
params.current_version \
+    and compare_versions(format_hdp_stack_version(params.version), '2.2.0.0') >= 0:
     conf_select.select(params.stack_name, "zookeeper", params.current_version)
     hdp_select.select("zookeeper-server", params.version)
 


Mime
View raw message