OceanBase 社区版 4.0 离线方式升级bp1至bp2 指南(含避坑总结)

注:目前社区版对 4.0 升级 bp1至 bp2也未有完善的文档,本次升级中也是遇到不少坑,写本文也希望对OB感兴趣的可以尝试少些遇坑。

也希望对升级有更好方式建议方式的朋友一起切磋交流,以便再进一步完善升级方案。

第一次做OB的升级,限于自身技术,难免有纰漏,还望对此熟悉的大牛多多指正。

一、概述

OceanBase 数据库和Oracle等数据库类似,在修复某一版本较多的BUG后会发布一个修复已知漏洞的新版本。Oracle数据库会采用RU或PSU的方式发布一些补丁,OceanBase 是以BPXXX的方式发布。

本次安装OceanBase 4.0 集群最初采用的是 beta_bp1版本,在2022年12月15日,OB社区发布了新版的beta_bp2版本,本次尝试采用离线方式通过obd来升级beta_bp1至beta_bp2版本。

本次升级也曾尝试使用obd update方式,但升级遇到问题,最后通过下载最新版的all-in-one(beta_bp2)版本,通过install.sh脚本一步步完成升级。

在升级过程中,特别要注意如果创建了多租户,在设置primary_zone时一定要谨慎,如果这块设置不慎,可能会升级中途失败导致入坑。

另外,根据OB官网介绍,在升级obproxy时,可能会因为一些参数的设置导致升级失败,这点也要特别的注意,本次因为BP1到BP2,obproxy版本未发生改变,可以不进行升级,本文也是教大家如果真要升级obproxy该如何操作。

二、升级流程

2.1、离线升级OBD

2.1 .1 查看当前obd版本
--登陆中控机服务器,查看当前obd版本信息
[admin@obproxy-node ~]$ obd --version
OceanBase Deploy: 1.6.1
REVISION: 87611f942a25880a15d6b2d638044a7d84ddc488
BUILD_BRANCH: HEAD
BUILD_TIME: Nov 18 2022 16:07:36OURCE
Copyright (C) 2021 OceanBase
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
2.1.2 下载最新oceanbase-all-in-one包

登陆 https://open.oceanbase.com/softwareCenter/community 下载最新版本 4.0.0_beta_bp2包 并上传至中控机服务器 admin用户下。

image20221228160811436.png

