Error 500 when trying to get any objects in WEB UI using OpenStack Swift as object storage
Summary
I'v configured storing data in object storage (OpenStack Swift) for artifacts and uploads. All data placed in storage, but when I'm trying to obtain any object (job log for example), I have gotten an error 500 in the WebUI.
After any job all logs and artifacts are placed in the bucket, and I can see it and read. But not from WebUI.
Steps to reproduce
- Configuring Object Storage for Artifacts
gitlab_rails['artifacts_object_store_enabled'] = true
gitlab_rails['artifacts_object_store_direct_upload'] = false
gitlab_rails['artifacts_object_store_background_upload'] = true
gitlab_rails['artifacts_object_store_proxy_download'] = false
gitlab_rails['artifacts_object_store_remote_directory'] = "gitlab_artifacts"
gitlab_rails['artifacts_object_store_connection'] = {
'provider' => 'OpenStack',
'openstack_username' => 'username',
'openstack_api_key' => 'password',
'openstack_auth_url' => 'https://api.storage/v2.0/tokens',
'openstack_tenant' => 'tenant_name'
}
- Do gitlab reconfigure
gitlab-ctl reconfigure - Do migrate
gitlab-rake gitlab:artifacts:migrate - Go to any job and try to see job log or artifacts
What is the current bug behavior?
An error occurred while fetching the error log
What is the expected correct behavior?
Job log
Relevant logs and/or screenshots
/var/log/gitlab/gitlab-rails/production.log
ArgumentError (Storage must be instantiated with the :openstack_temp_url_key option):
config/initializers/carrierwave_patch.rb:20:in `authenticated_url'
app/uploaders/gitlab_uploader.rb:89:in `open'
app/models/ci/job_artifact.rb:79:in `open'
lib/gitlab/metrics/instrumentation.rb:159:in `block in open'
lib/gitlab/metrics/method_call.rb:34:in `measure'
lib/gitlab/metrics/instrumentation.rb:159:in `open'
lib/gitlab/ci/trace.rb:70:in `block in read'
lib/gitlab/ci/trace/stream.rb:20:in `initialize'
lib/gitlab/ci/trace.rb:68:in `new'
lib/gitlab/ci/trace.rb:68:in `read'
app/controllers/projects/jobs_controller.rb:73:in `trace'
lib/gitlab/i18n.rb:55:in `with_locale'
lib/gitlab/i18n.rb:61:in `with_user_locale'
app/controllers/application_controller.rb:427:in `set_locale'
lib/gitlab/middleware/multipart.rb:101:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
ee/lib/gitlab/jira/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:17:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/rails_queue_duration.rb:22:in `call'
lib/gitlab/metrics/rack_middleware.rb:15:in `block in call'
lib/gitlab/metrics/transaction.rb:53:in `run'
lib/gitlab/metrics/rack_middleware.rb:15:in `call'
lib/gitlab/middleware/read_only/controller.rb:40:in `call'
lib/gitlab/middleware/read_only.rb:16:in `call'
lib/gitlab/middleware/basic_health_check.rb:25:in `call'
lib/gitlab/request_context.rb:20:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
lib/gitlab/middleware/release_env.rb:10:in `call'
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.4.5p335 Gem Version: 2.7.6 Bundler Version:1.16.6 Rake Version: 12.3.1 Redis Version: 3.2.12 Git Version: 2.18.1 Sidekiq Version:5.2.1 Go Version: unknown
GitLab information Version: 11.5.2-ee Revision: 6a05a82 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://vcs.torbor.ru HTTP Clone URL: https://vcs.torbor.ru/some-group/some-project.git SSH Clone URL: git@vcs.torbor.ru:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers:
GitLab Shell Version: 8.4.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
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 8.4.1 ? ... OK (8.4.1) hooks directories in repos are links: ... 8/1 ... ok 8/2 ... ok 8/3 ... ok 8/4 ... ok 8/5 ... ok 8/6 ... ok 8/7 ... ok 8/8 ... ok 8/9 ... ok 8/10 ... ok 8/11 ... ok 8/12 ... ok 8/13 ... ok 7/14 ... ok 7/15 ... ok 7/16 ... ok 24/30 ... ok 10/32 ... ok 10/33 ... ok 10/34 ... ok 10/35 ... ok 10/36 ... ok 10/37 ... ok 10/38 ... ok 10/39 ... ok 10/40 ... ok 10/41 ... ok 10/42 ... ok 10/43 ... ok 10/44 ... ok 10/45 ... ok 10/46 ... ok 11/47 ... ok 11/48 ... ok 11/49 ... ok 11/50 ... ok 7/51 ... ok 15/56 ... ok 15/57 ... ok 16/59 ... ok 7/61 ... ok 7/62 ... repository is empty 19/63 ... ok 19/64 ... ok 19/65 ... ok 19/66 ... ok 19/67 ... ok 20/68 ... ok 10/69 ... ok 20/70 ... ok 5/72 ... ok 24/73 ... ok 24/76 ... ok 5/77 ... 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 Gitaly ...
default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml 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: ... 8/1 ... yes 8/2 ... yes 8/3 ... yes 8/4 ... yes 8/5 ... yes 8/6 ... yes 8/7 ... yes 8/8 ... yes 8/9 ... yes 8/10 ... yes 8/11 ... yes 8/12 ... yes 8/13 ... yes 7/14 ... yes 7/15 ... yes 7/16 ... yes 24/30 ... yes 10/32 ... yes 10/33 ... yes 10/34 ... yes 10/35 ... yes 10/36 ... yes 10/37 ... yes 10/38 ... yes 10/39 ... yes 10/40 ... yes 10/41 ... yes 10/42 ... yes 10/43 ... yes 10/44 ... yes 10/45 ... yes 10/46 ... yes 11/47 ... yes 11/48 ... yes 11/49 ... yes 11/50 ... yes 7/51 ... yes 15/56 ... yes 15/57 ... yes 16/59 ... yes 7/61 ... yes 7/62 ... yes 19/63 ... yes 19/64 ... yes 19/65 ... yes 19/66 ... yes 19/67 ... yes 20/68 ... yes 10/69 ... yes 20/70 ... yes 5/72 ... yes 24/73 ... yes 24/76 ... yes 5/77 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.5) Git version >= 2.9.5 ? ... yes (2.18.1) Git user has default SSH configuration? ... yes Active users: ... 5 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished