gitlab 12.x.x 버전 설치 시 database migration 오류

gitlab을 버전 업그레이드 하는데 database migration에서 문제가 생겼다. 설치가 잘 진행되나 싶었는데 migration 오류를 뿜어내며 설치가 중단 됐다.

구글링으로 여러 방법을 써봤는데 제대로 설치되는 경우가 없었다. 결국 migration은 포기하고 깔끔하게 지우고 새로 설치하는 것으로 방향을 틀었다.

Remove Gitlab

$ sudo gitlab-ctl stop
$ sudo apt-get purge gitlab-ce
$ sudo rm -rf /etc/gitlab/
$ sudo rm -rf /var/opt/gitlab/
$ sudo rm -rf /opt/gitlab/

위와 같이 지워주고 다음 명령으로 gitlab 관련 프로세스가 실행중인지 확인한다.

$ sudo ps -aux | grep "gitlab"

gitlab 관련 프로세스가 모두 정리된 걸 확인하고 새로 설치한다.

$ sudo apt-get install gitlab-ce

gitlab reconfigure 오류 해결

설치 완료 후 reconfigure를 하려는데 여러가지 문제가 다시 발생했다. 새로운 ssh 터미널을 띄우고 다음 명령을 실행해준다.

/opt/gitlab/embedded/bin/runsvdir-start

그리고 아래 명령을 수행한다.

touch /opt/gitlab/embedded/etc/90-omnibus-gitlab-kernel.sem.conf
touch /opt/gitlab/embedded/etc/90-omnibus-gitlab-net.core.somaxconn.conf

이렇게 한 후 reconfigure를 진행하면 정상적으로 완료된다.

참고

Leave a Reply