[Debian12] girlab-ce (16.11.2-ce.0 )から (17.0.0-ce.0) へのアップグレード時のsidekiqエラー対応

Debian

gitlab-ce が稼働しているサーバーで sudo apt update ; sudo apt -y upgrade を実行した際、gitlab-ce のアップグレードでコケたのでその対策を記事にしてみました。 

以下がエラー内容。
sidekiq という文言にヒントがありそうです。

* sidekiq['max_concurrency'] has been deprecated since 16.9 and was removed in 17.0. Starting with GitLab 17.0, `sidekiq['max_concurrency']` will be removed. Please follow https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#manage-thread-counts-explicitly to use `sidekiq['concurrency']` instead.
Deprecations found. Please correct them and try again.
dpkg: アーカイブ /var/cache/apt/archives/gitlab-ce_17.0.0-ce.0_amd64.deb の処理中にエラーが発生しました (--unpack):
 new gitlab-ce package pre-installation script subprocess returned error exit status 1
処理中にエラーが発生しました:
 /var/cache/apt/archives/gitlab-ce_17.0.0-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 Please follow https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#manage-thread-counts-explicitly to use `sidekiq[‘concurrency’]` instead. とあるのでhttps://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#manage-thread-counts-explicitly を見てみます。

min_concurrencyとmax_concurrencyの設定はGitLab 16.9で廃止され、17.0で削除される予定です。代わりにconcurrencyを使用してください。
とのことなので早速、/etc/gitlab/gitlab.rb の sidekiq[‘max_concurrency’]を確認してみます。

sudo nano /etc/gitlab/gitlab.rb

修正前のsidekiq[‘max_concurrency’]は以下の通りです。
この部分を修正します。

修正前 sidekiq[‘max_concurrency’]
sidekiq['max_concurrency'] = 10
# sidekiq['min_concurrency'] = nil

以下のように修正します。

修正後 sidekiq[‘max_concurrency’]
# sidekiq['max_concurrency'] = 10
# sidekiq['min_concurrency'] = nil
sidekiq['concurrency'] = 10

10の部分は各々の値に合わせていただければと思います。

修正後、sudo gitlab-ctl reconfigure を実行します。

sudo gitlab-ctl reconfigure

再度、sudo apt update ; sudo apt -y upgrade を実行します。

sudo apt update ; sudo apt -y upgrade

無事、gitlab-ce のアップグレードを完了できました。

参考にさせていただいたサイトhttps://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#manage-thread-counts-explicitly

タイトルとURLをコピーしました