Upgrade from 8.16.5-ce.1 to 8.17.0-ce.0 fails
Hi,
We attempted to upgrade from 8.16.5-ce.1 to 8.17.0-ce.0 on Ubuntu 14.04 and the reconfigure that happens afterwards resulted in errors.
2017-02-27 17:15:48 upgrade gitlab-ce:amd64 8.16.5-ce.1 8.17.0-ce.0
I believe these are the main errors:
PG::DuplicateColumn: ERROR: column "max_pages_size" of relation "application_settings" already exists
: ALTER TABLE "application_settings" ADD "max_pages_size" integer/opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in `add_column'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:152:in `block in add_column_with_default'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:148:in `add_column_with_default'
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20151215132013_add_pages_size_to_application_settings.rb:8:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
ActiveRecord::StatementInvalid: PG::DuplicateColumn: ERROR: column "max_pages_size" of relation "application_settings" already exists
: ALTER TABLE "application_settings" ADD "max_pages_size" integer
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in `add_column'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:152:in `block in add_column_with_default'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:148:in `add_column_with_default'
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20151215132013_add_pages_size_to_application_settings.rb:8:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
PG::DuplicateColumn: ERROR: column "max_pages_size" of relation "application_settings" already exists
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/postgresql_limit_fix.rb:6:in `add_column'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:152:in `block in add_column_with_default'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:148:in `add_column_with_default'
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20151215132013_add_pages_size_to_application_settings.rb:8:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:50:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:22:in `load'
/opt/gitlab/embedded/bin/bundle:22:in `<main>'
But I am attaching the full logfile in case it has more information that is needed. Here is also the content of our /etc/gitlab/gitlab.rb
if that helps in some way.
# The URL through which GitLab will be accessed.
external_url "https://git.<snip>.com/"
# Whether to redirect http to https.
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.key"
# The directory where Git repositories will be stored.
git_data_dir "/var/opt/gitlab/git-data"
# These settings are documented in more detail at
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example#L118
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_host'] = '<snip>'
gitlab_rails['ldap_port'] = 389
gitlab_rails['ldap_uid'] = 'sAMAccountName'
gitlab_rails['ldap_method'] = 'plain' # 'ssl' or 'plain'
gitlab_rails['ldap_bind_dn'] = '<snip>'
gitlab_rails['ldap_password'] = '<snip>'
gitlab_rails['ldap_base'] = '<snip>'
gitlab_rails['ldap_allow_username_or_email_login'] = ' true'
registry_external_url 'https://registry.<snip>.com'
registry_nginx['ssl_certificate'] = '/etc/gitlab/ssl/gitlab.crt'
registry_nginx['ssl_certificate_key'] = '/etc/gitlab/ssl/gitlab.key'
# To change other settings, see:
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#changing-gitlab-yml-settings
prometheus['enable'] = true
I temporarily resolved the issue by downgrading to 8.16.7-ce.0. At that point I tried:
- Upgrading again: failed again in the same way
- Downgrading back to 8.16.7-ce.0, running
gitlab-ctl pg-upgrade
and then upgrading to 8.17.0 again: failed in the same way
For now I am just on 8.16.7-ce.0. Trying to use gitlab while it was 8.17.0 after the failed upgrade almost worked, but some things were clearly broken. For example we could not view merge requests without a 500 error.
Any suggestions on how to cleanly update to 8.17.x?