当前位置: 首页 > news >正文

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,否则升级过程中也会报错。

相关文章:

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

注&#xff1a;目前社区版对 4.0 升级 bp1至 bp2也未有完善的文档&#xff0c;本次升级中也是遇到不少坑&#xff0c;写本文也希望对OB感兴趣的可以尝试少些遇坑。 也希望对升级有更好方式建议方式的朋友一起切磋交流&#xff0c;以便再进一步完善升级方案。 第一次做OB的升级&…...

@ControllerAdvice 的实现原理

从源码角度分析 Spring Boot 中 ControllerAdvice 的实现原理 在 Spring Boot 开发中&#xff0c;ControllerAdvice 是一个非常强大的特性&#xff0c;允许开发者集中处理控制器中的异常、全局数据绑定和模型属性。本文将从源码的角度探讨 ControllerAdvice 的实现原理&#x…...

将当前cad图中实体复制到另一个新的dwg的块中,并插入块——CAD c#实现

本案例为&#xff1a;将当前cad图中实体复制到另一个cad的块中&#xff0c;并插入块。 目前代码尚未调试成功&#xff0c;找bug中...... public class Demo {[CommandMethod("xx1")]public void XXA(){// 获取当前文档和数据库Document currentDoc Application.Doc…...

MongoDB-ObjectID 生成器

前言 MongoDB中一个非常关键的概念就是 ObjectID&#xff0c;它是 MongoDB 中每个文档的默认唯一标识符。了解 ObjectID 的生成机制不仅有助于开发人员优化数据库性能&#xff0c;还能帮助更好地理解 MongoDB 的设计理念。 什么是 MongoDB ObjectID&#xff1f; 在 MongoDB …...

解决Vue项目打包后dist中的index.html用浏览器直接打开显示空白页或者page not found的问题

前言 默认情况下&#xff0c;使用 npm run build 打包后的 index.html 无法直接访问&#xff0c;需要nginx转发或使用node启用简单http serve等方式实现。 实际开发中&#xff0c;有时需临时打开前端项目&#xff0c;若可以直接打开打包后的文件&#xff0c;对某些场景下他人简…...

爬虫基础之Session和Cookie

在浏览网站的过程中&#xff0c;我们经常会遇到需要登录的情况&#xff0c;有些页面只有登录之后才可以访问。在登录之后可以连续访问很多次网站&#xff0c;但是有时候过一段时间就需要重新登录。还有一些网站&#xff0c;在打开浏览器时就自动登录了,而且在很长时间内都不会失…...

计算机毕业设计PyFlink+Hadoop广告推荐系统 广告预测 广告数据分析可视化 广告爬虫 大数据毕业设计 Spark Hive 深度学习 机器学

温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 作者简介&#xff1a;Java领…...

排序算法(2):选择排序

问题 排序 [30, 24, 5, 58, 18, 36, 12, 42, 39] 选择排序 选择排序每次从待排序序列中选出最小&#xff08;或最大&#xff09;的元素&#xff0c;将其放到序列的起始位置&#xff0c;然后&#xff0c;再从剩余未排序元素中继续寻找最小&#xff08;或最大&#xff09;元素…...

uni-app(HBuilderX)搭建小程序流程(请求封装,下拉刷新,底部加载等)

uni-app 是一个跨平台的前端框架&#xff0c;用于开发多端应用。uni-app 提供了一个统一的 API&#xff0c;允许开发者编写一次代码&#xff0c;最终部署到多个平台&#xff0c;极大地提高了开发效率。在编写小程序的时候和原生微信开发者工具语法略有区别。 目录 一、请求工具…...

【Super Tilemap Editor使用详解】(一):创建图块集

1、在场景中创建瓦片地图之前&#xff0c;我们需要先创建一个图块集供地图使用。 可以在“Project”面板中创建&#xff1a; 也可以在Assets“” 菜单中创建&#xff1a; 2、创建成功之后&#xff0c;“Atlas Texture”是空的&#xff0c;我们需要选择一个图集。 3、选中插件中…...

驱动---1.DAC8552实现三角波输出

