When we try to update Gitlab-ee rom 11.2.8 to 11.3.0 the following error appears:
Recipe: gitlab::database_migrations
bash[migrate gitlab-rails database] action run
[execute] rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Index column size too large. The maximum column size is 767 bytes.: CREATE INDEX `index_packages_maven_metadata_on_package_id_and_path` ON `packages_maven_metadata` (`package_id`, `path`)
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/connection_fix.rb:20:in `execute'
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/mysql_ignore_postgresql_options.rb:23:in `add_index'
/opt/gitlab/embedded/service/gitlab-rails/config/initializers/mysql_set_length_for_binary_indexes.rb:19:in `add_index'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:69:in `block in add_concurrent_index'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:244:in `disable_statement_timeout'
/opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/database/migration_helpers.rb:68:in `add_concurrent_index'
/opt/gitlab/embedded/service/gitlab-rails/ee/db/migrate/20180720121404_create_packages_maven_metadata.rb:21:in `up'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:52:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Caused by:
ActiveRecord::StatementInvalid: Mysql2::Error: Index column size too large. The maximum column size is 767 bytes.: CREATE INDEX `index_packages_maven_metadata_on_package_id_and_path` ON `packages_maven_metadata` (`package_id`, `path`)
Hi @JoseC
This is MySQL issue and since MySQL is not supported for years the docs are archived, but you could search for the old MySQL docs. What I found for similar issues was
bash[migrate gitlab-rails database] action run
[execute] rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: Index column size too large. The maximum column size is 767 bytes.: CREATE INDEX `index_packages_maven_metadata_on_package_id_and_path` ON `packages_maven_metadata` (`package_id`, `path`)
any procedure to solve the error ?
Can anyone help me ?
For context, that’s a follow-up question from Error upgrade Omnibus GitLab-ee from 10.2.8 where we identified MySQL as the backend, and thought about a path forward to the last MySQL supported version, then going the PostgreSQL data migration route.
Next to the config settings for the large prefix, the database tables need to be migrated as well. Maybe this was a step you skipped before with the DB migrations.
Not sure if that is helpful though, the MySQL database backend seems to be out-of-sync what the package upgrade expects. Maybe an alternative approach can be exporting all groups and projects, and import them into a fresh instance setup of 11.3.x with PostgreSQL as the backend.
Question is, how big is the current setup and what effort is required to “start over” from users, git repos, permissions, config, CI/CD, etc.
It didn’t work. We also had to recover 10.8.7 release, because
project’s files were lost on the upgrade from 10.8.7 to 11.0.0,
Error message: " 500 Whoops, something went wrong on our end."
Gitlab is quite important for our daily work. Currently we have 300 Projects, 50 users and 50 groups.
Considering that our gitlab-ee release (10.x) is too old, if we install latest gitlab-ee release on a new server, Is there any procedure to migrate from gitlab-ee (10.X) release to a latest gitlab-ee release ? ( I read it is not possible )
Considerations:
that migration question goes beyond my knowledge unfortunately. It might be better to directly consult the experts in support or professional services for an analysis and getting the migration done: Migration Services | GitLab
Exporting the projects/groups/etc. can be done, though I am not sure about the later import. That’s something engineers and support can tackle and answer.