当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
439 Star 1.5K Fork 1.8K

GVPopenGauss/openGauss-server
暂停

 / 详情

opengass3.1.0升级opengass5.0.0,升级失败【zyzx]

已验收
缺陷
创建于  
2023-06-13 17:44

【标题描述】:opengass3.1.0升级opengass5.0.0,灰度升级失败
问题描述
openGass 3.1.0升级5.0.0,执行灰度升级,执行如下命令:
gs_upgradectl -t auto-upgrade -X /home/omm/cluster_config.xml --grey
预见报错信息如下:
function dolphin_attname_cq(name,name) dose not exist
报错信息截图

【数据库版本】(查询命令: gaussdb -V):3.1.0 数据库版本

【操作步骤】(请填写详细的操作步骤):

  1. 下载openGass 5.0.0企业版安装包,centos操作系统
  2. 安装包解压,并运行gs_preinstall命令
    3、执行gs_upgradectl -t auto-upgrade -X /home/omm/cluster_config.xml --grey
    4、出现上述报错

评论 (4)

zgr 创建了缺陷 2年前
jiexiao1413 负责人设置为周斌 2年前
jiexiao1413 关联项目设置为openGauss 5.1.0 community 2年前
jiexiao1413 优先级设置为主要 2年前
周斌 添加协作者周斌 2年前
周斌 负责人周斌 修改为zhengxue 2年前
周斌 添加协作者zhangxubo 2年前
zhangxubo 负责人zhengxue 修改为未设置 2年前
zhangxubo 负责人设置为pengjiong 2年前
pengjiong 任务状态待办的 修改为修复中 2年前
pengjiong 任务状态修复中 修改为待办的 2年前
pengjiong 通过合并 Pull Request !868: 修复3.1.0升级到5.0.0失败的问题(未完全修复)任务状态待办的 修改为已完成 2年前
pengjiong 任务状态已完成 修改为待办的 2年前
pengjiong 组织设置为3.1.0升级问题,需要改3.1.0的代码才行 2年前
周斌 取消协作者周斌 2年前
pengjiong 组织3.1.0升级问题,需要改3.1.0的代码才行 修改为未设置 2年前
pengjiong 添加协作者吴岳川 2年前
吴岳川 组织未设置 修改为插件升级问题,待找小军评审方案 2年前
吴岳川 计划开始日期设置为2023-07-15 2年前
吴岳川 计划截止日期设置为2023-07-15 2年前
Will 取消协作者zhangxubo 2年前
pengjiong 组织插件升级问题,待找小军评审方案 修改为未设置 2年前
pengjiong 修改了备注 2年前
pengjiong 任务状态待办的 修改为修复中 2年前
pengjiong 修改了备注 2年前
pengjiong 通过合并 Pull Request !940: 修复3.1.0升级/回滚5.0.1失败的问题任务状态修复中 修改为已完成 2年前

已回归
输入图片说明
输入图片说明

灰度升级:

