安装部署
MacOS安装RabbitMQ
API网关部署
Centos安装Chrome浏览器
gitlab
gitlab-cicd
gitlab-runner安装配置
Gitlab-CICD实践篇
gitlab维护
gitlab备份-异地恢复-升级
gitlab从13.10.2升级至14.4.1出现的问题
Let's Encrypt
Let's Encrypt 申请证书
certbot发起web认证请求流程
安装CMDBUILD
vim配置
keepalived
配置样例
wine tips
supervisord
kafka
zookeeper
minio
django
jupyter
supervisor管理的kafka zookeeper集群部署
dnsmasq
apisix
APISIX结合skywalking对各个服务的访问情况进行监控
APISIX通过consul动态发现服务
Grafana Labs
Loki(stack)
etcd
redis
mongodb
mongodb添加仲裁节点
consul
sqlite更新升級
openssl安裝升級
emby
inotify-tools
caddy
caddy规则
ohmyzsh tips
debian-nvidia-container-runtime
openwrt+802.1x+freeradius+casdoor
本文档使用 MrDoc 发布
-
+
首页
gitlab从13.10.2升级至14.4.1出现的问题
# gitlab从13.10.2升级至14.4.1出现的问题 ## 说明 最近gitlab由于安全漏洞CVE-2021-22205需要进行升级,既然都要升级为何不升级至最新版本呢??但是大版本升级一般都需要先升级到一个最接近的子版本,还好gitlab提供了官方升级路径。 ![](/media/202111/2021-11-04_085057_915832.png) 原文点击:[Upgrade Pathes](https://docs.gitlab.com/ee/update/index.html#upgrade-paths "Upgrade Pathes") 按照升级路径我们的升级路线应该是:13.10.2->13.12.12->14.0.11->14.4.1,但是别急,这里有个坑!按照这样的升级路径升级后,`gitlab-ctl reconfigure`会连续报八次错误并且每次都需要执行以下数据库迁移脚本,汇总后需要执行的执行命令如下,看内容都是将int型转换为bigint应该是为了存储更多任务id做准备吧,估计也就大型公司和git仓库服务提供商能用到了: ```shell gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,events,id,'[["id"]\, ["id_convert_to_bigint"]]'] && gitlab-ctl reconfigure gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_builds,id,'[["id"\, "stage_id"]\, ["id_convert_to_bigint"\, "stage_id_convert_to_bigint"]]'] && gitlab-ctl reconfigure gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_job_artifacts,id,'[["id"\, "job_id"]\, ["id_convert_to_bigint"\, "job_id_convert_to_bigint"]]'] && gitlab-ctl reconfigure gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_stages,id,'[["id"]\, ["id_convert_to_bigint"]]'] && gitlab-ctl reconfigure gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,ci_builds_metadata,id,'[["id"]\, ["id_convert_to_bigint"]]'] && gitlab-ctl reconfigure gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,push_event_payloads,event_id,'[["event_id"]\, ["event_id_convert_to_bigint"]]'] && gitlab-ctl reconfigure gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,deployments,id,'[["deployable_id"]\, ["deployable_id_convert_to_bigint"]]'] && gitlab-ctl reconfigure gitlab-rake gitlab:background_migrations:finalize[CopyColumnUsingBackgroundMigrationJob,taggings,id,'[["id"\, "taggable_id"]\, ["id_convert_to_bigint"\, "taggable_id_convert_to_bigint"]]'] && gitlab-ctl reconfigure ``` ## 问题原因 有两套跨版本升级的环境都出现了一样的错误,但是有一个14.2.4的升级没有报错,感觉问题可能出现在14.0.11-14.2.4之间,于是看了下版本升级的介绍(`应该先看这个!!!`)[Version-specific upgrading instructions](https://docs.gitlab.com/ee/update/index.html#version-specific-upgrading-instructions "Version-specific upgrading instructions") ![](/media/202111/2021-11-04_084816_887105.png) 升级介绍里面说明了,如果在升级14.2之前没有升级到14.0.5这个特定的版本,那就至少需要升级到14.1.0,因为数据库迁移脚本不工作,而只有14.0.5和14.1.x才包含这个问题的修复补丁。 ## 总结 以后升级前还是先看[Version-specific upgrading instructions](https://docs.gitlab.com/ee/update/index.html#version-specific-upgrading-instructions "Version-specific upgrading instructions")再看[Upgrade Pathes](https://docs.gitlab.com/ee/update/index.html#upgrade-paths "Upgrade Pathes"),避免踩到类似的坑。毕竟执行八次迁移脚本和reconfigure的时间还是挺久的。
zhangky
2021年11月4日 09:05
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码