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

news2024/12/23 14:19:42

注:目前社区版对 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 ok

add 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.coloradmin.cn/o/2257837.html

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

相关文章

python学opencv|读取图像(六)读取图像像素RGB值

【1】引言 前序已经掌握了如何获取灰度图像的像素&#xff0c;文章链接为&#xff1a; python学opencv|读取图像&#xff08;五&#xff09;读取灰度图像像素-CSDN博客 实际上像素就像一个坐标轴&#xff0c;约束了图像的大小。 但实际上我们在学习过程中&#xff0c;对于同…

Linux kill、killall、pkill 命令区别

注&#xff1a;本文为 “Linux kill、killall、pkill” 相关几篇文章合辑。 未整理去重。 kill、killall、pkill、kill -9 区别 区别 进程 ID 唯一&#xff0c;所以 kill 一次只能杀死 1 个进程&#xff0c;其他相同名称的进程仍然存在&#xff0c;而 pkill 和 killall&#…

1139: Coin-row problem

解法&#xff1a; #include <bits/stdc.h> using namespace std; const int N 1e53; int dp[N]; int main() {int n;cin>>n;for (int i1;i<n;i) cin>>dp[i];for (int i2;i<n;i) {dp[i]max(dp[i-1],dp[i-2]dp[i]);}cout<<dp[n]<<endl;retur…

Ubuntu压缩打包解压

ubuntu压缩打包 上图&#xff0c;压缩当前目录svn 为svn.tar.gaz&#xff0c;解压后再当前解压目录生成svn文件 在Ubuntu中&#xff0c;你可以使用tar命令来创建一个压缩包&#xff0c;或者使用zip命令来创建一个.zip压缩文件。以下是两种常见的压缩方法&#xff1a; 下图&am…

Excel 合并工具 将文件复制到目标工作表中与操作日志记录

指定文件夹中读取符合条件的 Excel 文件&#xff0c;将其中的数据按照一定规则复制到目标工作表中&#xff0c;并进行相关的日志记录和工作簿保存操作。 先看下 excel 的结构 合并的结果 log 记录 vba 代码 Sub DeltaCheck()作者和创建时间的注释 定义工作表变量Dim ws As Wor…

Github----提交人不是自己

账号用户名都设置对的,但是提交人不是自己 解决 发现是用户名和账号都夹了"号导致 git config --global user.name "Your Name" git config --global user.email "your.emailexample.com"不用引号 git config --global user.name Your Name git …

ZZCMS2023存在跨站脚本漏洞(CNVD-2024-44822、CVE-2024-44818)

ZZCMS是一款用于搭建招商网站的CMS系统&#xff0c;由PHP语言开发&#xff0c;可快速搭建&#xff1a;医药招商、保健品招商、化妆品招商、农资招商、孕婴童招商、酒类副食类等招商网站。 国家信息安全漏洞共享平台于2024-11-14公布其存在跨站脚本漏洞。 漏洞编号&#xff1a…

[免费]SpringBoot+Vue企业OA自动化办公管理系统【论文+源码+SQL脚本】

大家好&#xff0c;我是java1234_小锋老师&#xff0c;看到一个不错的SpringBootVue企业OA自动化办公管理系统&#xff0c;分享下哈。 项目视频演示 【免费】SpringBootVue企业OA自动化办公管理系统 Java毕业设计_哔哩哔哩_bilibili 项目介绍 随着信息技术在管理上越来越深入…

【MySQL】表的基本查询(下)

&#x1f4e2;博客主页&#xff1a;https://blog.csdn.net/2301_779549673 &#x1f4e2;欢迎点赞 &#x1f44d; 收藏 ⭐留言 &#x1f4dd; 如有错误敬请指正&#xff01; &#x1f4e2;本文由 JohnKi 原创&#xff0c;首发于 CSDN&#x1f649; &#x1f4e2;未来很长&#…

目前Java后端就业前景到底怎么样?

很多人都说今年对于IT行业根本没有所谓的“金三银四”“金九银十”。在各大招聘网站或者软件上不管是大厂还是中小公司大多都是挂个招聘需求&#xff0c;实际并不招人&#xff1b;在行业内的程序员基本都已经感受到了任老前段时间口中所谓的“寒气”。 虽然事实确实是如此&…

机器学习--张量

机器学习–张量 机器学习的数据结构–张量 张量是机器学习程序中的数字容器&#xff0c;本质上就是各种不同维度的数组&#xff0c;如下图所示。 张量的维度称为轴&#xff08;axis&#xff09;&#xff0c;轴的个数称为阶&#xff08;rank&#xff09; 标量–0D张量 impor…

3D 视觉定位技术:汽车零部件制造的智能变革引擎

在汽车零部件制造领域&#xff0c;传统工艺正面临着前所未有的挑战。市场对于零部件精度与生产效率近乎苛刻的要求&#xff0c;促使企业寻求突破之道。而 3D 视觉定位技术&#xff0c;为汽车零部件制造开启了精准定位与智能化生产的新纪元。 3D 视觉定位系统的核心技术原理 3…

uni-app之web-view组件 postMessage 通信【跨端开发系列】

&#x1f517; uniapp 跨端开发系列文章&#xff1a;&#x1f380;&#x1f380;&#x1f380; uni-app 组成和跨端原理 【跨端开发系列】 uni-app 各端差异注意事项 【跨端开发系列】uni-app 离线本地存储方案 【跨端开发系列】uni-app UI库、框架、组件选型指南 【跨端开…

数据结构 (37)外排序的基本方法

前言 外排序&#xff08;External Sorting&#xff09;是指处理那些无法完全加载到内存中的数据集时所使用的排序方法。由于数据量巨大&#xff0c;无法一次性全部放入内存&#xff0c;因此需要使用外部存储设备&#xff08;如磁盘&#xff09;来辅助排序过程。外排序的基本方法…

「Mac玩转仓颉内测版49」小学奥数篇12 - 图形变换与坐标计算

本篇将通过 Python 和 Cangjie 双语实现图形变换与坐标计算。这个题目帮助学生理解平面几何中的旋转、平移和对称变换&#xff0c;并学会用编程实现坐标变化。 关键词 小学奥数Python Cangjie图形变换坐标计算 一、题目描述 编写一个程序&#xff0c;模拟以下三种图形变换&a…

springboot系列--拦截器加载原理

一、拦截器加载原理 拦截器是在容器启动时&#xff0c;就创建并加载好&#xff0c;此时并未放入拦截器链中&#xff0c;只是放在一个拦截器集合当中&#xff0c;当一个请求进来之后&#xff0c;会通过匹配路径&#xff0c;查看是否有命中集合中的拦截器的拦截路径&#xff0c;如…

高通QCA-WiFi-10.4驱动源码解析文档:无线驱动开发的利器

高通QCA-WiFi-10.4驱动源码解析文档&#xff1a;无线驱动开发的利器 【下载地址】高通QCA-WiFi-10.4驱动源码解析文档分享 本仓库提供了一份高通最新的QCA-WiFi-10.4驱动源码解析文档&#xff0c;该文档对于无线驱动开发人员来说&#xff0c;是一份非常宝贵的帮助资料。通过这份…

数据结构与算法 五大算法

文章目录 1&#xff0c;时间复杂度与空间复杂度 2&#xff0c;插入排序 3&#xff0c;希尔排序 4&#xff0c;选择排序 1&#xff0c;单趟排序 2&#xff0c;选择排序PLUS版本 5&#xff0c;冒泡排序 6&#xff0c;快速排序 1&#xff0c;hoare版本 2&#xff0c;挖坑法 前言 …

数据链路层总结

- - 链路、物理链路&#xff1a;两节点间物理线路&#xff08;有线、无线&#xff09;&#xff0c;中间没有任何其他的交换节点 数据链路、逻辑链路&#xff1a; 链路 协议需要的硬件、软件 网络适配器(网卡)&#xff1a;包含物理层、数据链路层 网络适配器软件驱动程…

入门pytorch-Transformer

前言 虽然Transformer是2017年由Google推出&#xff0c;如果按照读论文只读近两年的思路看&#xff0c;那它无疑是过时的&#xff0c;但可惜的是&#xff0c;目前很多论文的核心依然是Transformer&#xff0c;或者由其进行改进的&#xff0c;故本文使用pytorch来搭建一下Trans…