500 error when uploading a file in GitLab instance on OpenShift Cluster
Summary
When trying to upload a file to GitLab application, request fails with 500 error.
Steps to reproduce
- Create OpenShift cluster following "OpenShift Cluster Setup" guide
- Install GitLab operator on the cluster
- Try to upload a file
Logs
webservice {"method":"GET","path":"/gitlab-instance-df04072d/Monitoring/-/issues/1/realtime_changes","format":"json","controller":"Projects::IssuesController","action":"realtime_changes","status":200,"time":"2021-04-13T17:47:38.516Z","params":[{"key":"na │
│ webservice *** /var/log/gitlab/production.log *** │
│ webservice Started POST "/gitlab-instance-df04072d/Monitoring/uploads/authorize" for 176.52.99.36 at 2021-04-13 17:47:41 +0000 │
│ webservice Processing by Projects::UploadsController#authorize as JSON │
│ webservice Parameters: {"namespace_id"=>"gitlab-instance-df04072d", "project_id"=>"Monitoring"} │
│ webservice Completed 500 Internal Server Error in 123ms (ActiveRecord: 3.0ms | Elasticsearch: 0.0ms | Allocations: 25677) │
│ webservice │
│ webservice Excon::Error::Socket (getaddrinfo: Name or service not known (SocketError)): │
│ webservice │
│ webservice lib/object_storage/direct_upload.rb:216:in `block in upload_id' │
│ webservice lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize' │
│ webservice lib/object_storage/direct_upload.rb:215:in `upload_id'
Context
The issue was found when investigating GitLab QA failures in https://gitlab.com/gitlab-org/gl-openshift/gitlab-operator/-/merge_requests/114#note_546074134