raise exception in upgrade step

This commit is contained in:
zhang_xubo 2022-06-20 09:59:18 +08:00
parent 070cec6471
commit d0fcfd5fae
2 changed files with 5 additions and 5 deletions

View File

@ -254,7 +254,7 @@ General options:
"on the host {1}".format(local_log.logFile, failed_host)
replace_reg = re.compile(r'-W[ ]*[^ ]*[ ]*')
cmd_hide_passwd = replace_reg.sub('-W *** ', cmd)
raise Exception(ErrorCode.GAUSS_535["GAUSS_53507"] % cmd_hide_passwd + local_file_msg)
raise Exception(ErrorCode.GAUSS_535["GAUSS_53507"] % cmd_hide_passwd + local_file_msg + output)
def initGlobalInfos(self):
"""

View File

@ -668,9 +668,9 @@ class UpgradeImpl:
self.setGUCValue("default_transaction_read_only", "true")
self.context.logger.debug("successfully set the cluster read-only mode.")
return 0
except Exception:
except Exception as e:
self.context.logger.debug("WARNING: Failed to set default_transaction_read_only "
"parameter.")
"parameter. %s" % str(e))
return 1
def unSetClusterReadOnlyMode(self):
@ -685,9 +685,9 @@ class UpgradeImpl:
self.setGUCValue("default_transaction_read_only", "false")
self.context.logger.debug("Successfully cancelled the cluster read-only mode.")
return 0
except Exception:
except Exception as e:
self.context.logger.debug("WARNING: Failed to set default_transaction_read_only "
"parameter.")
"parameter. %s" % str(e))
return 1
def stopCluster(self):