2.1.3 执行install.sh
-- admin用户,中控机服务器操作
-- 主要如下几步操作
1) 解压oceanbase-all-in-one安装包
2)执行source
3) 执行obd demo
4) 查看obd 版本-- 解压oceanbase-all-in-one最新安装包
[admin@obproxy-node ~]$ cd soft/
[admin@obproxy-node soft]$ tar -zxf oceanbase-all-in-one-4.0.0.0-beta-100120221214162701.el7.x86_64.tar.gz
[admin@obproxy-node soft]$ cd oceanbase-all-in-one/bin
-- 执行install.sh脚本
[admin@obproxy-node bin]$ ./install.sh
name: grafana
version: 7.5.17
release:1
arch: x86_64
md5: 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6
add /home/admin/soft/oceanbase-all-in-one/rpms/grafana-7.5.17-1.el7.x86_64.rpm to local mirror
name: obagent
version: 1.2.0
release:4.el7
arch: x86_64
md5: 0e8f5ee68c337ea28514c9f3f820ea546227fa7e
add /home/admin/soft/oceanbase-all-in-one/rpms/obagent-1.2.0-4.el7.x86_64.rpm to local mirror
name: obproxy-ce
version: 4.0.0
release:5.el7
arch: x86_64
md5: de53232a951184fad75b15884458d85e31d2f6c3
add /home/admin/soft/oceanbase-all-in-one/rpms/obproxy-ce-4.0.0-5.el7.x86_64.rpm to local mirror
name: oceanbase-ce
version: 4.0.0.0
release:102000032022120718.el7
arch: x86_64
md5: e1c71a4cb252e51f210aae129cee0f09613d42bb
add /home/admin/soft/oceanbase-all-in-one/rpms/oceanbase-ce-4.0.0.0-102000032022120718.el7.x86_64.rpm to local mirror
name: oceanbase-ce-libs
version: 4.0.0.0
release:102000032022120718.el7
arch: x86_64
md5: ae630e9c53aeee1f6a542d9bdee6beefdc9af3ad
add /home/admin/soft/oceanbase-all-in-one/rpms/oceanbase-ce-libs-4.0.0.0-102000032022120718.el7.x86_64.rpm to local mirror
name: prometheus
version: 2.37.1
release:10000102022110211.el7
arch: x86_64
md5: 58913c7606f05feb01bc1c6410346e5fc31cf263
add /home/admin/soft/oceanbase-all-in-one/rpms/prometheus-2.37.1-10000102022110211.el7.x86_64.rpm to local mirror
Disable remote okadd auto set env logic to profile: /home/admin/.bash_profile#####################################################################Install Finished 
=====================================================================
Setup Environment:     source ~/.oceanbase-all-in-one/bin/env.sh 
Quick Start:           obd demo 
More Details:          obd -h 
=====================================================================-- 然后执行 source
[admin@obproxy-node ~]$ source /home/admin/.oceanbase-all-in-one/bin/env.sh-- 执行obd demo
[admin@obproxy-node bin]$ obd demo
Found a higher version
name: oceanbase-ce
version: 4.0.0.0
release:102000032022120718.el7
arch: x86_64
md5: e1c71a4cb252e51f210aae129cee0f09613d42bb
Do you want to use it? [y/n]: y
Package oceanbase-ce-4.0.0.0-102000032022120718.el7 is available.
install grafana-7.5.17 for local ok
install oceanbase-ce-4.0.0.0 for local ok
install obagent-1.2.0 for local ok
install prometheus-2.37.1 for local ok
install obproxy-ce-4.0.0 for local ok
Cluster param config check ok
Open ssh connection ok
Generate grafana configuration ok
Generate observer configuration ok
Generate obagent configuration ok
Generate prometheus configuration ok
Generate obproxy configuration ok
install grafana-7.5.17 for local ok
install oceanbase-ce-4.0.0.0 for local ok
install obagent-1.2.0 for local ok
install prometheus-2.37.1 for local ok
install obproxy-ce-4.0.0 for local ok
+--------------------------------------------------------------------------------------------+
|                                          Packages                                          |
+--------------+---------+------------------------+------------------------------------------+
| Repository   | Version | Release                | Md5                                      |
+--------------+---------+------------------------+------------------------------------------+
| grafana      | 7.5.17  | 1                      | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| oceanbase-ce | 4.0.0.0 | 102000032022120718.el7 | e1c71a4cb252e51f210aae129cee0f09613d42bb |
| obagent      | 1.2.0   | 4.el7                  | 0e8f5ee68c337ea28514c9f3f820ea546227fa7e |
| prometheus   | 2.37.1  | 10000102022110211.el7  | 58913c7606f05feb01bc1c6410346e5fc31cf263 |
| obproxy-ce   | 4.0.0   | 5.el7                  | de53232a951184fad75b15884458d85e31d2f6c3 |
+--------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Parameter check ok
Open ssh connection ok
Cluster status check ok
[ERROR] Some of the servers in the cluster have been started
127.0.0.1 grafana is started
127.0.0.1 prometheus is started
See https://www.oceanbase.com/product/ob-deployer/error-codes .-- 查看obd当前版本
[admin@obproxy-node ~]$ obd --version
OceanBase Deploy: 1.6.2
REVISION: 188385cf71729311c33df8cfa2d9b059ade337fd
BUILD_BRANCH: HEAD
BUILD_TIME: Dec 14 2022 11:34:49OURCE
Copyright (C) 2021 OceanBase
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

2.2 升级OceanBase