最近开始进行新项目的研发&#xff0c;考虑用DAC做一个前级输出&#xff0c;选择了DAC8552这个器件的一个模块&#xff0c;用了野火的指南者做主控&#xff0c;芯片是STM32F103VET6&#xff0c;主频是72MHz。 一、器件手册重要信息提取 1.DAC8552具有十六位的分辨率、双通道输…...

PHP中GD库的使用

由于我要用到php的验证码 <?php session_start();// 生成验证码 $random_code substr(md5(uniqid(mt_rand(), true)), 0, 6);// 将验证码保存到 session 中 $_SESSION[captcha] $random_code;// 创建图片 $font 6; $image_width 100; $image_height 40;// 创建图像 $…...

【ChArUco Marker】标定板检测

目录 1.ChArUco介绍2.源码分析&#xff08;opencv 4.5.4&#xff09;3.ChAruco板创建&#xff08;opencv 4.5.4&#xff09;4.Charuco板检测&#xff08;opencv 4.5.4&#xff09;ChArUco检测源码&#xff08;不使用标定参数&#xff09; 5.ChArUco姿态估计&#xff08;opencv …...

Kafka | RabbitMQ | RocketMQ | ActiveMQ 的区别和入门案例

springboot&#xff0c;vue&#xff0c;springcloudalibaba课程视频&#xff0c;有需要可以看看 <!-- springboot&#xff0c;springboot整合redis&#xff0c;整合rocketmq视频&#xff1a; --> https://www.bilibili.com/video/BV1nkmRYSErk/?vd_source14d27ec13a473…...

TensorBoard

1、TensorFlow的TensorBoard TensorBoard是TensorFlow的一个组件&#xff0c;它提供了一个交互式的界面&#xff0c;用于可视化TensorFlow程序的训练过程和模型结构。 使用TensorBoard&#xff0c;你可以&#xff1a; 可视化训练过程中的各种指标&#xff0c;如损失函数、准…...

C# 中的异步编程:提升应用程序响应性和性能

C#中的异步编程&#xff08;Asynchronous Programming&#xff09;。异步编程是现代应用程序开发中非常重要的一个方面&#xff0c;它允许程序在等待长时间运行的操作&#xff08;如I/O操作、网络请求等&#xff09;时继续执行其他任务&#xff0c;从而提高应用程序的响应性和性…...

前端框架 React 与 Vue3对比 —— 技术选型

在进行前端框架React与Vue3的技术选型对比时&#xff0c;我们可以从以下几个方面进行综合考虑&#xff1a; 1. 性能比较 • Vue3 通过 Vite 打包工具实现了快速的开发和构建&#xff0c;同时使用了响应式系统和 Proxy 技术来提高数据响应速度。在大部分测试用例中&#xff0c;…...

虚拟机与Xshell5和Xftp4连接与虚拟机克隆

虚拟机与Xshell5和Xftp4连接与虚拟机克隆 虚拟机与Xshell5和Xftp4连接 虚拟机与Xshell5连接 下载Xshell5后启动出现如下界面&#xff0c;点击新建 新建会话输入虚拟机命名&#xff0c;如master&#xff0c;主机输入虚拟机IP&#xff0c;xxx.xxx.xxx.xxx然后确认&#xff0c;…...

华为USG系列防火墙 RESTCONF NAT配置 Python实现

目录 前言 文档下载 开启RESTCONF接口 Python 实现SNAT增删改查 查看nat映射列表 查看私网地址池 查看源地址池&#xff08;公网&#xff09; 查看nat映射规则 创建nat映射规则 创建私网地址池 创建源地址池 创建nat映射规则 修改NAT映射规则 删除NAT映射规则 …...

qemu安装arm64架构银河麒麟

qemu虚拟化软件&#xff0c;可以在一个平台上模拟另一个硬件平台&#xff0c;可以支持多种处理器架构。 一、安装 安装教程&#xff1a;https://blog.csdn.net/qq_36035382/article/details/125308044 下载链接&#xff1a;https://qemu.weilnetz.de/w64/2024/ 我下载的是 …...

深入解析 Spring 框架:核心特性与应用价值

