From 54cba4646a167f4f4c43a240c64d63cd80ba3d01 Mon Sep 17 00:00:00 2001 From: KeKe Date: Sat, 11 Jan 2025 18:07:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B8=A6cm=E9=9B=86=E7=BE=A4?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=8F=90=E4=BA=A4=E6=88=96=E5=9B=9E=E6=BB=9A?= =?UTF-8?q?core=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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/script/impl/upgrade/UpgradeImpl.py b/script/impl/upgrade/UpgradeImpl.py index aad1f022..2d92aca8 100644 --- a/script/impl/upgrade/UpgradeImpl.py +++ b/script/impl/upgrade/UpgradeImpl.py @@ -1977,7 +1977,7 @@ class UpgradeImpl: if status != 0: raise Exception(ErrorCode.GAUSS_514["GAUSS_51400"] % "Command:%s. Error:\n%s" % (cmd, output)) - self.refresh_dynamic_config_file() + self.refresh_dynamic_config_file() self.context.logger.log("Switching DN processes.") is_rolling = False start_time = timeit.default_timer() @@ -2032,6 +2032,7 @@ class UpgradeImpl: % self.getTimeFormat(elapsed)) if upgrade_sep_comps: + self.clean_dynamic_config_file() self.context.logger.log("Start CM components.") cmd = "gs_om -t start --component=CM" (status, output) = subprocess.getstatusoutput(cmd) @@ -2867,6 +2868,15 @@ class UpgradeImpl: self.context.isSingle, self.context.mpprcFile) + def clean_dynamic_config_file(self): + """ + clean dynamic config file + :return: + """ + cluster_info = dbClusterInfo() + cluster_file_path = cluster_info.__getDynamicConfig(self.context.user) + FileUtil.removeFile(cluster_file_path) + def cleanCsvFile(self): """ clean csv file -- Gitee