↑日記で日々積み重ねた情報をトップの「わんこのページ」にまとめています。

わんこ日記 [RDF] YouTubeも始めました→


2019-10-25(Fri) [GitLab] GitLab 12.4のupgradeで失敗 [長年日記]

GitLabは、OmnibusパッケージのDocker imageにしてから、upgradeに失敗することは無かったのだけど、12.4に上げたら

itlab-ce_1 | * bash[migrate gitlab-rails database] action run

gitlab-ce_1 | [execute] rake aborted!

gitlab-ce_1 | StandardError: An error has occurred, all later migrations canceled:

gitlab-ce_1 |

gitlab-ce_1 | Multiple indexes found on ci_trigger_requests columns [:trigger_id]. Specify an index name from ci_trigger_requests_trigger_id_idx, fk_rails_b8ec8b7245, index_ci_trigger_requests_on_trigger_id

gitlab-ce_1 | /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:121:in `block in remove_concurrent_index'

で再起動を繰り返していた。

どうも「12.2.5 -> 12.3.1 Database migration failed: Multiple indexes found (#33084) · Issues · GitLab.org / GitLabの現象に近そうなので、インデックスを削除したらうまく行った。

$ docker-compose exec gitlab-ce bash

oot@gitlab-ce:/# gitlab-psql

psql (10.9)

Type "help" for help.

gitlabhq_production=# /d ci_trigger_requests

Table "public.ci_trigger_requests"

Column | Type | Collation | Nullable | Default

------------+--------------------------+-----------+----------+-------------------------------------------------

id | integer | | not null | nextval('ci_trigger_requests_id_seq'::regclass)

trigger_id | integer | | not null |

variables | text | | |

created_at | timestamp with time zone | | |

updated_at | timestamp with time zone | | |

commit_id | integer | | |

Indexes:

"ci_trigger_requests_pkey" PRIMARY KEY, btree (id)

"ci_trigger_requests_trigger_id_idx" btree (trigger_id)

"fk_rails_b8ec8b7245" btree (trigger_id)

"index_ci_trigger_requests_on_commit_id" btree (commit_id)

"index_ci_trigger_requests_on_trigger_id" btree (trigger_id)

"index_ci_trigger_requests_on_trigger_id_and_id" btree (trigger_id, id DESC)

Foreign-key constraints:

"fk_rails_b8ec8b7245" FOREIGN KEY (trigger_id) REFERENCES ci_triggers(id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED

gitlabhq_production=# drop index ci_trigger_requests_trigger_id_idx;

DROP INDEX

gitlabhq_production=# drop index index_ci_trigger_requests_on_trigger_id;

DROP INDEX

MySQLから無理くりPostgreSQLにデータをコンバートした弊害か?

本日のPingbacks(全0件)

Google Web検索 on-o.com内を検索