1.什么是spring? Spring 是一个开源的 Java 应用框架&#xff0c;由 Pivotal Software 提供支持。它为开发基于 Java 的企业级应用提供了一整套基础设施支持。Spring 框架的核心功能是依赖注入&#xff08;Dependency Injection, DI&#xff09;&#xff0c;它帮助开发者实现…...

protobuf 报文编解码工具

QT实现的 protobuf 反序列化 & 序列化工具&#xff0c;版本号V1.2 下载链接&#xff1a;protobuf报文编解码工具资源-CSDN文库 源码github&#xff1a;ProtobufTool 使用说明: 1. 点击“加载proto文件”按钮&#xff0c;从本地选择 .proto文件 2. 选择消息名称&#xff…...

Milvus向量数据库06-RAG检索增强

Milvus向量数据库06-RAG检索增强 文章目录 Milvus向量数据库06-RAG检索增强1-学习目标2-参考网址3-执行过程记录1-到底什么是RAGRAG 的基本流程&#xff1a;为什么 RAG 优于传统的基于检索的方法&#xff1a;示例流程&#xff1a; 2-RAG和Elasticsearch对比3-RAG和向量数据库之…...

Unity3D下采集camera场景并推送RTMP服务实现毫秒级延迟直播

技术背景 好多开发者&#xff0c;希望我们能够分享下如何实现Unity下的camera场景采集并推送rtmp服务&#xff0c;然后低延迟播放出来。简单来说&#xff0c;在Unity 中实现采集 Camera 场景并推送RTMP的话&#xff0c;先是获取 Camera 场景数据&#xff0c;通过创建 RenderTe…...

标记数据集生成模型助力无数据情况下的大模型指令微调

在构建大模型应用时&#xff0c;通常有两种方式来改进效果&#xff0c;一种是构建外部知识库&#xff0c;利用RAG来完成。但RAG并不是万能的&#xff0c;对于特定领域的LLM应用&#xff0c;以及无需示例&#xff0c;就能完成特定任务等场合就需要进行微调。然而&#xff0c;微调…...

第六届地博会世界酒中国菜助力广州龙美地标美食公司推动地标发展

第六届知交会暨地博会&#xff1a;世界酒中国菜助力广州龙美地标美食公司推动地标产品创新发展 2024年12月9日至11日&#xff0c;第六届粤港澳大湾区知识产权交易博览会暨国际地理标志产品交易博览会在中新广州知识城盛大启幕。本届盛会吸引了全球众多知识产权领域的专业人士和…...

vue响应式原理

对于响应式原理&#xff0c;我们先了解vue是一个MVVM结构的框架&#xff1b;也就是数据层、视图层、数据-视图层&#xff1b;响应式的原理就是实现当数据更新时&#xff0c;视图层也要相应的更新&#xff0c;基于响应式原理我们可以使数据驱动视图的实现变得简单而高效 一、响…...

SwiftUI 列表(或 Form)子项中的 Picker 引起导航无法跳转的原因及解决

概述 在 SwiftUI 的界面布局中&#xff0c;列表&#xff08;List&#xff09;和 Form 是我们秃头码农们司空见惯的选择。不过大家是否知道&#xff1a;如果将 Picker 之类的视图嵌入到列表或 Form 的子项中会导致导航操作无法被触发。 从上图可以看到&#xff1a;当在 List 的…...

使用Allure作为测试报告生成器(Java+Selenium)

背景 JAVA项目中原先用Jenkinsseleniumselenium grid来日常测试UI并记录。 问题 当某一个testSuite失败时&#xff0c;当需要确认UI regression issue还是selenium test case自身的问题&#xff0c;需要去jenkins中查log&#xff0c;一般得到的是“Can not find element xxx…...

【论文阅读】处理器芯片敏捷设计方法:问题与挑战

作者&#xff1a;包云岗老师 包云岗老师是计算机体系结构方向的大牛&#xff0c;推动了体系结构方面的开源事业! 欢迎对本栏目感兴趣的人学习"一生一芯"~ 学习体会&#xff1a; 已有的软硬件生态系统和开发成本制约了对新结构的探索。但目前仍在几种路线上做尝试~ 1…...

