-
Notifications
You must be signed in to change notification settings - Fork 20
Home
Juri Boxberger edited this page Mar 18, 2022
·
9 revisions
Welcome to the synology-gitlab wiki!
# https://docs.gitlab.com/ee/security/reset_root_password.html
sudo docker exec -it synology_gitlab bash -c "sudo -u git -H bundle exec rails console -e production"
user = User.where(id: 1).first
# or
user = User.find_by(email: 'admin@local.host')
user.password = 'secret_pass'
user.password_confirmation = 'secret_pass'
user.save!
Log Entry: Multiple indexes found on releases columns [:project_id]. Specify an index name from index_releases_on_project_id, releases_project_id_idx
I found a "solution" on gitlab.com:
https://gitlab.com/gitlab-org/gitlab/issues/33084
Fix
Looking at db/schema.rb neither of the two (project_id) indexes is needed anymore. Running DROP INDEX index_releases_on_project_id; to drop one of the two (project_id) indexes makes the migration succeed and continue (successfully) with all remaining migrations.
Steps:
1) Open the GitLab console via ssh:
sudo /usr/local/bin/docker exec --user = postgres -it synology_gitlab_postgresql bash -c "psql -d gitlab"
2) Remove index:
\d snippets
DROP INDEX index_snippets_on_project_id;
Thanks to: @FoxD7 and @Michael Tosch
sudo docker exec -it synology_gitlab bash -c "sudo /home/git/gitlab/bin/rails dbconsole -e production"
password is in your environment vars (default: gitlab_pass):
sudo docker exec -it synology_gitlab bash -c "sudo -u git -H bundle exec rails console -e production"
sudo -u git -H RAILS_ENV=production ./bin/rake gitlab:check
# or
sudo -HEu git RAILS_ENV=production bundle exec rake gitlab:check
#Manual from Synology Docker App:
#Docker App => Terminal => Create => bash
sudo -u postgres psql -d gitlab
ALTER TABLE users ADD COLUMN IF NOT EXISTS ghost BOOLEAN;
\q
# or
sudo /usr/local/bin/docker exec --user=postgres -it synology_gitlab_postgresql bash -c "psql -d gitlab -c 'ALTER TABLE users ADD COLUMN IF NOT EXISTS ghost BOOLEAN'"
# 1. Connect to Synology via SSH (putty)
# 2. Get administrator rights:
sudo -i
# 3. Establish access to the Postgres database:
sudo /usr/local/bin/docker exec --user=postgres -it synology_gitlab_postgresql bash -c "psql -d gitlab"
# 4. Fix for update to 12.3 or higher (see https://gitlab.com/gitlab-org/gitlab/-/issues/33084):
\d snippets
DROP INDEX index_snippets_on_project_id;
# 5. Fix for update to 12.7 or higher (see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/31043):
\d ci_pipelines
DROP INDEX index_ci_pipelines_on_project_id;
DROP INDEX ci_pipelines_project_id_idx;