2.2.1 禁用远程镜像
-- admin用户,中控机服务器操作
[admin@obproxy-node ~]$ obd mirror disable remote
Disable remote ok
2.2.2 拷贝新版本oceanbase-ce包
-- admin用户,中控机服务器操作
[admin@obproxy-node ~]$ obd mirror clone /home/admin/soft/oceanbase-all-in-one/rpms/oceanbase-ce-4.0.0.0-102000032022120718.el7.x86_64.rpm
mirror oceanbase-ce-4.0.0.0-102000032022120718.el7.x86_64.rpm existed. Do you want to overwrite? [y/n]: y
name: oceanbase-ce
version: 4.0.0.0
release:102000032022120718.el7
arch: x86_64
md5: e1c71a4cb252e51f210aae129cee0f09613d42bb
add /home/admin/soft/oceanbase-all-in-one/rpms/oceanbase-ce-4.0.0.0-102000032022120718.el7.x86_64.rpm to local mirror-- 查看md5值
[admin@obproxy-node ~]$ obd mirror list local
+----------------------------------------------------------------------------------------------------------+
|                                            local Package List                                            |
+-------------------+---------+------------------------+--------+------------------------------------------+
| name              | version | release                | arch   | md5                                      |
+-------------------+---------+------------------------+--------+------------------------------------------+
| oceanbase-ce      | 4.0.0.0 | 100000282022112511.el7 | x86_64 | 75ec57ebe42718b386901357cef1e5d3864748ee |
| oceanbase-ce-libs | 4.0.0.0 | 100000282022112511.el7 | x86_64 | c5f1e971cc335efe36233cae291a170a0f518e19 |
| ob-deploy         | 1.6.2   | 10.el7                 | x86_64 | 4542035d1b1af411c93cfe9f1dd78327c2ea05d4 |
| grafana           | 7.5.17  | 1                      | x86_64 | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| obagent           | 1.2.0   | 4.el7                  | x86_64 | 0e8f5ee68c337ea28514c9f3f820ea546227fa7e |
| obproxy-ce        | 4.0.0   | 5.el7                  | x86_64 | de53232a951184fad75b15884458d85e31d2f6c3 |
| oceanbase-ce-libs | 4.0.0.0 | 102000032022120718.el7 | x86_64 | ae630e9c53aeee1f6a542d9bdee6beefdc9af3ad |
| prometheus        | 2.37.1  | 10000102022110211.el7  | x86_64 | 58913c7606f05feb01bc1c6410346e5fc31cf263 |
| oceanbase-ce      | 4.0.0.0 | 102000032022120718.el7 | x86_64 | e1c71a4cb252e51f210aae129cee0f09613d42bb |
+-------------------+---------+------------------------+--------+------------------------------------------+
2.2.3 为租户设置primary_zone
[admin@obproxy-node ~]$  obclient -h 10.110.3.152 -uroot@sys#obcluster -pob@Passwd -P2883 -c -A oceanbase
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 50
Server version: OceanBase_CE 4.0.0.0 (r102000032022120718-58fdb0ef1a9b589ef05e56c1ede65e951986d996) (Built Dec  7 2022 18:32:31)Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.obclient [oceanbase]> ALTER TENANT obuser PRIMARY_ZONE ='zone2';
Query OK, 0 rows affected (0.249 sec)obclient [oceanbase]> ALTER TENANT obuser PRIMARY_ZONE ='zone1;zone2;zone3';
Query OK, 0 rows affected (0.095 sec)
2.2.4 升级OceanBase
[admin@obproxy-node ~]$ obd cluster upgrade obcluster -c oceanbase-ce -V 4.0.0.0 --usable e1c71a4cb252e51f210aae129cee0f09613d42bb
Get local repositories and plugins ok
Open ssh connection ok
Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository install ok
Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository lib check ok
Start observer ok
observer program health check ok
Connect to observer ok
Exec upgrade_checker.py ok
Enable upgrade mode ok
Exec upgrade_pre.py ok
Rotation upgrade ok
upgrade zone "zone1"Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository lib check ok
Stop observer ok
Start observer ok
observer program health check ok
Connect to observer ok
upgrade zone "zone2"
Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository install ok
Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository lib check ok
Stop observer ok
Start observer ok
observer program health check ok
Connect to observer ok
upgrade zone "zone3"
Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository install ok
Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository lib check ok
Stop observer ok
Start observer ok
observer program health check ok
Connect to observer ok
Exec upgrade_post.py ok
Disable upgrade mode ok
Root inspection ok
Exec upgrade_post_checker.py ok
Wait for observer init ok
+------------------------------------------------+
|                    observer                    |
+--------------+---------+------+-------+--------+
| ip           | version | port | zone  | status |
+--------------+---------+------+-------+--------+
| 10.110.3.152 | 4.0.0.0 | 2881 | zone1 | ACTIVE |
| 10.110.3.153 | 4.0.0.0 | 2881 | zone2 | ACTIVE |
| 10.110.3.154 | 4.0.0.0 | 2881 | zone3 | ACTIVE |
+--------------+---------+------+-------+--------+
obclient -h10.110.3.152 -P2881 -uroot -pob@Passwd -Doceanbase -A

