sameersbn / sameersbn/docker-gitlab
[Fixed] Upgrade from 14.3.0 to 14.10.0 fails with background migration error
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 8.1k
- Forks
- 2.1k
- Avg merge
- 17h 47m
- Merged PRs (30d)
- 7
Description
This is an FYI issue just in case someone has the same problem. It's similar to #2409 but with an upgrade from 14.3.0 to 14.10.0.
The error message was:
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:Expected batched background migration for the given configuration to be marked as 'finished', but it is 'active':#011{:job_class_name=>"ProjectNamespaces::BackfillProjectNamespaces", :table_name=>:projects, :col
umn_name=>:id, :job_arguments=>[nil, "up"]}Finalize it manualy by running
#011sudo gitlab-rake gitlab:background_migrations:finalize[ProjectNamespaces::BackfillProjectNamespaces,projects,id,'[null,"up"]']
For more information, check the documentation
To apply the suggested fix (using docker-compose where I have a gitlab container):
- Stop the container
- Run
docker-compose run --rm gitlab app:rake gitlab:background_migrations:finalize[ProjectNamespaces::BackfillProjectNamespaces,projects,id,'[null\,"up"]']
That fixed it for me. The command may be a little different but can be copied from the error message.
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
No repository file or test is identified. Start with the 14.3.0-to-14.10.0 upgrade path and the linked background-migration documentation, then inspect how docker-compose invokes the GitLab rake task. Done would require a reproducible upgrade fix or documented handling that avoids the manual finalize command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, shell
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100