系统内核自动处理 TCP 连接(自动发送 RST 数据包来重置连接)

使用原始套接字发送了一个 SYN 数据包后&#xff0c;对方发送了 SYN,ACK 数据包&#xff0c;但系统仍然会自动发送 RST 数据包。这通常是因为操作系统内核在处理 TCP 连接时的行为。 原因分析 内核处理 TCP 连接&#xff1a; 即使你使用了原始套接字来发送和接收数据包&#x…...

VLDB 2024 | 时空数据(Spatial-temporal)论文总结

VLDB 2024于2024年8月26号-8月30号在中国广州举行。 本文总结了VLDB 2024有关时空数据&#xff08;time series data&#xff09;的相关论文&#xff0c;主要包含如有疏漏&#xff0c;欢迎大家补充。 &#x1f31f;【紧跟前沿】“时空探索之旅”与你一起探索时空奥秘&#xf…...

以ATTCK为例构建网络安全知识图

ATT&CK&#xff08;Adversarial Tactics, Techniques, and Common Knowledge &#xff09;是一个攻击行为知识库和模型&#xff0c;主要应用于评估攻防能力覆盖、APT情报分析、威胁狩猎及攻击模拟等领域。本文简单介绍ATT&CK相关的背景概念&#xff0c;并探讨通过ATT&a…...

Qt初识_对象树

个人主页&#xff1a;C忠实粉丝 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 C忠实粉丝 原创 Qt初识_对象树 收录于专栏【Qt开发】 本专栏旨在分享学习Qt的一点学习笔记&#xff0c;欢迎大家在评论区交流讨论&#x1f48c; 目录 什么是对象树 为什么要引…...

规范秩相关信息搜集Day2

系列博客目录 文章目录 系列博客目录1.A Survey on Tensor Techniques and Applications in Machine Learning2.有没有研究低秩矩阵有利于分类的计算机方面的论文呢3.Image classification based on low-rank matrix recovery and Naive Bayes collaborative representatio 基于…...

【unity小技巧】分享vscode如何进行unity开发,且如何开启unity断点调试模式,并进行unity断点调试(2024年最新的方法,实测有效)

文章目录 前言一、前置条件1、已安装Visual Studio Code&#xff0c;并且unity首选项>外部工具>外部脚本编辑器选择为Visual Studio Code [版本号]&#xff0c;2、在Visual Studio Code扩展中搜索Unity&#xff0c;并安装3、同时注意这个插件下面的描述&#xff0c;需要根…...

交换瓶子(图论 贪心)

1224. 交换瓶子 - AcWing题库 把每一个瓶子看成一个点&#xff0c;从每个瓶子向他应该在的那个位置的瓶子连一条边 通过这个方式&#xff0c;我们就可以连出n条边 观察可以发现这些图有特点&#xff1a; n个点 连成n条边 因为每个点会指向它应该在的位置的那个点&#xff…...

汽车升级到底应不应该设置“可取消“功能

最近&#xff0c;汽车OTA&#xff08;Over-the-Air&#xff09;升级频频成为车主讨论的热点。有些车主反映&#xff0c;一些升级增加了实用功能&#xff0c;而另一些却让体验变得复杂甚至带来不便。于是&#xff0c;大家不禁发问&#xff1a;汽车升级功能究竟应不应该允许“可取…...

Mac电脑钓鱼到拿下核心权限

目录 一. 前言 二. PKG后门制作阶段 2.1 环境准备 2.2 制作过程 2.3 成功上线 三 . 浏览器密码抓取 四. 权限维持 1. 手动权限维持 2. MSF自动化维持 五. 参考文章 一. 前言 攻防对抗强度和难度日益演进,传统的渗透测试思路成本逐渐提高,钓鱼已经成为当下攻击者最常…...

Docker多架构镜像构建踩坑记

背景 公司为了做信创项目的亮点&#xff0c;需要将现有的一套在X86上运行的应用系统迁移到ARM服务器上运行&#xff0c;整个项目通过后端Java&#xff0c;前端VUEJS开发通过CICD做成Docker镜像在K8S里面运行。但是当前的CICD产品不支持ARM的镜像构建&#xff0c;于是只能手工构…...