2.3 升级obproxy

-- admin用户,中控机服务器操作
-- 查询当前md5值
[admin@obproxy-node ~]$ obd mirror list local
+----------------------------------------------------------------------------------------------------------+
|                                            local Package List                                            |
+-------------------+---------+------------------------+--------+------------------------------------------+
| name              | version | release                | arch   | md5                                      |
+-------------------+---------+------------------------+--------+------------------------------------------+
| oceanbase-ce      | 4.0.0.0 | 100000282022112511.el7 | x86_64 | 75ec57ebe42718b386901357cef1e5d3864748ee |
| oceanbase-ce-libs | 4.0.0.0 | 100000282022112511.el7 | x86_64 | c5f1e971cc335efe36233cae291a170a0f518e19 |
| ob-deploy         | 1.6.2   | 10.el7                 | x86_64 | 4542035d1b1af411c93cfe9f1dd78327c2ea05d4 |
| grafana           | 7.5.17  | 1                      | x86_64 | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| obagent           | 1.2.0   | 4.el7                  | x86_64 | 0e8f5ee68c337ea28514c9f3f820ea546227fa7e |
| oceanbase-ce-libs | 4.0.0.0 | 102000032022120718.el7 | x86_64 | ae630e9c53aeee1f6a542d9bdee6beefdc9af3ad |
| prometheus        | 2.37.1  | 10000102022110211.el7  | x86_64 | 58913c7606f05feb01bc1c6410346e5fc31cf263 |
| oceanbase-ce      | 4.0.0.0 | 102000032022120718.el7 | x86_64 | e1c71a4cb252e51f210aae129cee0f09613d42bb |
| obproxy-ce        | 4.0.0   | 5.el7                  | x86_64 | de53232a951184fad75b15884458d85e31d2f6c3 |
+-------------------+---------+------------------------+--------+------------------------------------------+-- 升级obproxy
[admin@obproxy-node ~]$ obd cluster upgrade obcluster -c obproxy-ce -V 4.0.0 --usable de53232a951184fad75b15884458d85e31d2f6c3  
Get local repositories and plugins ok
+------------------------------------------------------------------------------------+
|                           Search obproxy-ce 4.0.0 Result                           |
+------------+---------+---------+--------+------------------------------------------+
| name       | version | release | arch   | md5                                      |
+------------+---------+---------+--------+------------------------------------------+
| obproxy-ce | 4.0.0   | 5.el7   | x86_64 | de53232a951184fad75b15884458d85e31d2f6c3 |
+------------+---------+---------+--------+------------------------------------------+
install obproxy-ce-4.0.0 for local ok
The current version is already obproxy-ce-4.0.0-5.el7-de53232a951184fad75b15884458d85e31d2f6c3.
Noting to do.
See https://www.oceanbase.com/product/ob-deployer/error-codes .

根据OceanBase开源社区开发人员反馈,BP1到BP2,obproxy没新版本,可以不用升级,本次只是展示如需升级obproxy该如何升级。

三、附录

在升级过程中也遇到一些问题,因为有些官网资料也没有说明,要靠自己摸索,加上在OB开源社区群里不断的请教,在升级过程中主要遇到如下一些故障。

3.1 obd update提示需root用户

-- admin用户,中控机服务器操作
[admin@obproxy-node ~]$ obd update
[ERROR] To update OBD, you must be a root user.
-- 提示需要使用 root用户-- 当尝试使用root用户执行时报 OBD upgrade plugin not found
[root@obproxy-node ~]# /home/admin/oceanbase-all-in-one/obd/usr/bin/obd update
[ERROR] OBD upgrade plugin not found

因为在安装obd时使用的是admin普通用户安装,未使用root用户,但在执行obd update升级时提示需要root用户,但切换到root用户又提示没有发现obd 升级插件,即便我将admin用户通过sudo方式也同样报错。

最后根据OB社区人员建议,改用下载最新的all-in-one BP2版本安装包,使用里面自带install.sh方式进行升级

3.2 未设置primary_zone导致升级失败

在升级oceanBase前,未给多租户用户设置PRIMARY_ZONE,当执行升级时执行到Exec upgrade_checker.py 该步骤报错,导致执行 obd cluster upgrade obcluster 失败,执行过程及报错信息如下。

