diff --git a/script/gspylib/component/CM/CM_OLAP/CM_OLAP.py b/script/gspylib/component/CM/CM_OLAP/CM_OLAP.py index fb6af8cf07e14d3335754d4dff14727cb78d2596..e4066cb5c3a6c174aedb8680798ae2cf776ba65f 100644 --- a/script/gspylib/component/CM/CM_OLAP/CM_OLAP.py +++ b/script/gspylib/component/CM/CM_OLAP/CM_OLAP.py @@ -300,10 +300,7 @@ class CM_OLAP(CM): self.logger.log("Starting %s." % start_type) self.logger.log("======================================================================") # Call cm_ctl to start the - if timeout != 0: - cmd = CM_OLAP.get_start_cmd(nodeId, timeout=timeout, datadir=datadir, azName=azName) - else: - cmd = CM_OLAP.get_start_cmd(nodeId, timeout=0, datadir=datadir, azName=azName) + cmd = CM_OLAP.get_start_cmd(nodeId, timeout=timeout, datadir=datadir, azName=azName) result_set = CmdUtil.retryGetstatusoutput(cmd, retry_time=retry_times) # The output prompts when the failure to start if result_set[0] != 0: @@ -699,7 +696,9 @@ class CM_OLAP(CM): output : String """ user_profile = EnvUtil.getMpprcFile() - cmd = "source %s ; cm_ctl switchover -a -t %d" % (user_profile, timeout) + cmd = "source %s ; cm_ctl switchover -a" % user_profile + if timeout > 0: + cmd += (" -t %d" % timeout) # build shell command if user and os.getuid() == 0: cmd = "su - %s -c 'source %s;%s'" % (user, user_profile, cmd) diff --git a/script/impl/dropnode/drop_node_with_cm_impl.py b/script/impl/dropnode/drop_node_with_cm_impl.py index 8098e89cc5432f61e07aaabd4d848f3d6aef55db..dcbe9b870d920654809694102ad35474a49f124c 100644 --- a/script/impl/dropnode/drop_node_with_cm_impl.py +++ b/script/impl/dropnode/drop_node_with_cm_impl.py @@ -119,7 +119,7 @@ class DropNodeWithCmImpl(DropnodeImpl): # for flush dcc configuration DefaultValue.remove_metadata_and_dynamic_config_file(self.user, self.ssh_tool, self.logger) - self.cm_component.startCluster(self.user) + self.cm_component.startCluster(self.user, isSwitchOver=False) def run(self): """