docker 架构详解

Docker架构是基于客户端-服务器&#xff08;C/S&#xff09;模式的&#xff0c;包含多个关键组件&#xff0c;以确保容器化应用的高效构建、管理和运行。以下是对Docker架构的详细解析&#xff1a; Docker 架构概述 Docker 架构采用客户端-服务器&#xff08;C/S&#xff09;…...

05-标准库开发-STM32-IIC协议

七、STM32中IIC协议 概述 Inter-Integrated Circuit (IIC)&#xff0c;也常称为I2C&#xff08;I squared C&#xff09;&#xff0c;是一种同步、串行、半双工通信总线协议。它主要用于连接低速外围设备到处理器或微控制器上&#xff0c;如MPU6050姿态传感器、OLED显示屏、存…...

vue 封装全局过滤器

1.找到utils下创建fifilter.js 一些常用的过滤方法 export const filters {//url解码urlCode: value > {if (!value) return let v decodeURIComponent(value)let bigIndex v.lastIndexOf(/)let endIndex v.lastIndexOf(.)let url v.substring(bigIndex 1, endIndex)…...

【PlantUML系列】流程图(四)

目录 目录 一、基础用法 1.1 开始和结束 1.2 操作步骤 1.3 条件判断 1.4 并行处理 1.5 循环 1.6 分区 1.7 泳道 一、基础用法 1.1 开始和结束 开始一般使用start关键字&#xff1b;结束一般使用stop/end关键字。基础用法包括&#xff1a; start ... stopstart ...…...

MATLAB中的合并分类数组

目录 创建分类数组 串联分类数组 创建具有不同类别的分类数组 串联具有不同类别的数组 分类数组的并集 此示例演示了如何合并两个分类数组。 创建分类数组 创建分类数组 A&#xff0c;其中包含教室 A 中的 25 个学生的首选午餐饮料。 rng(default) A randi(3,[25,1]); …...

流编辑器sed(stream editor)

一.sed简介 sed是一种流编辑器&#xff0c;处理时&#xff0c;把当前处理的行存储在临时缓冲区中&#xff0c;称为模式空间&#xff0c;接着用sed命令处 理缓冲区中的内容&#xff0c;处理完成后&#xff0c;把缓冲区的内容送往屏幕。接着处理下一行&#xff0c;这样不断重复&…...

R语言的数据结构--矩阵

【图书推荐】《R语言医学数据分析实践》-CSDN博客 《R语言医学数据分析实践 李丹 宋立桓 蔡伟祺 清华大学出版社9787302673484》【摘要 书评 试读】- 京东图书 (jd.com) R语言医学数据分析实践-R语言的数据结构-CSDN博客 矩阵是一个二维数组&#xff0c;矩阵中的元素都具有相…...

使用 Python 爬取某网站简历模板(bs4/lxml+协程)

使用 Python 爬取站长素材简历模板 简介 在本教程中&#xff0c;我们将学习如何使用 Python 来爬取站长素材网站上的简历模板。我们将使用requests和BeautifulSoup库来发送 HTTP 请求和解析 HTML 页面。本教程将分为两个部分&#xff1a;第一部分是使用BeautifulSoup的方法&am…...

19 go语言(golang) - 通过反射手动实现json序列化

一、json 在 Go 语言中&#xff0c;JSON 序列化和反序列化通常通过标准库 encoding/json 来实现。这个包提供了简单易用的接口来将 Go 数据结构转换为 JSON 格式字符串&#xff08;序列化&#xff09;&#xff0c;以及从 JSON 字符串解析出 Go 数据结构&#xff08;反序列化&a…...

Scala:隐式转换

隐式转换的定义 //隐式转换&#xff1a;编译器自动滴&#xff0c;偷偷滴&#xff0c;把数据A->B object test04 {def main(args: Array[String]): Unit {val i:Int1//把Int类型&#xff0c;转化成Double类型//Int -> Double//隐式转换失败val b:Double1//隐式转换失败v…...