如下:
[admin@obproxy-node ~]$ obd mirror disable remote
Disable remote ok
[admin@obproxy-node ~]$ obd mirror clone /home/admin/soft/oceanbase-all-in-one/rpms/oceanbase-ce-4.0.0.0-102000032022120718.el7.x86_64.rpm
mirror oceanbase-ce-4.0.0.0-102000032022120718.el7.x86_64.rpm existed. Do you want to overwrite? [y/n]: y
name: oceanbase-ce
version: 4.0.0.0
release:102000032022120718.el7
arch: x86_64
md5: e1c71a4cb252e51f210aae129cee0f09613d42bb
add /home/admin/soft/oceanbase-all-in-one/rpms/oceanbase-ce-4.0.0.0-102000032022120718.el7.x86_64.rpm to local mirror
[admin@obproxy-node ~]$
[admin@obproxy-node ~]$ obd mirror list local
±---------------------------------------------------------------------------------------------------------+
| local Package List |
±------------------±--------±-----------------------±-------±-----------------------------------------+
| name | version | release | arch | md5 |
±------------------±--------±-----------------------±-------±-----------------------------------------+
| oceanbase-ce | 4.0.0.0 | 100000282022112511.el7 | x86_64 | 75ec57ebe42718b386901357cef1e5d3864748ee |
| oceanbase-ce-libs | 4.0.0.0 | 100000282022112511.el7 | x86_64 | c5f1e971cc335efe36233cae291a170a0f518e19 |
| ob-deploy | 1.6.2 | 10.el7 | x86_64 | 4542035d1b1af411c93cfe9f1dd78327c2ea05d4 |
| grafana | 7.5.17 | 1 | x86_64 | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| obagent | 1.2.0 | 4.el7 | x86_64 | 0e8f5ee68c337ea28514c9f3f820ea546227fa7e |
| obproxy-ce | 4.0.0 | 5.el7 | x86_64 | de53232a951184fad75b15884458d85e31d2f6c3 |
| oceanbase-ce-libs | 4.0.0.0 | 102000032022120718.el7 | x86_64 | ae630e9c53aeee1f6a542d9bdee6beefdc9af3ad |
| prometheus | 2.37.1 | 10000102022110211.el7 | x86_64 | 58913c7606f05feb01bc1c6410346e5fc31cf263 |
| oceanbase-ce | 4.0.0.0 | 102000032022120718.el7 | x86_64 | e1c71a4cb252e51f210aae129cee0f09613d42bb |
±------------------±--------±-----------------------±-------±-----------------------------------------+[admin@obproxy-node ~]$ obd cluster upgrade obcluster -c oceanbase-ce -V 4.0.0.0 --usable e1c71a4cb252e51f210aae129cee0f09613d42bb
Get local repositories and plugins ok
±----------------------------------------------------------------------------------------------------+
| Search oceanbase-ce 4.0.0.0 Result |
±-------------±--------±-----------------------±-------±-----------------------------------------+
| name | version | release | arch | md5 |
±-------------±--------±-----------------------±-------±-----------------------------------------+
| oceanbase-ce | 4.0.0.0 | 100000282022112511.el7 | x86_64 | 75ec57ebe42718b386901357cef1e5d3864748ee |
| oceanbase-ce | 4.0.0.0 | 102000032022120718.el7 | x86_64 | e1c71a4cb252e51f210aae129cee0f09613d42bb |
±-------------±--------±-----------------------±-------±-----------------------------------------+
install oceanbase-ce-4.0.0.0 for local ok
Open ssh connection ok
Connect to observer 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.0.0.0 | 102000032022120718.el7 | x86_64 | e1c71a4cb252e51f210aae129cee0f09613d42bb | 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
Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository install ok
Remote oceanbase-ce-4.0.0.0-102000032022120718.el7-e1c71a4cb252e51f210aae129cee0f09613d42bb repository lib check ok
Start observer ok
observer program health check ok
Connect to observer ok
Exec upgrade_checker.py x
See https://www.oceanbase.com/product/ob-deployer/error-codes .-- 报错日志信息如下:
[admin@obproxy-node ~]$ more upgrade_checker.log
[2022-12-28 16:49:13] INFO init.py:1611 parameters from cmd: host=“10.110.3.152”, port=2881, user=“root”, password=“ob@Passwd”, log-file=“upgrade_checker.log”
[2022-12-28 16:49:14] INFO init.py:1611 succeed to execute query: select distinct value from GV$OB_PARAMETERS where name=‘min_observer_version’, rowcount = 1
[2022-12-28 16:49:14] INFO init.py:1611 check observer version success, version = 4.0.0.0
[2022-12-28 16:49:14] INFO init.py:1611 succeed to execute query: select count(1) as unsync_cnt from GV$OB_LOG_STAT where in_sync = ‘NO’, rowcount = 1
[2022-12-28 16:49:14] INFO init.py:1611 check paxos replica success
[2022-12-28 16:49:14] INFO init.py:1611 succeed to execute query: select count(1) as cnt from DBA_OB_TENANT_JOBS where job_status=‘INPROGRESS’ and result_code is null, rowcount = 1
[2022-12-28 16:49:14] INFO init.py:1611 succeed to execute query: select count(1) as rebalance_task_cnt from CDB_OB_LS_REPLICA_TASKS, rowcount = 1
[2022-12-28 16:49:14] INFO init.py:1611 check rebalance task success
[2022-12-28 16:49:14] INFO init.py:1611 succeed to execute query: select count(1) from CDB_OB_MAJOR_COMPACTION where STATUS != ‘IDLE’, rowcount = 1
[2022-12-28 16:49:14] INFO init.py:1611 check cluster status success
[2022-12-28 16:49:14] INFO init.py:1611 succeed to execute query: select count(*) as count from DBA_OB_TENANTS where status != ‘NORMAL’, rowcount = 1
[2022-12-28 16:49:14] INFO init.py:1611 check tenant status success
[2022-12-28 16:49:14] INFO init.py:1611 succeed to execute query: select count(1) from CDB_OB_RESTORE_PROGRESS, rowcount = 1
[2022-12-28 16:49:14] INFO init.py:1611 check restore job success
[2022-12-28 16:49:14] INFO init.py:1611 succeed to execute query: select tenant_name,primary_zone from DBA_OB_TENANTS where tenant_id != 1, rowcount = 2
[2022-12-28 16:49:14] INFO init.py:1611 check tenant primary zone success
[2022-12-28 16:49:14] ERROR init.py:1585 run error
Traceback (most recent call last):
File “/tmp/10.110.3.152:2882_10.110.3.153:2882_10.110.3.154:2882/e1c71a4cb252e51f210aae129cee0f09613d42bb/upgrade_checker.py”, line 406, in do_check
check_fail_list()
File “/tmp/10.110.3.152:2882_10.110.3.153:2882_10.110.3.154:2882/e1c71a4cb252e51f210aae129cee0f09613d42bb/upgrade_checker.py”, line 383, in check_fail_list
raise MyError(error_msg)
MyError: 'upgrade checker failed with 2 reasons: [META$1002 tenant primary zone random before update not allowed] , [obuser tenant primary zone random before update not allowed] ’
[2022-12-28 16:49:14] ERROR init.py:1585 normal error
Traceback (most recent call last):
File “/tmp/10.110.3.152:2882_10.110.3.153:2882_10.110.3.154:2882/e1c71a4cb252e51f210aae129cee0f09613d42bb/upgrade_checker.py”, line 410, in do_check
raise e
MyError: 'upgrade checker failed with 2 reasons: [META$1002 tenant primary zone random before update not allowed] , [obuser tenant primary zone random before update not allowed] ’
[2022-12-28 16:49:14] ERROR init.py:1585 normal error
Traceback (most recent call last):
File “/tmp/10.110.3.152:2882_10.110.3.153:2882_10.110.3.154:2882/e1c71a4cb252e51f210aae129cee0f09613d42bb/upgrade_checker.py”, line 440, in
do_check(host, port, user, password, upgrade_params)
File “/tmp/10.110.3.152:2882_10.110.3.153:2882_10.110.3.154:2882/e1c71a4cb252e51f210aae129cee0f09613d42bb/upgrade_checker.py”, line 419, in do_check
raise e
MyError: 'upgrade checker failed with 2 reasons: [META$1002 tenant primary zone random before update not allowed] , [obuser tenant primary zone random before update not allowed] ’

