From e30a5dfc2a55d4574999c97182956571809b3213 Mon Sep 17 00:00:00 2001 From: chenxiaobin19 <1025221611@qq.com> Date: Wed, 1 Nov 2023 20:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E5=A4=87=E6=9C=BA?= =?UTF-8?q?=E5=8D=87=E7=BA=A7&=E5=B0=B1=E5=9C=B0=E5=8D=87=E7=BA=A7?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/impl/upgrade/UpgradeImpl.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/impl/upgrade/UpgradeImpl.py b/script/impl/upgrade/UpgradeImpl.py index 9f49117..44268e1 100644 --- a/script/impl/upgrade/UpgradeImpl.py +++ b/script/impl/upgrade/UpgradeImpl.py @@ -2390,6 +2390,7 @@ class UpgradeImpl: self.recordNodeStepInplace(const.ACTION_INPLACE_UPGRADE, const.BINARY_UPGRADE_STEP_UPGRADE_APP) self.installNewBin() + self.cpDolphinUpgradeScript() # 11. restore the cluster config. including this: # cluster_static_config @@ -6775,10 +6776,13 @@ class UpgradeImpl: self.context.logger.debug("Start to copy dolphin upgrade script.") try: - cmd = "if ls %s/share/postgresql/extension/ | grep -qE \"dolphin--(.*)--(.*)sql\" ; " \ + cmd = "if ls %s/share/postgresql/extension/ | grep -qE 'dolphin--(.*)--(.*)sql' ; " \ "then cp -f %s/share/postgresql/extension/dolphin--*--*sql %s/share/postgresql/extension/; fi" % \ (self.context.oldClusterAppPath, self.context.oldClusterAppPath, self.context.newClusterAppPath) - CmdExecutor.execCommandLocally(cmd) + CmdExecutor.execCommandWithMode(cmd, + self.context.sshTool, + self.context.isSingle, + self.context.mpprcFile) self.context.logger.debug("Successfully copy dolphin upgrade script.") except Exception as e: raise Exception("Failed to copy dolphin upgrade script.")