8.15.1+ Provider Google not found when uploading backups(ie backups do not work with GCS anymore)
Summary
Uploading backups to Google Cloud Storage is not working anymore after upgrading to 8.15.1+(tested with latest 8.15.2).
This used to work perfectly fine for months.
(Summarize the bug encountered concisely)
Steps to reproduce
Create backup using google cloud storage.
Example config
From gitlab.rb config for the gitlab-ci official docker image.
# Backup Settings
# Send backups to Google Cloud Storage
gitlab_rails['backup_upload_connection'] = {
'provider' => 'Google',
'google_storage_access_key_id' => 'XXXXXXXXXX',
'google_storage_secret_access_key' => 'XXXXXXXXXX'
}
(How one can reproduce the issue - this is very important)
Expected behavior
The backup should be uploaded to GCS.
(What you should see instead)
Actual behavior
There is an error about google being an unknown provider.
(What actually happens)
Relevant logs and/or screenshots
Creating backup archive: 1483110217_2016_12_30_gitlab_backup.tar ... done
Uploading backup archive to remote storage my-bucket ... rake aborted!
ArgumentError: google is not a recognized provider
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/fog-core-1.42.0/lib/fog/core/services_mixin.rb:12:in `new'
/opt/gitlab/embedded/service/gem/ruby/2.3.0/gems/fog-core-1.42.0/lib/fog/storage.rb:27:in `new'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:162:in `connect_to_remote_directory'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:49:in `upload'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:36:in `block in pack'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:19:in `chdir'
/opt/gitlab/embedded/service/gitlab-rails/lib/backup/manager.rb:19:in `pack'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/backup.rake:20:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
Tasks: TOP => gitlab:backup:create
(See full trace by running task with --trace)
Specifically
ArgumentError: google is not a recognized provider
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab application Check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)
(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)
(we will only investigate if the tests are passing)
Results of GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info)
gitlab-rake gitlab:env:info
System information
System:
Current User: git
Using RVM: no
Ruby Version: 2.3.3p222
Gem Version: 2.6.6
Bundler Version:1.13.7
Rake Version: 10.5.0
Sidekiq Version:4.2.7
GitLab information
Version: 8.15.2
Revision: 790035f
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://******.com
HTTP Clone URL: https://******.com/some-group/some-project.git
SSH Clone URL: git@******.com:some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 4.1.1
Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks/
Git: /opt/gitlab/embedded/bin/git
(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)