社区版4.0.0 怎么升级到4.2.1版本啊?

example

obd cluster upgrade test -c oceanbase-ce -V 4.2.1.0 --usable=xxx

社区版4.0.0 怎么升级到4.2.1版本,是这样升级吗? --usable这个怎么获取啊?


参考这个文档
https://www.oceanbase.com/docs/community-obd-cn-10000000002048170

image
啥也没查出来 :joy:

我用离线升级试试

通过obd mirror lisk local 查看最新版本的MD5


需要你有4.1.0.2版本
上传到本地仓库:obd mirror clone oceanbase-ce-4.1.0.2-104010012023100710.el7.x86_64.rpm
在执行:obd cluster upgrade 集群名称 -c oceanbase-ce -V 4.2.0.0 --usable md5


我升级4.2.0.0为啥还需要4.1.0.2的包啊?

4.0到4.2 中间有个4.1版本 上传到本地仓库就行了
我有贴命令的

好嘞,我试试 :grin:

【SOP 系列 17】使用 OBD 在线/离线升级 OceanBase 集群 离线升级可以看下sop系列

[obadmin@dcf59 bin]$ obd mirror list local | grep oceanbase-ce
| oceanbase-ce | 4.0.0.0 | 100000282022112511.el7 | x86_64 | 75ec57ebe42718b386901357cef1e5d3864748ee |
| oceanbase-ce-libs | 4.0.0.0 | 100000282022112511.el7 | x86_64 | c5f1e971cc335efe36233cae291a170a0f518e19 |
| oceanbase-ce | 4.2.0.0 | 101000032023091319.el7 | x86_64 | 176ae96ab6ea606c860e0a9db09f8046eec0ceba |
| oceanbase-ce-libs | 4.2.0.0 | 101000032023091319.el7 | x86_64 | f784db915f66cfb4dcab77147a9d8b0aeefbfb8c |
| oceanbase-ce | 4.1.0.1 | 102000042023061314.el7 | x86_64 | d03fafa6fa8ceb0636e4db05b5b5f6c3ac2256a3 |
| oceanbase-ce-libs | 4.1.0.1 | 102000042023061314.el7 | x86_64 | c3f797aae1ce258ec9be77898b94e4e7a501cd0f |
| oceanbase-ce-devel | 3.1.5 | 100010012023060910.el7 | x86_64 | 6490f5b79b55547120a6a3ace1f6d8338b409c10 |
| oceanbase-ce-devel | 3.1.5 | 100000252023041721.el7 | x86_64 | 94d7e2102415673cfd9f4c29cb5839c5cd302980 |
| oceanbase-ce | 4.1.0.2 | 104010012023100710.el7 | x86_64 | a29cec0d056c9c8ac02fd41e5fcd405982d7aa82 |
| oceanbase-ce-libs | 4.1.0.2 | 104010012023100710.el7 | x86_64 | 23b3dc28edb49ad20cda72710aecc61ff77bfb0c |
[obadmin@dcf59 bin]$
[obadmin@dcf59 bin]$
[obadmin@dcf59 bin]$ obd cluster upgrade obadmin -c oceanbase-ce -V 4.2.0.0 --usable=md5
Get local repositories and plugins ok
±----------------------------------------------------------------------------------------------------+
| Search oceanbase-ce 4.2.0.0 Result |
±-------------±--------±-----------------------±-------±-----------------------------------------+
| name | version | release | arch | md5 |
±-------------±--------±-----------------------±-------±-----------------------------------------+
| oceanbase-ce | 4.2.0.0 | 101000032023091319.el7 | x86_64 | 176ae96ab6ea606c860e0a9db09f8046eec0ceba |
±-------------±--------±-----------------------±-------±-----------------------------------------+
install oceanbase-ce-4.2.0.0 for local ok
Open ssh connection ok
Cluster status check ok
±----------------------------------------------------------------------------------------------------+
| Search oceanbase-ce 4.1.0.2 Result |
±-------------±--------±-----------------------±-------±-----------------------------------------+
| name | version | release | arch | md5 |
±-------------±--------±-----------------------±-------±-----------------------------------------+
| oceanbase-ce | 4.1.0.2 | 104010012023100710.el7 | x86_64 | a29cec0d056c9c8ac02fd41e5fcd405982d7aa82 |
±-------------±--------±-----------------------±-------±-----------------------------------------+
install oceanbase-ce-4.1.0.2 for local ok
Connect to observer 76.76.35.59:2881 ok
±------------------------------------------------------------------------------------------------------------+
| Packages Will Be Used |
±-------------±--------±-----------------------±-------±-----------------------------------------±------+
| name | version | release | arch | md5 | mark |
±-------------±--------±-----------------------±-------±-----------------------------------------±------+
| oceanbase-ce | 4.0.0.0 | 100000282022112511.el7 | x86_64 | 75ec57ebe42718b386901357cef1e5d3864748ee | start |
| oceanbase-ce | 4.1.0.2 | 104010012023100710.el7 | x86_64 | a29cec0d056c9c8ac02fd41e5fcd405982d7aa82 | |
| oceanbase-ce | 4.2.0.0 | 101000032023091319.el7 | x86_64 | 176ae96ab6ea606c860e0a9db09f8046eec0ceba | dest |
±-------------±--------±-----------------------±-------±-----------------------------------------±------+
If you use a non-official release, we cannot guarantee a successful upgrade or technical support when you fail. Make sure that you want to use the above package to upgrade. [y/n]: y
Start observer ok
observer program health check ok
Connect to observer 76.76.35.59:2881 ok
Disable DDL ok
Exec upgrade_checker.py ok
Exec upgrade_pre.py ok
Exec upgrade_health_checker.py ok
Rotation upgrade ok
upgrade zone “zone1”