[2023-08-04 11:18:50 INFO UpgradeScene 19 23305] 开始执行: su - upgrade_0804 <<EOF
source /home/upgrade_0804/gaussdb.bashrc && gs_upgradectl -t auto-upgrade -X /opt/upgrade_0804/0804/pkg/upgrade_0804.xml --grey
EOF
[2023-08-04 11:22:08 INFO UpgradeScene 19 23305] Success: Static configuration matched with old static configuration files.
Successfully set upgrade_mode to 0.
Checking upgrade environment.
Successfully checked upgrade environment.
Start to do health check.
Successfully checked cluster status.
Upgrade all nodes.
NOTICE: The directory /data/upgrade_0804/cluster/app_4e931f9a will be deleted after commit-upgrade, please make sure there is no personal data.
Performing grey rollback.
No need to rollback.
The directory /data/upgrade_0804/cluster/app_4e931f9a will be deleted after commit-upgrade, please make sure there is no personal data.
Installing new binary.
copy certs from /data/upgrade_0804/cluster/app_4e931f9a to /data/upgrade_0804/cluster/app_a07d57c3.
Successfully copy certs from /data/upgrade_0804/cluster/app_4e931f9a to /data/upgrade_0804/cluster/app_a07d57c3.
Successfully backup hotpatch config file.
Sync cluster configuration.
Successfully synced cluster configuration.
Switch symbolic link to new binary directory.
Successfully switch symbolic link to new binary directory.
Start check CMS parameter.
Switching all db processes.
Check cluster state.
Cluster state: [   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

    node           node_ip         port      instance     state
-------------------------------------------------------------------------------
1  kwepwebenv06293 xx.xx.xx.xx   50804      6001       P Primary Normal
2  kwepwebenv07953 xx.xx.xx.xx    50804      6002       S Standby Normal
3  kwepwebenv07954 xx.xx.xx.xx  50804      6003       S Standby Normal
Create checkpoint before switching.
Start to wait for om_monitor.
Switching DN processes.
Ready to grey start cluster.
Grey start cluster successfully.
Wait for the cluster status normal or degrade.
Successfully switch all process version
The nodes ['kwepwebenv06293', 'kwepwebenv07953', 'kwepwebenv07954'] have been successfully upgraded to new version. Then do health check.
Start to do health check.
Successfully checked cluster status.
Waiting for the cluster status to become normal.
.
The cluster status is normal.
Upgrade main process has been finished, user can do some check now.
Once the check done, please execute following command to commit upgrade:

    gs_upgradectl -t commit-upgrade -X /opt/upgrade_0804/0804/pkg/upgrade_0804.xml

Successfully upgrade all nodes.
Last login: Fri Aug  4 11:18:48 CST 2023

[2023-08-04 11:22:08 INFO UpgradeScene 19 23305] 升级后验证
[2023-08-04 11:22:08 INFO UpgradeScene 19 23305] 1.版本验证
[2023-08-04 11:22:08 INFO UpgradeScene 19 23305] 开始执行: su - upgrade_0804 <<EOF
source /home/upgrade_0804/gaussdb.bashrc
gs_ssh -c "gsql -V"
EOF
[2023-08-04 11:22:11 INFO UpgradeScene 19 23305] Success: Successfully execute command on all nodes.

Output:
[SUCCESS] kwepwebenv06293:
gsql (openGauss 5.0.0 build a07d57c3) compiled at 2023-03-29 03:07:56 commit 0 last mr
[SUCCESS] kwepwebenv07953:
gsql (openGauss 5.0.0 build a07d57c3) compiled at 2023-03-29 03:07:56 commit 0 last mr
[SUCCESS] kwepwebenv07954:
gsql (openGauss 5.0.0 build a07d57c3) compiled at 2023-03-29 03:07:56 commit 0 last mr


回滚成功:

[2023-08-04 10:19:30 INFO UpgradeScene 19 18604] 开始回滚
[2023-08-04 10:19:30 INFO UpgradeScene 19 18604] 升级版本回滚
[2023-08-04 10:19:30 INFO UpgradeScene 19 18604] 开始执行: su - upgrade_0804 <<EOF
source /home/upgrade_0804/gaussdb.bashrc
gs_upgradectl -t auto-rollback -X /opt/upgrade_0804/0804/pkg/upgrade_0804.xml
EOF
[2023-08-04 10:21:05 INFO UpgradeScene 19 18604] Success: Static configuration matched with old static configuration files.
Performing grey rollback.
Start roll back CM instance.
Switch symbolic link to old binary directory.
Successfully switch symbolic link to old binary directory.
Successfully rollback hotpatch config file.
Switching all db processes.
Check cluster state.
Cluster state: [   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

    node           node_ip         port      instance     state
-------------------------------------------------------------------------------
1  kwepwebenv06293 xx.xx.xx.xx   50804      6001       P Primary Normal
2  kwepwebenv07953 xx.xx.xx.xx   50804      6002       S Standby Normal
3  kwepwebenv07954 xx.xx.xx.xx  50804      6003       S Standby Normal
Create checkpoint before switching.
Start to wait for om_monitor.
Switching DN processes.
Switch DN processes for rolling upgrade.
Ready to grey start cluster.
Grey start cluster successfully.
Wait for the cluster status normal or degrade.
Successfully switch all process version
Rollbacking catalog.
Successfully Rollbacked catalog.
Successfully cleaned new install path.
Rollback succeeded.
Last login: Fri Aug  4 10:19:28 CST 2023

[2023-08-04 10:21:05 INFO UpgradeScene 19 18604] 开始执行: su - upgrade_0804 -c "source /home/upgrade_0804/gaussdb.bashrc; gaussdb -V"
[2023-08-04 10:21:05 INFO UpgradeScene 19 18604] Success: gaussdb (openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr

强制回滚:

Last login: Fri Aug  4 12:16:53 CST 2023

[2023-08-04 12:17:01 INFO UpgradeScene 19 19751] 开始回滚
[2023-08-04 12:17:01 INFO UpgradeScene 19 19751] 升级版本回滚
[2023-08-04 12:17:01 INFO UpgradeScene 19 19751] 开始执行: su - upgrade_0804 <<EOF
source /home/upgrade_0804/gaussdb.bashrc
gs_upgradectl -t auto-rollback -X /opt/upgrade_0804/0804/pkg/upgrade_0804.xml --force
EOF
[2023-08-04 12:18:32 INFO UpgradeScene 19 19751] Success: Static configuration matched with old static configuration files.
Performing grey rollback.
Start roll back CM instance.
Switch symbolic link to old binary directory.
Successfully switch symbolic link to old binary directory.
Successfully rollback hotpatch config file.
Switching all db processes.
Check cluster state.
Cluster state: [   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

    node           node_ip         port      instance     state
-------------------------------------------------------------------------------
1  kwepwebenv06293 10.247.86.215   50804      6001       P Primary Normal
2  kwepwebenv07953 10.243.201.23   50804      6002       S Standby Normal
3  kwepwebenv07954 10.116.244.207  50804      6003       S Standby Normal
Create checkpoint before switching.
Start to wait for om_monitor.
Switching DN processes.
Switch DN processes for rolling upgrade.
Ready to grey start cluster.
Grey start cluster successfully.
Wait for the cluster status normal or degrade.
Successfully switch all process version
Rollbacking catalog.
Successfully Rollbacked catalog.
Successfully cleaned new install path.
Rollback succeeded.
Last login: Fri Aug  4 12:16:59 CST 2023

[2023-08-04 12:18:32 INFO UpgradeScene 19 19751] 开始执行: su - upgrade_0804 -c "source /home/upgrade_0804/gaussdb.bashrc; gaussdb -V"
[2023-08-04 12:18:32 INFO UpgradeScene 19 19751] Success: gaussdb (openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr

升级前:

[2023-08-08 16:33:44 INFO InstallDb 19 10121] 获取数据库版本信息
[2023-08-08 16:33:44 INFO InstallDb 19 10121] 开始执行: su - upgrade_0808 -c "source /home/upgrade_0808/gaussdb.bashrc;         gsql -d postgres -p 50808 -c \"select version();\""|
        awk 'NR==3'
[2023-08-08 16:33:44 INFO InstallDb 19 10121] Success:  (openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr   on x86_64-unknown-linux-gnu, compiled by g++ (GCC) 7.3.0, 64-bit

[2023-08-08 16:33:46 INFO UpgradeScene 19 10121] 验证B库dolphin插件可用
[2023-08-08 16:33:48 INFO UpgradeScene 19 10121] List of installed extensions
      Name       | Version |   Schema   |                   Description
-----------------+---------+------------+--------------------------------------------------
 dist_fdw        | 1.0     | pg_catalog | foreign-data wrapper for distfs access
 dolphin         | 1.0     | public     | sql engine
 file_fdw        | 1.0     | pg_catalog | foreign-data wrapper for flat file access
 hstore          | 1.1     | pg_catalog | data type for storing sets of (key, value) pairs
 log_fdw         | 1.0     | pg_catalog | Foreign Data Wrapper for accessing logging data
 mot_fdw         | 1.0     | pg_catalog | foreign-data wrapper for MOT access
 plpgsql         | 1.0     | pg_catalog | PL/pgSQL procedural language
 security_plugin | 1.0     | pg_catalog | provides security functionality
(8 rows)

升级:

[2023-08-08 16:46:14 INFO UpgradeScene 19 10121] 开始执行: su - upgrade_0808 <<EOF
source /home/upgrade_0808/gaussdb.bashrc && gs_upgradectl -t auto-upgrade -X /opt/upgrade_0808/0808/pkg/upgrade_0808.xml --grey
EOF
[2023-08-08 16:49:41 INFO UpgradeScene 19 10121] Success: Static configuration matched with old static configuration files.
Successfully set upgrade_mode to 0.
Checking upgrade environment.
Successfully checked upgrade environment.
Start to do health check.
Successfully checked cluster status.
Upgrade all nodes.
NOTICE: The directory /data/upgrade_0808/cluster/app_4e931f9a will be deleted after commit-upgrade, please make sure there is no personal data.
Performing grey rollback.
No need to rollback.
The directory /data/upgrade_0808/cluster/app_4e931f9a will be deleted after commit-upgrade, please make sure there is no personal data.
Installing new binary.
copy certs from /data/upgrade_0808/cluster/app_4e931f9a to /data/upgrade_0808/cluster/app_31025cde.
Successfully copy certs from /data/upgrade_0808/cluster/app_4e931f9a to /data/upgrade_0808/cluster/app_31025cde.
Successfully backup hotpatch config file.
Sync cluster configuration.
Successfully synced cluster configuration.
Switch symbolic link to new binary directory.
Successfully switch symbolic link to new binary directory.
Start check CMS parameter.
Switching all db processes.
Check cluster state.
Cluster state: [   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

    node           node_ip         port      instance     state
-------------------------------------------------------------------------------
1  kwepwebenv06293 xx.xx.xx.xx   50808      6001       P Primary Normal
2  kwepwebenv07953 xx.xx.xx.xx   50808      6002       S Standby Normal
3  kwepwebenv07954 xx.xx.xx.xx  50808      6003       S Standby Normal
Create checkpoint before switching.
Start to wait for om_monitor.
Switching DN processes.
Ready to grey start cluster.
Grey start cluster successfully.
Wait for the cluster status normal or degrade.
Successfully switch all process version
The nodes ['kwepwebenv06293', 'kwepwebenv07953', 'kwepwebenv07954'] have been successfully upgraded to new version. Then do health check.
Start to do health check.
Successfully checked cluster status.
Waiting for the cluster status to become normal.
.
The cluster status is normal.
Upgrade main process has been finished, user can do some check now.
Once the check done, please execute following command to commit upgrade:

    gs_upgradectl -t commit-upgrade -X /opt/upgrade_0808/0808/pkg/upgrade_0808.xml

Successfully upgrade all nodes.
Last login: Tue Aug  8 16:46:12 CST 2023

升级后的dolphin

[2023-08-08 17:38:34 INFO UpgradeScene 19 10121] 升级vs直接安装对比:B库dolphin插件

输入图片说明

回滚:

[2023-08-08 16:49:50 INFO UpgradeScene 19 10121] 开始回滚
[2023-08-08 16:49:50 INFO UpgradeScene 19 10121] 升级版本回滚
[2023-08-08 16:49:50 INFO UpgradeScene 19 10121] 开始执行: su - upgrade_0808 <<EOF
source /home/upgrade_0808/gaussdb.bashrc
gs_upgradectl -t auto-rollback -X /opt/upgrade_0808/0808/pkg/upgrade_0808.xml
EOF
[2023-08-08 16:51:26 INFO UpgradeScene 19 10121] Success: Static configuration matched with old static configuration files.
Performing grey rollback.
Start roll back CM instance.
Switch symbolic link to old binary directory.
Successfully switch symbolic link to old binary directory.
Successfully rollback hotpatch config file.
Switching all db processes.
Check cluster state.
Cluster state: [   Cluster State   ]

cluster_state   : Normal
redistributing  : No
current_az      : AZ_ALL

[  Datanode State   ]

    node           node_ip         port      instance     state
-------------------------------------------------------------------------------
1  kwepwebenv06293 xx.xx.xx.xx   50808      6001       P Primary Normal
2  kwepwebenv07953 xx.xx.xx.xx   50808      6002       S Standby Normal
3  kwepwebenv07954 xx.xx.xx.xx  50808      6003       S Standby Normal
Create checkpoint before switching.
Start to wait for om_monitor.
Switching DN processes.
Switch DN processes for rolling upgrade.
Ready to grey start cluster.
Grey start cluster successfully.
Wait for the cluster status normal or degrade.
Successfully switch all process version
Rollbacking catalog.
Successfully Rollbacked catalog.
Successfully cleaned new install path.
Rollback succeeded.
Last login: Tue Aug  8 16:49:48 CST 2023

[2023-08-08 16:51:26 INFO UpgradeScene 19 10121] 开始执行: su - upgrade_0808 -c "source /home/upgrade_0808/gaussdb.bashrc; gaussdb -V"
[2023-08-08 16:51:26 INFO UpgradeScene 19 10121] Success: gaussdb (openGauss 3.1.0 build 4e931f9a) compiled at 2022-09-29 14:19:24 commit 0 last mr

[2023-08-08 16:51:26 INFO UpgradeScene 19 10121] 验证B库dolphin插件可用
[2023-08-08 16:51:28 INFO UpgradeScene 19 10121] List of installed extensions
      Name       | Version |   Schema   |                   Description
-----------------+---------+------------+--------------------------------------------------
 dist_fdw        | 1.0     | pg_catalog | foreign-data wrapper for distfs access
 dolphin         | 1.0     | public     | sql engine
 file_fdw        | 1.0     | pg_catalog | foreign-data wrapper for flat file access
 hstore          | 1.1     | pg_catalog | data type for storing sets of (key, value) pairs
 log_fdw         | 1.0     | pg_catalog | Foreign Data Wrapper for accessing logging data
 mot_fdw         | 1.0     | pg_catalog | foreign-data wrapper for MOT access
 plpgsql         | 1.0     | pg_catalog | PL/pgSQL procedural language
 security_plugin | 1.0     | pg_catalog | provides security functionality
(8 rows)

pengjiong 任务状态已完成 修改为已验收 2年前
周斌 修改了标题 1年前
周斌 修改了描述 1年前

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
5622128 opengauss bot 1581905080 li-xin12345-li-xin12345 zgr-candy_zgr 吴岳川-wuyuechuan
C++
1
https://gitee.com/opengauss/openGauss-server.git
git@gitee.com:opengauss/openGauss-server.git
opengauss
openGauss-server
openGauss-server

搜索帮助