根据OB社区开发人员解释,在升级前需要为多租户设置primary_zone,如果有多个租户,就要为每个租户设置primary_zone。而且设置primary_zone时要至少设置两个primary_zone,以防止无法进行切换。

当为多租户修改了primary_zone后,再根据 2.2.4 升级OceanBase中的步骤重新执行 obd cluster upgrade obcluster 就可以了。

3.3 其它注意事项

除了以上几点,另外就是在执行命令时,一些细节,比如执行命令里的一些参数,比如usable,以及rpm包的md5值,还有所对应的版本号,比如4.0.0 就不能写成 4.0.0.0,否则升级过程中也会报错。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/889227.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

基于SSM框架的社区医院管理系统(计算机毕业设计)+万字说明文档

系统合集跳转 源码获取链接 一、系统环境 运行环境: 最好是java jdk 1.8&#xff0c;我们在这个平台上运行的。其他版本理论上也可以。 IDE环境&#xff1a; Eclipse,Myeclipse,IDEA或者Spring Tool Suite都可以 tomcat环境&#xff1a; Tomcat 7.x,8.x,9.x版本均可 操作系统…

视频安防监控平台:Liveweb视频监控管理云平台方案

LiveWeb是深圳市好游科技有限公司开发的一套综合视频汇聚管理平台&#xff0c;可提供多协议&#xff08;RTSP/RTMP/GB28181/海康Ehome/大华&#xff0c;海康SDK等&#xff09;的视频设备接入&#xff0c;支持GB/T28181上下级联&#xff0c;RTSP\RTMP转GB/T28181&#xff0c;云台…

