You are not logged in.

#1 2016-06-02 21:19:41

Zygote
Member
Registered: 2013-01-15
Posts: 77

Gitlab upgrade issues

I've had Gitlab running for quite a few months now and everything has worked great until I was suddenly unable to update the package. I get the following error:

community/gitlab             8.7.0-2             -> 8.8.2-4
......
error: failed to commit transaction (conflicting files)
gitlab-shell: /var/lib/gitlab/.gitconfig exists in filesystem
gitlab-shell: /var/lib/gitlab/.ssh/authorized_keys exists in filesystem
gitlab: /usr/share/webapps/gitlab/config/secrets.yml exists in filesystem
Errors occurred, no packages were upgraded.

I've tried forcing the install but that leaves me with a broken installation. It seems weird having to overwrite secrets.yml and authorized_keys.

Anyone know what the workaround here is?

Cheers!

Last edited by Zygote (2016-06-02 21:20:27)

Offline

#2 2016-06-03 07:57:53

a821
Member
Registered: 2012-10-31
Posts: 381

Re: Gitlab upgrade issues

Did you check the wiki? https://wiki.archlinux.org/index.php/pa … leshooting

This may be a packaging bug though as you think, since those files look user specific, but I can't say because I don't use gitlab sad

Offline

#3 2016-06-03 18:30:15

Zygote
Member
Registered: 2013-01-15
Posts: 77

Re: Gitlab upgrade issues

a821 wrote:

Did you check the wiki? https://wiki.archlinux.org/index.php/pa … leshooting

This may be a packaging bug though as you think, since those files look user specific, but I can't say because I don't use gitlab sad

Yep, I am fully aware of how Pacman handles issues with conflicting files, etc. The problem in this case is that there is seemingly no solution. I suspect there is something wrong with the Gitlab package something the Gitlab wiki page also seems to confirm (Check the notice at the top of the page)

Offline

#4 2016-06-08 08:52:49

Zygote
Member
Registered: 2013-01-15
Posts: 77

Re: Gitlab upgrade issues

So for anyone running into the same issue, here is a rough idea of what I did to make the upgrade work. It was quite the hassle actually.

Firstly, rename the following files (just append .bak or something).

 /var/lib/gitlab/.gitconfig
 /var/lib/gitlab/.ssh/authorized_keys
 /usr/share/webapps/gitlab/config/secrets.yml

Then, update gitlab-shell. This messed up permissions in /usr/share/webapps/gitlab and /usr/share/webapps/gitlab-shell so I had to fix those.

chown -R gitlab:gitlab /usr/share/webapps/gitlab
chown -R gitlab:gitlab /usr/share/webapps/gitlab-shell

Then I upgraded the gitlab package.

At this point you'll have to go through /usr/share/webapps/gitlab and /var/lib/gitlab and fix all the symbolic links that now point to files that do not exist. The files you renamed earlier will have to be put in their new designated locations according to the symlinks. When you're certain all files are present and valid, run the migration

su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.1 exec rake db:migrate RAILS_ENV=production"

Then reload and restart the services.

systemctl daemon-reload
systemctl restart gitlab-unicorn gitlab-sidekiq gitlab-workhorse

At this point, Gitlab should be functional again. Upgrading gitlab-workhorse breaks as well and I havent been able to figure out a workaround yet. I will update this post when I do.

Offline

Board footer

Powered by FluxBB