Remote oceanbase-ce-4.1.0.2-104010012023100710.el7-a29cec0d056c9c8ac02fd41e5fcd405982d7aa82 repository lib check ok
Stop observer ok
Start observer ok
observer program health check ok
Connect to observer 76.76.35.59:2881 ok
Exec upgrade_health_checker.py ok
Connect to observer 76.76.35.67:2881 ok
upgrade zone “zone2”
Remote oceanbase-ce-4.1.0.2-104010012023100710.el7-a29cec0d056c9c8ac02fd41e5fcd405982d7aa82 repository install ok
Remote oceanbase-ce-4.1.0.2-104010012023100710.el7-a29cec0d056c9c8ac02fd41e5fcd405982d7aa82 repository lib check ok
Stop observer ok
Start observer ok
observer program health check ok
Connect to observer 76.76.35.67:2881 ok
Exec upgrade_health_checker.py ok
Connect to observer 76.76.35.68:2881 ok
upgrade zone “zone3”
Remote oceanbase-ce-4.1.0.2-104010012023100710.el7-a29cec0d056c9c8ac02fd41e5fcd405982d7aa82 repository install ok
Remote oceanbase-ce-4.1.0.2-104010012023100710.el7-a29cec0d056c9c8ac02fd41e5fcd405982d7aa82 repository lib check ok
Stop observer ok
Start observer ok
observer program health check ok
Connect to observer 76.76.35.68:2881 ok
Exec upgrade_health_checker.py ok
Connect to observer 76.76.35.68:2881 ok
Exec upgrade_post.py ok
Start observer ok
observer program health check ok
Connect to observer 76.76.35.59:2881 ok
Exec upgrade_checker.py ok
Exec upgrade_pre.py ok
Exec upgrade_health_checker.py ok
Rotation upgrade ok
upgrade zone “zone1”

Remote oceanbase-ce-4.2.0.0-101000032023091319.el7-176ae96ab6ea606c860e0a9db09f8046eec0ceba repository lib check ok
Stop observer ok
Start observer ok
observer program health check ok
Connect to observer 76.76.35.59:2881 ok

升级卡到这里不动了,知道为啥吗?

–usable=md5


md5这里是下面参数
使用obd mirror list local 查看

示例:–usable=176ae96ab6ea606c860e0a9db09f8046eec0ceba


ctrl c后 执行又卡到这里了

–usable e1c71a4cb252e51f210aae129cee0f09613d42bb
=号去掉

升级失败了 怎么回退啊?

有错误提示嘛?
obd支持升级中断后继续升级(内部有记录断点位置的)

[2023-10-23 17:00:44.244] [DEBUG] – local execute: /home/obadmin/.oceanbase-all-in-one/obd/usr/obd/lib/executer/executer27/bin/executer /tmp/76.76.35.59:2882_76.76.35.67:2882_76.76.35.68:2882/a29cec0d056c9c8ac02fd41e5fcd405982d7aa82/upgrade_checker.py -h 76.76.35.59 -P 2881 -u root -p ‘OceanBase#123’
[2023-10-23 17:00:44.540] [DEBUG] – exited code 255, error output:
[2023-10-23 17:00:44.540] [DEBUG] Traceback (most recent call last):
[2023-10-23 17:00:44.540] [DEBUG] File “executer27.py”, line 51, in
[2023-10-23 17:00:44.540] [DEBUG] File “/tmp/76.76.35.59:2882_76.76.35.67:2882_76.76.35.68:2882/a29cec0d056c9c8ac02fd41e5fcd405982d7aa82/upgrade_checker.py”, line 676, in
[2023-10-23 17:00:44.540] [DEBUG] raise e
[2023-10-23 17:00:44.540] [DEBUG] main.MyError: 'upgrade checker failed with 2 reasons: [META$1002 tenant primary zone random before update not allowed] , [tenant1 tenant primary zone random before update not allowed] ’
[2023-10-23 17:00:44.540] [DEBUG] [8210] Failed to execute script executer27
[2023-10-23 17:00:44.540] [DEBUG]
[2023-10-23 17:00:44.613] [DEBUG] - sub upgrade ref count to 0
[2023-10-23 17:00:44.613] [DEBUG] - export upgrade
[2023-10-23 17:00:44.613] [DEBUG] - dump upgrade meta data to /home/obadmin/.obd/cluster/obadmin/.upgrade
[2023-10-23 17:00:44.619] [INFO] See https://www.oceanbase.com/product/ob-deployer/error-codes .
[2023-10-23 17:00:44.619] [INFO] Trace ID: 81f0856a-7182-11ee-b9af-2cf05df175b3
[2023-10-23 17:00:44.620] [INFO] If you want to view detailed obd logs, please run: obd display-trace 81f0856a-7182-11ee-b9af-2cf05df175b3
[2023-10-23 17:00:44.620] [DEBUG] - unlock /home/obadmin/.obd/lock/global
[2023-10-23 17:00:44.620] [DEBUG] - unlock /home/obadmin/.obd/lock/deploy_obadmin
[2023-10-23 17:00:44.620] [DEBUG] - unlock /home/obadmin/.obd/lock/mirror_and_repo

貌似知道了,要设置这个