Linux进程概念-详细版(二)

目录 前言&#xff1a; 进程优先级 基本概念 查看系统进程 PRI与NI 查看进程优先级信息 通过top命令更改进程的nice值 通过renice命令更改进程的nice值 四个重要概念 环境变量 基本概念 常见环境变量 查看环境变量的方法 测试PATH 测试HOME 测试SHELL ​编辑 …

前端监控方案sentry整体概览

查看PDF 目****录 1. Sentry介绍 1.1. 编写目的 1.2. 名词定义 2. Sentry监控原理概述 2.1. 常见的性能优化指标及获取方式 2.2. 常见的前端异常及其捕获方式 3. Sentry?整体架构 4. Sentry安装部署 4.1. 前提条件 4.2. 安装 5. Sentry环境配置 5.1. 初始化配置 …

C++11相关知识点

auto、decltype自动类型推导 auto并不代表实际的数据类型&#xff0c;且auto并不是在任何场合下都能推导出变量的实际类型&#xff0c;使用auto必须初始化。 auto 变量名 变量值&#xff1b; 当变量不是指针或引用类型时&#xff0c;推导的结果中不会保留const、volatile关键…

【面试】分布式锁专题

1.你说一下什么是分布式锁 分布式锁是一种在分布式系统环境下实现的锁机制&#xff0c;它主要用于解决&#xff0c;多个分布式节点之间对共享资源的互斥访问问题&#xff0c;确保在分布式系统中&#xff0c;即使存在有多个不同节点上的进程或线程&#xff0c;同一时刻也只有一…

Error relaunching VirtualBox VM process: 5 启动虚拟机时发生了错误

出现错误 一大早起来发现虚拟机打不开&#xff0c;看了虚拟机日志是正常的&#xff0c;还回了个档都不行。 最后我突然想起之前在哪看到过&#xff1a;“完美游戏平台会导致虚拟机的问题。” 解决方法 于是我把完美游戏卸载了&#xff0c;发现&#xff0c;真的&#xf…

MCU、ARM体系结构,单片机基础,单片机操作

计算机基础 计算机的组成 输入设备、输出设备、存储器、运算器、控制器 输入设备&#xff1a;将其他信号转换为计算机可以识别的信号&#xff08;电信号&#xff09;。输出设备&#xff1a;将电信号&#xff08;&#xff10;、&#xff11;&#xff09;转为人或其他设备能理解的…

从零开始:如何在.NET Core Web API中完美配置Swagger文档

目录 新建项目 RestFul Swagger配置 注释展示 版本控制 Token传值 方法封装 新建项目 打开visual studio创建新项目&#xff0c;这里我们选择.net core web api模板&#xff0c;然后输入项目名称及其解决方案创建新项目 这里使用配置一些其他信息&#xff0c;根据自己情…

百度搜索应适用中文域名国家标准,修复中文网址展示BUG

