11.3 Migrations Failing Because Replication Slots Not Supported in Aurora
Summary
Background migration job that runs on upgrade to 11.3 hangs
Steps to reproduce
Have this configuration:
GitLab EE Omnibus 11.2 aurora-postgresql9.6 (hosted in RDS, of course)
Upgrade to 11.3.1
Example Project
(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)
What is the current bug behavior?
The job, BackgroundMigrationWorker, stops iterating through artifacts. It logs messages like the following:
ActiveRecord::StatementInvalid: PG::FeatureNotSupported: ERROR: Replication slots are currently not supported in Aurora : SELECT pg_xlog_location_diff(pg_current_xlog_insert_location(), restart_lsn)::...
In the sidekiq UI, the job remains in the "busy" list permanently.
What is the expected correct behavior?
The job, BackgroundMigrationWorker, completes its work and ceases to run.
Relevant logs and/or screenshots
ActiveRecord::StatementInvalid: PG::FeatureNotSupported: ERROR: Replication slots are currently not supported in Aurora : SELECT pg_xlog_location_diff(pg_current_xlog_insert_location(), restart_lsn)::...
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
GitLab information Version: 11.3.1-ee Revision: d82e035 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.8 URL: https://my.host.com HTTP Clone URL: https://my.host.com/some-group/some-project.git SSH Clone URL: git@my.host.com:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: yes Using Omniauth: no
GitLab Shell Version: 8.3.3 Repository storage paths:
- default: /gitlab-data/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
(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)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)