Upgrade to 11.0 failed due to Devise::OmniAuth::StrategyNotFound (Bitbucket)
Summary
During upgrade from 10.8.4 to 11.0.0, GitLab (omnibus install) failed to boot.
While upgrading via apt
, final reconfigure
command failed.
Devise::OmniAuth::StrategyNotFound: Could not find a strategy with name `Bitbucket'. Please ensure it is required or explicitly set it using the :strategy_class option.
Steps to reproduce
- Install 10.8.4
- Configure Bitbucket integration (in gitlab.rb)
- Upgrade to 11.0.0
What is the current bug behavior?
Upgrade errors out. GitLab is restarted, but fails to boot (neverending unfamous 502).
apt
upgrade produced the following error:
Running handlers:
There was an error running gitlab-ctl reconfigure:
Multiple failures occurred:
* Mixlib::ShellOut::ShellCommandFailed occurred in chef run: bash[migrate gitlab-rails database] (gitlab::database_migrations line 49) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of "bash" "/tmp/chef-script20180622-20227-hpigvl" ----
STDOUT: rake aborted!
Devise::OmniAuth::StrategyNotFound: Could not find a strategy with name `Bitbucket'. Please ensure it is required or explicitly set it using the :strategy_class option.
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:db:configure => environment
(See full trace by running task with --trace)
STDERR:
---- End output of "bash" "/tmp/chef-script20180622-20227-hpigvl" ----
Ran "bash" "/tmp/chef-script20180622-20227-hpigvl" returned 1
* Mixlib::ShellOut::ShellCommandFailed occurred in delayed notification: execute[clear the gitlab-rails cache] (gitlab::gitlab-rails line 412) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /opt/gitlab/bin/gitlab-rake cache:clear ----
STDOUT:
STDERR: rake aborted!
Devise::OmniAuth::StrategyNotFound: Could not find a strategy with name `Bitbucket'. Please ensure it is required or explicitly set it using the :strategy_class option.
/opt/gitlab/embedded/service/gitlab-rails/config/environment.rb:11:in `<top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => cache:clear => cache:clear:redis => environment
(See full trace by running task with --trace)
---- End output of /opt/gitlab/bin/gitlab-rake cache:clear ----
Ran /opt/gitlab/bin/gitlab-rake cache:clear returned 1
Additionally Sentry logged the following error (see below).
What is the expected correct behavior?
Working Bitbucket integration.
Relevant logs and/or screenshots
https://sentry.io/share/issue/2413a8afe984414f8eeedc9a1348c6b3/
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Debian 9.4 Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.17.1 Sidekiq Version:5.1.3 Go Version: unknownGitLab information Version: 11.0.0-ee Revision: d97d9e4 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://gitlab..eu HTTP Clone URL: https://gitlab..eu/some-group/some-project.git SSH Clone URL: git@git..eu:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: no
GitLab Shell Version: 7.1.4 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 7.1.4 ? ... OK (7.1.4) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 2/1 ... ok 17/2 ... ok 17/8 ... ok 2/18 ... ok 2/19 ... ok 2/20 ... ok 2/21 ... ok 2/22 ... ok 2/23 ... ok 2/24 ... ok 15/26 ... ok 15/27 ... ok 15/28 ... ok 15/29 ... ok 15/30 ... ok 2/31 ... ok 2/32 ... ok 14/33 ... ok 14/34 ... ok 24/35 ... ok 24/36 ... ok 2/37 ... ok 2/38 ... ok 2/39 ... ok 4/40 ... ok 3/42 ... ok 2/43 ... ok 17/44 ... ok 17/45 ... ok 19/47 ... ok 3/48 ... ok 4/49 ... ok 27/50 ... ok 4/51 ... ok 3/52 ... ok 29/53 ... ok 2/54 ... ok 2/55 ... ok 2/56 ... ok 2/57 ... ok 2/58 ... ok 2/59 ... ok 4/60 ... ok 4/61 ... ok 4/62 ... ok 32/63 ... ok 32/64 ... ok 3/65 ... ok 3/66 ... repository is empty 2/67 ... ok 2/68 ... ok 2/69 ... ok 29/71 ... ok 15/72 ... ok 15/73 ... ok 15/74 ... ok 24/75 ... ok 15/76 ... ok 3/77 ... repository is empty 2/78 ... ok 32/79 ... ok 29/80 ... repository is empty 3/81 ... ok 38/82 ... ok 2/83 ... ok 38/84 ... ok 2/85 ... ok 39/86 ... ok 39/87 ... ok 39/88 ... ok 40/89 ... ok 3/90 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/1 ... yes 17/2 ... yes 17/8 ... yes 2/18 ... yes 2/19 ... yes 2/20 ... yes 2/21 ... yes 2/22 ... yes 2/23 ... yes 2/24 ... yes 15/26 ... yes 15/27 ... yes 15/28 ... yes 15/29 ... yes 15/30 ... yes 2/31 ... yes 2/32 ... yes 14/33 ... yes 14/34 ... yes 24/35 ... yes 24/36 ... yes 2/37 ... yes 2/38 ... yes 2/39 ... yes 4/40 ... yes 3/42 ... yes 2/43 ... yes 17/44 ... yes 17/45 ... yes 19/47 ... yes 3/48 ... yes 4/49 ... yes 27/50 ... yes 4/51 ... yes 3/52 ... yes 29/53 ... yes 2/54 ... yes 2/55 ... yes 2/56 ... yes 2/57 ... yes 2/58 ... yes 2/59 ... yes 4/60 ... yes 4/61 ... yes 4/62 ... yes 32/63 ... yes 32/64 ... yes 3/65 ... yes 3/66 ... yes 2/67 ... yes 2/68 ... yes 2/69 ... yes 29/71 ... yes 15/72 ... yes 15/73 ... yes 15/74 ... yes 24/75 ... yes 15/76 ... yes 3/77 ... yes 2/78 ... yes 32/79 ... yes 29/80 ... yes 3/81 ... yes 38/82 ... yes 2/83 ... yes 38/84 ... yes 2/85 ... yes 39/86 ... yes 39/87 ... yes 39/88 ... yes 40/89 ... yes 3/90 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 27 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished
Possible fixes
None. Workaround is disabling Bitbucket integration in gitlab.rb
.
This is a blocker for us as we are in the middle of transition from Bitbucket.