4.2.0 升级 4.2.1 又失败了

【 使用环境 】测试环境
【 OB or 其他组件 】OCP 升级 OceanBase
【 使用版本 】OCP版本号: 4.2.1-20231127211106,OceanBase升级前版本号: 4.2.0.0
【问题描述】用OCP升级4.2.0.0版本OceanBase到4.2.1升级失败,之前oceanbase社区版4.1升级4.2失败从报错信息来看是一个问题。

[2023-12-15 09:44:59] ERROR do_upgrade_post.py:117 normal error
Traceback (most recent call last):
  File "/tmp/rpms/extract/oceanbase-ce-4.2.1.2-102000042023120514.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_12_15_09_42_58_038963_t0wGO5aV/do_upgrade_post.py", line 105, in do_upgrade
    raise e
UnboundLocalError: local variable 'e' referenced before assignment
[2023-12-15 09:44:59] ERROR do_upgrade_post.py:157 normal error
Traceback (most recent call last):
  File "/tmp/rpms/extract/oceanbase-ce-4.2.1.2-102000042023120514.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_12_15_09_42_58_038963_t0wGO5aV/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.1.2-102000042023120514.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_12_15_09_42_58_038963_t0wGO5aV/do_upgrade_post.py", line 118, in do_upgrade
    raise e
UnboundL
ocalError: local variable 'e' referenced before assignment
[2023-12-15 09:44:59] 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.1.2-102000042023120514.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_12_15_09_42_58_038963_t0wGO5aV/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.1.2-102000042023120514.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_12_15_09_42_58_038963_t0wGO5aV/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.1.2-102000042023120514.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post.py", line 2882, in <module>
    do_upgrade_by_argv(sys.argv[1:])
  File "/tmp/rpms/extract/oceanbase-ce-4.2.1.2-102000042023120514.el7.x86_64.rpm/home/admin/oceanbase/etc/upgrade_post_extract_files_2023_12_15_09_42_58_038963_t0wGO5aV/do_upgrade_post.py", line 159, in do_upgrade_by_argv
    raise e
UnboundLocalError: local variable 'e' referenced before assignment
, error: exit status 1
	at com.oceanbase.ocp.core.i18n.ErrorCodes$Kind$10.exception(ErrorCodes.java:1489)
	at com.oceanbase.ocp.core.i18n.ErrorCodes.exception(ErrorCodes.java:1344)
	at com.oceanbase.ocp.core.util.ExceptionUtils.newException(ExceptionUtils.java:169)
	at com.oceanbase.ocp.core.util.ExceptionUtils.throwException(ExceptionUtils.java:162)
	at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.checkSuccess(AgentAsyncTaskHelper.java:219)
	at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.waitForExecuteFinish(AgentAsyncTaskHelper.java:165)
	at com.oceanbase.ocp.service.task.util.AgentAsyncTaskHelper.runUpgradeScript(AgentAsyncTaskHelper.java:128)
	at com.oceanbase.ocp.service.task.b
usiness.cluster.helper.UpgradeTaskHelper.runScript(UpgradeTaskHelper.java:163)
	at com.oceanbase.ocp.service.task.business.cluster.helper.UpgradeTaskHelper.runScript(UpgradeTaskHelper.java:108)
	at com.oceanbase.ocp.service.task.business.cluster.helper.UpgradeTaskHelper.runScript(UpgradeTaskHelper.java:81)
	at com.oceanbase.ocp.service.task.business.cluster.ExecUpgradePostScriptTask.run(ExecUpgradePostScriptTask.java:66)
	at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.execute(JavaSubtaskRunner.java:59)
	at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.doRun(JavaSubtaskRunner.java:31)
	at com.oceanbase.ocp.core.task.engine.runner.JavaSubtaskRunner.run(JavaSubtaskRunner.java:25)
	at com.oceanbase.ocp.core.task.engine.runner.RunnerFactory.doRun(RunnerFactory.java:76)
	at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.doRun(SubtaskExecutor.java:193)
	at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.redirectConsoleOutput(SubtaskExecutor.java:187)
	at com.oceanbase.ocp.core.task.engine.coordinator.worker.subtask.SubtaskExecutor.lambda$submit$2(SubtaskExecutor.java:124)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)


Set state for subtask: 9059000258, operation:EXECUTE, state: FAILED

log_task_9322000173.zip (123.7 KB)

把失败的倒数第三步【Execute upgrade post script】标记成功,后面的也都成功了,不知道有没有隐患。哎……

可能会有问题,这个应该是升级脚本某个步骤执行失败了,直接标记成功可能有些检查不通过或者任务未完成

果然出现问题了,创建新租户失败:

现在是因为升级模式没有结束。post脚本会做一些事情包括关闭升级模式、打开ddl等等,所以最好是不要跳过,不然会影响集群正常运行。目前可以参照文档尝试手动执行 post 脚本。https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000220905#9-title-步骤八:执行脚本%20upgrade_post.py