oceanbase社区版4.1升级4.2失败

【 使用环境 】测试环境
【 OB or 其他组件 】OCP升级OB
【 使用版本 】4.1升级4.2
【问题描述】升级失败
【问题现象及影响】

[2023-09-06 17:34:52] ERROR do_upgrade_post.py:158 run error, maybe you can reference rollback_sql_post.txt to rollback it
Traceback (most recent call last):
  File "/tmp/rpms/extract/oceanbase-ce-4.2.0.0-100010032023083021.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_09_06_17_34_52_116390_rKgnOYMm/do_upgrade_post.py", line 151, in do_upgrade_by_argv
    do_upgrade(host, port, user, password, timeout, module_set, upgrade_params)
  File "/tmp/rpms/extract/oceanbase-ce-4.2.0.0-100010032023083021.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_09_06_17_34_52_116390_rKgnOYMm/do_upgrade_post.py", line 118, in do_upgrade
    raise e
UnboundLocalError: local variable 'e' referenced before assignment
Traceback (most recent call last):
  File "/tmp/rpms/extract/oceanbase-ce-4.2.0.0-100010032023083021.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post.py", line 2826, in <module>
    do_upgrade_by_argv(sys.argv[1:])
  File "/tmp/rpms/extract/oceanbase-ce-4.2.0.0-100010032023083021.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_09_06_17_34_52_116390_rKgnOYMm/do_upgrade_post.py", line 159, in do_upgrade_by_argv
    raise e
UnboundLocalError: local variable 'e' referenced before assignment
, error: exit status 1
2023-09-06 17:35:02.432  WARN 131 --- [pool-manual-subtask-executor15,ba70d38fbb5f4fa0,64e57e4e2528] c.o.o.c.t.engine.runner.RunnerFactory    : Execute task failed, subtask=SubtaskInstanceOverview{id=1325000120, name=Execute upgrade post script, state=FAILED, operation=RETRY, className=com.oceanbase.ocp.service.task.business.cluster.ExecUpgradePostScriptTask, seriesId=65, startTime=2023-09-06T17:11:13.082+08:00, endTime=null}, failedMessage=An unknown error has occurred. Cause: agent task is failed. Error message: null. Contact the administrator.

com.oceanbase.ocp.core.exception.UnexpectedException: [OCP UnexpectedException]: status=500 INTERNAL_SERVER_ERROR, errorCode=COMMON_UNEXPECTED, args=agent task is failed,null
	at com.oceanbase.ocp.core.i18n.ErrorCodes$Kind$10.exception(ErrorCodes.java:1260) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.i18n.ErrorCodes.exception(ErrorCodes.java:1115) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.util.ExceptionUtils.require(ExceptionUtils.java:154) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.checkSuccess(AgentAsyncTaskHelper.java:219) ~[ocp-service-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.waitForExecuteFinish(AgentAsyncTaskHelper.java:165) ~[ocp-service-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.runUpgradeScript(AgentAsyncTaskHelper.java:128) ~[ocp-service-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.service.task.business.cluster.helper.UpgradeTaskHelper.runScript(UpgradeTaskHelper.java:140) ~[ocp-service-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.service.task.business.cluster.helper.UpgradeTaskHelper.runScript(UpgradeTaskHelper.java:92) ~[ocp-service-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.service.task.business.cluster.helper.UpgradeTaskHelper.runScript(UpgradeTaskHelper.java:65) ~[ocp-service-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.service.task.business.cluster.ExecUpgradePostScriptTask.run(ExecUpgradePostScriptTask.java:64) ~[ocp-service-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.task.runtime.Subtask.retry(Subtask.java:49) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.retry(JavaSubtaskRunner.java:75) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.doRun(JavaSubtaskRunner.java:35) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.run(JavaSubtaskRunner.java:26) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.task.engine.runner.RunnerFactory.doRun(RunnerFactory.java:111) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.task.engine.runner.RunnerFactory.redirectOutputIfNotSysSchedule(RunnerFactory.java:183) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.task.engine.runner.RunnerFactory.run(RunnerFactory.java:101) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.ReadySubtaskWorker.lambda$null$1(ReadySubtaskWorker.java:127) ~[ocp-core-4.0.3-20230301.jar!/:4.0.3-20230301]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_312]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_312]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_312]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_312]

Set state for subtask: 1325000120, operation:RETRY, state: FAILED

log_task_1357000048.zip (116.8 KB)

可以提供一下具体的版本信息,我们验证下
从4.1的什么版本升级上来的

升级前版本:4.1.0.2
目标版本:4.2.0.0
OCP版本:4.0.3-20230301
OB操作系统:CentOS Linux release 7.9.2009

OK

可以重试一下任务呢,我本地跑了一次用相同的版本是成功的

重试好几次,都失败

再提供一下 observer 的日志信息吧,现在看任务只能看到是执行脚本失败了,详细信息还是得分析日志

日志有很多,observer.log、rootservice.log、election.log、trace.log,这些 3 个节点的都需要吗?