sameersbn / sameersbn/docker-gitlab
Migration Failed in 9.1.0-1
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
We are moving into the latest release of gitlab version 9.1.0-1. During migration we are experienced with DataBase Migration issue. The detailed log is given below,
2017-04-26T18:45:20.814520000Z Configuring nginx::gitlab...
2017-04-26T18:45:20.844647000Z Configuring nginx::gitlab::ssl...
2017-04-26T18:45:20.874463000Z Configuring nginx::gitlab::hsts...
2017-04-26T18:45:20.894269000Z Configuring nginx::gitlab-pages...
2017-04-26T18:45:20.990357000Z Migrating database...
2017-04-26T18:45:36.797448000Z Missing Rails.application.secrets.jws_private_key for production environment. The secret will be generated and stored in config/secrets.yml.
2017-04-26T18:45:37.846065000Z rake aborted!
2017-04-26T18:45:37.846623000Z StandardError: An error has occurred, all later migrations canceled:
2017-04-26T18:45:37.847381000Z Mysql2::Error: Duplicate column name 'coverage_regex': ALTER TABLE ci_builds ADD coverage_regex varchar(255)/home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in query'
2017-04-26T18:45:37.847757000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in block in execute'
2017-04-26T18:45:37.848124000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in block in log'
2017-04-26T18:45:37.848526000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in instrument'
2017-04-26T18:45:37.848904000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in log'
2017-04-26T18:45:37.849268000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in execute'
2017-04-26T18:45:37.849654000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in execute'
2017-04-26T18:45:37.850015000Z /home/git/gitlab/config/initializers/connection_fix.rb:20:in execute'
2017-04-26T18:45:37.850469000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:407:in add_column'
2017-04-26T18:45:37.850796000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in block in method_missing'
2017-04-26T18:45:37.851111000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in block in say_with_time'
2017-04-26T18:45:37.851449000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in say_with_time'
2017-04-26T18:45:37.851755000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in method_missing'
2017-04-26T18:45:37.852056000Z /home/git/gitlab/db/migrate/20161114024742_add_coverage_regex_to_builds.rb:11:in change'
2017-04-26T18:45:37.852407000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:608:in exec_migration'
2017-04-26T18:45:37.852734000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in block (2 levels) in migrate'
2017-04-26T18:45:37.853040000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in block in migrate'
2017-04-26T18:45:37.853365000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in with_connection'
2017-04-26T18:45:37.853687000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in migrate'
2017-04-26T18:45:37.854010000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in migrate'
2017-04-26T18:45:37.854342000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in block in execute_migration_in_transaction'
2017-04-26T18:45:37.854665000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in ddl_transaction'
2017-04-26T18:45:37.854986000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in execute_migration_in_transaction'
2017-04-26T18:45:37.855318000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in block in migrate'
2017-04-26T18:45:37.855644000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in each'
2017-04-26T18:45:37.855954000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in migrate'
2017-04-26T18:45:37.856274000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in up'
2017-04-26T18:45:37.856609000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in migrate'
2017-04-26T18:45:37.856915000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/tasks/database_tasks.rb:137:in migrate'
2017-04-26T18:45:37.857224000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in block (2 levels) in <top (required)>'
2017-04-26T18:45:37.857538000Z ActiveRecord::StatementInvalid: Mysql2::Error: Duplicate column name 'coverage_regex': ALTER TABLE ci_builds ADD coverage_regex varchar(255)
2017-04-26T18:45:37.857858000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in query'
2017-04-26T18:45:37.858180000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in block in execute'
2017-04-26T18:45:37.858503000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in block in log'
2017-04-26T18:45:37.858806000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in instrument'
2017-04-26T18:45:37.859229000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in log'
2017-04-26T18:45:37.859746000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in execute'
2017-04-26T18:45:37.860207000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in execute'
2017-04-26T18:45:37.860533000Z /home/git/gitlab/config/initializers/connection_fix.rb:20:in execute'
2017-04-26T18:45:37.860837000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:407:in add_column'
2017-04-26T18:45:37.861139000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in block in method_missing'
2017-04-26T18:45:37.861458000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in block in say_with_time'
2017-04-26T18:45:37.861763000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in say_with_time'
2017-04-26T18:45:37.862066000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in method_missing'
2017-04-26T18:45:37.862377000Z /home/git/gitlab/db/migrate/20161114024742_add_coverage_regex_to_builds.rb:11:in change'
2017-04-26T18:45:37.862681000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:608:in exec_migration'
2017-04-26T18:45:37.862985000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in block (2 levels) in migrate'
2017-04-26T18:45:37.863286000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in block in migrate'
2017-04-26T18:45:37.863607000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in with_connection'
2017-04-26T18:45:37.863915000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in migrate'
2017-04-26T18:45:37.864216000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in migrate'
2017-04-26T18:45:37.864533000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in block in execute_migration_in_transaction'
2017-04-26T18:45:37.864836000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in ddl_transaction'
2017-04-26T18:45:37.865138000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in execute_migration_in_transaction'
2017-04-26T18:45:37.865450000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in block in migrate'
2017-04-26T18:45:37.865755000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in each'
2017-04-26T18:45:37.866056000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in migrate'
2017-04-26T18:45:37.866564000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in up'
2017-04-26T18:45:37.866853000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in migrate'
2017-04-26T18:45:37.867132000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/tasks/database_tasks.rb:137:in migrate'
2017-04-26T18:45:37.867424000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in block (2 levels) in <top (required)>'
2017-04-26T18:45:37.867704000Z Mysql2::Error: Duplicate column name 'coverage_regex'
2017-04-26T18:45:37.868073000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in query'
2017-04-26T18:45:37.868533000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in block in execute'
2017-04-26T18:45:37.868980000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:484:in block in log'
2017-04-26T18:45:37.869278000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications/instrumenter.rb:20:in instrument'
2017-04-26T18:45:37.869571000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_adapter.rb:478:in log'
2017-04-26T18:45:37.869854000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:309:in execute'
2017-04-26T18:45:37.870133000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/mysql2_adapter.rb:225:in execute'
2017-04-26T18:45:37.870426000Z /home/git/gitlab/config/initializers/connection_fix.rb:20:in execute'
2017-04-26T18:45:37.870708000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:407:in add_column'
2017-04-26T18:45:37.870988000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:665:in block in method_missing'
2017-04-26T18:45:37.871265000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in block in say_with_time'
2017-04-26T18:45:37.871563000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:634:in say_with_time'
2017-04-26T18:45:37.871847000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:654:in method_missing'
2017-04-26T18:45:37.872127000Z /home/git/gitlab/db/migrate/20161114024742_add_coverage_regex_to_builds.rb:11:in change'
2017-04-26T18:45:37.872418000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:608:in exec_migration'
2017-04-26T18:45:37.872706000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:592:in block (2 levels) in migrate'
2017-04-26T18:45:37.872987000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:591:in block in migrate'
2017-04-26T18:45:37.873270000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:in with_connection'
2017-04-26T18:45:37.873559000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:590:in migrate'
2017-04-26T18:45:37.873842000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:768:in migrate'
2017-04-26T18:45:37.874124000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:998:in block in execute_migration_in_transaction'
2017-04-26T18:45:37.874414000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:1046:in ddl_transaction'
2017-04-26T18:45:37.874699000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:997:in execute_migration_in_transaction'
2017-04-26T18:45:37.874978000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:959:in block in migrate'
2017-04-26T18:45:37.875256000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in each'
2017-04-26T18:45:37.875543000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:955:in migrate'
2017-04-26T18:45:37.875823000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:823:in up'
2017-04-26T18:45:37.876105000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/migration.rb:801:in migrate'
2017-04-26T18:45:37.876395000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/tasks/database_tasks.rb:137:in migrate'
2017-04-26T18:45:37.876675000Z /home/git/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/railties/databases.rake:44:in block (2 levels) in <top (required)>'
2017-04-26T18:45:37.876956000Z Tasks: TOP => db:migrate
2017-04-26T18:45:37.877234000Z (See full trace by running task with --trace)
Couldn't proceed further. Kindly help me to overcome this issue. Your suggestions are highly appreciated.
Thanks,
Kaleeswaran
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with db/migrate/20161114024742_add_coverage_regex_to_builds.rb and config/initializers/connection_fix.rb, then inspect the MySQL migration state for ci_builds. Reproduce the 9.1.0-1 upgrade and determine why coverage_regex already exists. Done means the migration completes without the duplicate-column failure and the upgrade proceeds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, mysql, rails, ruby
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100