Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10.7to11 升级 #66

Open
ah-kevin opened this issue Jul 12, 2018 · 3 comments
Open

10.7to11 升级 #66

ah-kevin opened this issue Jul 12, 2018 · 3 comments

Comments

@ah-kevin
Copy link

docker 10.7.4 升级到11.0.3好像无法直接升级啊,数据库变了 !!而且数据咋恢复~~~有什么好的办法

@twang2218
Copy link
Owner

升级的问题应该参考官方文档,并且尽量小版本升级,而不是跨很多版本升级。另外,任何升级操作前都应该做好备份,GitLab 官方文档有如何迁移备份的说明。

https://docs.gitlab.com/omnibus/docker/README.html#upgrade-gitlab-to-newer-version
https://docs.gitlab.com/omnibus/update/README.html

@tnextday
Copy link

tnextday commented Aug 3, 2018

我也遇到这个情况了,你看错误提示里面是不是有

PG::NotNullViolation: ERROR:  column "runner_type" contains null values
    : ALTER TABLE "ci_runners" ALTER "runner_type" SET NOT NULL
    /opt/gitlab/embedded/service/gitlab-rails/db/migrate/20180508135515_set_runner_type_not_null.rb:7:in `change'
    /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:52:in `block (3 levels) in <top (required)>'
    /opt/gitlab/embedded/bin/bundle:23:in `load'
    /opt/gitlab/embedded/bin/bundle:23:in `<main>'

我的解决办法是想办法退回到可以运行的版本,然后进入容器

# docker exec -it gitlab bash
# su - gitlab-psql
$ psql -h /var/opt/gitlab/postgresql/ gitlabhq_production
gitlabhq_production=# UPDATE ci_runners SET "runner_type" = 1 WHERE runner_type IS NULL;

强制填充 runner_type

再运行 11.1 就可以了

@flycloudOne
Copy link

小版本升级是没有问题的,屡试不爽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants