【 使用环境 】测试环境
【 OB or 其他组件 】 oceanbase-ce
【 使用版本 】
【问题描述】
通过obd将oceanbase-ce从4.2.4升级到4.2.5.1报错
[ERROR] oceanbase-ce-py_script_obshell_port_check-4.2.1.4 RuntimeError: ‘NoneType’ object is not subscriptable
【复现路径】
obd cluster upgrade tisp_oceanbase -c oceanbase-ce -V 4.2.5.1 --usable=d7cf4989962cf69dc2b6a27875df7ab5de9a301e
【附件及日志】
[2024-12-22 09:47:40.823] [DEBUG] - Found for oceanbase-ce-py_script_obshell_port_check-4.2.1.4 for oceanbase-ce-4.2.5.1
[2024-12-22 09:47:40.823] [DEBUG] - Call plugin oceanbase-ce-py_script_obshell_port_check-4.2.1.4 for oceanbase-ce-4.2.5.1-101000092024120918.el8-d7cf4989962cf69dc2b6a27875df7ab5de9a301e
[2024-12-22 09:47:40.824] [DEBUG] - import obshell_port_check
[2024-12-22 09:47:40.825] [DEBUG] - add obshell_port_check ref count to 1
[2024-12-22 09:47:40.827] [ERROR] oceanbase-ce-py_script_obshell_port_check-4.2.1.4 RuntimeError: ‘NoneType’ object is not subscriptable
[2024-12-22 09:47:40.827] [ERROR] Traceback (most recent call last):
[2024-12-22 09:47:40.827] [ERROR] File “core.py”, line 3223, in upgrade_cluster
[2024-12-22 09:47:40.827] [ERROR] File “core.py”, line 233, in run_workflow
[2024-12-22 09:47:40.827] [ERROR] File “core.py”, line 275, in run_plugin_template
[2024-12-22 09:47:40.827] [ERROR] File “core.py”, line 320, in call_plugin
[2024-12-22 09:47:40.828] [ERROR] File “_plugin.py”, line 352, in call
[2024-12-22 09:47:40.828] [ERROR] File “_plugin.py”, line 309, in _new_func
[2024-12-22 09:47:40.828] [ERROR] File “/root/.obd/plugins/oceanbase-ce/4.2.1.4/upgrade.py”, line 565, in upgrade
[2024-12-22 09:47:40.828] [ERROR] if upgrader.run():
[2024-12-22 09:47:40.828] [ERROR] File “/root/.obd/plugins/oceanbase-ce/4.2.1.4/upgrade.py”, line 194, in run
[2024-12-22 09:47:40.828] [ERROR] if not self.processself.process_index:
[2024-12-22 09:47:40.828] [ERROR] File “/root/.obd/plugins/oceanbase-ce/4.2.1.4/upgrade.py”, line 534, in take_over
[2024-12-22 09:47:40.828] [ERROR] if not self.run_workflow(obshell_port_check_workflows, repository, self.cluster_config, **{repository.name: {“upgrade_check”: True}}):
[2024-12-22 09:47:40.828] [ERROR] File “/root/.obd/plugins/oceanbase-ce/4.2.1.4/upgrade.py”, line 131, in run_workflow
[2024-12-22 09:47:40.828] [ERROR] return self._run_workflow(workflows, repositories=[repository], **kwargs)
[2024-12-22 09:47:40.828] [ERROR] File “core.py”, line 233, in run_workflow
[2024-12-22 09:47:40.828] [ERROR] File “core.py”, line 275, in run_plugin_template
[2024-12-22 09:47:40.828] [ERROR] File “core.py”, line 320, in call_plugin
[2024-12-22 09:47:40.828] [ERROR] File “_plugin.py”, line 352, in call
[2024-12-22 09:47:40.828] [ERROR] File “_plugin.py”, line 309, in _new_func
[2024-12-22 09:47:40.828] [ERROR] File “/root/.obd/plugins/oceanbase-ce/4.2.1.4/obshell_port_check.py”, line 40, in obshell_port_check
[2024-12-22 09:47:40.828] [ERROR] ports = servers_port[ip]
[2024-12-22 09:47:40.828] [ERROR] TypeError: ‘NoneType’ object is not subscriptable
[2024-12-22 09:47:40.828] [ERROR]
[2024-12-22 09:47:40.828] [DEBUG] - sub obshell_port_check ref count to 0
[2024-12-22 09:47:40.828] [DEBUG] - export obshell_port_check
[2024-12-22 09:47:40.829] [DEBUG] - plugin oceanbase-ce-py_script_obshell_port_check-4.2.1.4 result: False
[2024-12-22 09:47:40.829] [DEBUG] - sub upgrade ref count to 0
[2024-12-22 09:47:40.829] [DEBUG] - export upgrade
[2024-12-22 09:47:40.829] [DEBUG] - plugin oceanbase-ce-py_script_upgrade-4.2.1.4 result: None
[2024-12-22 09:47:40.830] [DEBUG] - dump upgrade meta data to /root/.obd/cluster/tisp_oceanbase/.upgrade
[2024-12-22 09:47:40.838] [INFO] See https://www.oceanbase.com/product/ob-deployer/error-codes .
[2024-12-22 09:47:40.838] [INFO] Trace ID: 6adc9e58-c006-11ef-8556-fa163e259e96
[2024-12-22 09:47:40.838] [INFO] If you want to view detailed obd logs, please run: obd display-trace 6adc9e58-c006-11ef-8556-fa163e259e96
[2024-12-22 09:47:40.839] [DEBUG] - unlock /root/.obd/lock/global
[2024-12-22 09:47:40.839] [DEBUG] - unlock /root/.obd/lock/deploy_tisp_oceanbase
[2024-12-22 09:47:40.840] [DEBUG] - unlock /root/.obd/lock/mirror_and_repo
【备注】基于 LLM 和开源文档 RAG 的论坛小助手已开放测试,在发帖时输入 [@论坛小助手] 即可召唤小助手,欢迎试用!
你目前的版本确定是4.2.4还是4.2.1.4 ?
日志里面打印的全是4.2.1.4的信息,如果你是4.2.1.4要升级到指定版本才能升到4.2.5
https://www.oceanbase.com/product/oceanbase-database-community-rn/releaseNote#V4.2.5