AMBARI-18800. Rolling Upgrade From HDP 2.5.x to 2.5.y Doesn't hdp-select ZKFC 
(dlysnichenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: cfe0fc70db8ef33c2b34bda01fe2240140870233
Parents: 520b34f
Author: Lisnichenko Dmitro <dlysniche...@hortonworks.com>
Authored: Mon Nov 7 12:01:06 2016 +0200
Committer: Lisnichenko Dmitro <dlysniche...@hortonworks.com>
Committed: Mon Nov 7 12:01:06 2016 +0200

----------------------------------------------------------------------
 .../HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py  | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cfe0fc70/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
index 6b5e72e..ddd1766 100644
--- 
a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
+++ 
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/zkfc_slave.py
@@ -173,6 +173,15 @@ class ZkfcSlaveDefault(ZkfcSlave):
     import status_params
     return [status_params.zkfc_pid_file]
 
+  def pre_upgrade_restart(self, env, upgrade_type=None):
+    Logger.info("Executing Stack Upgrade pre-restart")
+    import params
+    env.set_params(params)
+    if params.version and 
check_stack_feature(StackFeature.ZKFC_VERSION_ADVERTISED, params.version) \
+        and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version):
+      conf_select.select(params.stack_name, "hadoop", params.version)
+      stack_select.select("hadoop-hdfs-zkfc", params.version)
+
 def initialize_ha_zookeeper(params):
   try:
     iterations = 10
@@ -193,15 +202,6 @@ def initialize_ha_zookeeper(params):
     Logger.error('HA state initialization in ZooKeeper threw an exception. 
Reason %s' %(str(ex)))
   return False
 
-  def pre_upgrade_restart(self, env, upgrade_type=None):
-    Logger.info("Executing Stack Upgrade pre-restart")
-    import params
-    env.set_params(params)
-    if params.version and 
check_stack_feature(StackFeature.ZKFC_VERSION_ADVERTISED, params.version) \
-        and check_stack_feature(StackFeature.ROLLING_UPGRADE, params.version):
-      conf_select.select(params.stack_name, "hadoop", params.version)
-      stack_select.select("hadoop-hdfs-zkfc", params.version)
-
 @OsFamilyImpl(os_family=OSConst.WINSRV_FAMILY)
 class ZkfcSlaveWindows(ZkfcSlave):
   def start(self, env):

Reply via email to