12月1日中文域名国家标准正式实施。该标准“明确了中文域名在编码、解析、注册、字表等方面的技术要求&#xff0c;适用于中文域名注册管理机构、注册服务机构、网络软硬件服务商及终端用户”。 00:23 显然&#xff0c;百度作为网络软硬件服务商&#xff0c;是包括在国家标准的…

Windows安装elasticsearch、Kibana以及IK分词器

一、下载 1.下载elasticsearch 访问官网Download Elasticsearch | Elastic&#xff0c;下载elasticsearch 2.下载 Kibana 访问Download Kibana Free | Get Started Now | Elastic &#xff0c;下载 Kibana 3. IK分词器下载 访问Gitee 极速下载/elasticsearch-analysis-ik选…

第一个C++程序--(蓝桥杯备考版)

第一个C程序 基础程序 #include <iostream>//头⽂件 using namespace std;//使⽤std的名字空间 int main()//main函数 {cout << "hello world!" << endl; //输出&#xff1a;在屏幕打印"hello world!" return 0;}main函数 main 函数是…

Elasticsearch Serverless 中的数据流自动分片

作者&#xff1a;来自 Elastic Andrei Dan 在 Elastic Cloud Serverless 中&#xff0c;我们根据索引负载自动为数据流配置最佳分片数量&#xff0c;从而使用户无需摆弄分片。 传统上&#xff0c;用户会更改数据流的分片配置&#xff0c;以处理各种工作负载并充分利用可用资源。…

TcpServer 服务器优化之后,加了多线程,对心跳包进行优化

TcpServer 服务器优化之后&#xff0c;加了多线程&#xff0c;对心跳包进行优化 TcpServer.h #ifndef TCPSERVER_H #define TCPSERVER_H#include <iostream> #include <winsock2.h> #include <ws2tcpip.h> #include <vector> #include <map> #…

python进阶-05-利用Selenium来实现动态爬虫

python进阶-05-利用Selenium来实现动态爬虫 一.说明 这是python进阶部分05&#xff0c;我们上一篇文章学习了Scrapy来爬取网站&#xff0c;但是很多网站需要登录才能爬取有用的信息&#xff0c;或者网站的静态部分是一个空壳&#xff0c;内容是js动态加载的,或者人机验证&…

Linux —— vim 编辑器

一、什么是vim vim是一个功能强大、高度可定制的文本编辑器。以下是对vim编辑器的具体介绍&#xff1a; 历史背景&#xff1a;vim最初由Bram Moolenaar在1991年开发&#xff0c;作为vi编辑器的增强版&#xff0c;增加了许多新的特性和改进。它继承了vi的基本编辑功能和键盘快捷…

高效率同步降压转换器 - YB2416D: 实现快速充电和高效能供电的利器

概述: YB2416是一款输入耐压超过40V&#xff0c;在4.5V~30V输入电压条件下正常工作&#xff0c;并且能够实现精确恒压以及恒流的同步降压型DC-DC转换器。 内部集成80m2的上管和40m2的下管&#xff0c;无需外部肖特基二极管&#xff0c;可连续输出3A电流。输出3A电流时系统转换…

Repo管理

文章目录 前言Repo介绍清单仓库清单仓库的组成 初始化Repo同步远程仓库Repo实际应用 前言 我们知道&#xff0c;Git是用来管理某一个仓库&#xff0c;那当一个项目用到了多个仓库时&#xff0c;怎么来同步管理这些仓库呢&#xff1f;这个时候就可以引入Repo管理。 Repo介绍 …

神经网络的起源与工作原理

神经网络起源&#xff1a;一个生物神经网络是由一组化学上相连或功能上相关的神经元组成。一个神经元可能与许多其他神经元相连&#xff0c;网络中的神经元和连接的总数可能很广泛。连接&#xff0c;称为突触&#xff0c;通常是从轴突到树突形成的&#xff0c;尽管树突和其他连…

Qwen2.5-7B-Instruct vLLM 部署调用

Qwen2.5-7B-Instruct vLLM 部署调用 vLLM 简介 vLLM 框架是一个高效的大语言模型推理和部署服务系统&#xff0c;具备以下特性&#xff1a; 高效的内存管理&#xff1a;通过 PagedAttention 算法&#xff0c;vLLM 实现了对 KV 缓存的高效管理&#xff0c;减少了内存浪费&…