Issue #1492
closedmigration fails when /v1 directory already exists
Description
Halting migrations due to a migration failure.
Destination path '/var/lib/pulp/published/docker/v1/export' already exists
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 125, in main
return _auto_manage_db(options)
File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 185, in _auto_manage_db
migrate_database(options)
File "/usr/lib/python2.7/site-packages/pulp/server/db/manage.py", line 98, in migrate_database
update_current_version=not options.test)
File "/usr/lib/python2.7/site-packages/pulp/server/db/migrate/models.py", line 161, in apply_migration
migration.migrate()
File "/usr/lib/python2.7/site-packages/pulp_docker/plugins/migrations/0001_v2_support.py", line 27, in migrate
shutil.move(folder, NEW_DOCKER_V1_PUBLISH_PATH)
File "/usr/lib64/python2.7/shutil.py", line 291, in move
raise Error, "Destination path '%s' already exists" % real_dst
Error: Destination path '/var/lib/pulp/published/docker/v1/export' already exists
I would expect some if os.path.exists before the actual move. That could make migration to be runable more than once.
Updated by rbarlow about 8 years ago
- Target Release - Docker set to 2.0.0
I have experienced this several times. I can't say for certain that a user would hit it, but I've hit it during times that I didn't expect to, including during my Rawhide development. For that reason, I think it would be wise to just fix it before 2.0.0, especially since it is an easy fix.
Updated by ipanova@redhat.com about 8 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to ipanova@redhat.com
Added by ipanova@redhat.com about 8 years ago
Added by ipanova@redhat.com about 8 years ago
Revision 9ab1c65a | View on GitHub
1492 - migration fails when /v1 directory already exists
Added by ipanova@redhat.com about 8 years ago
Revision 9ab1c65a | View on GitHub
1492 - migration fails when /v1 directory already exists
Added by ipanova@redhat.com about 8 years ago
Revision 9ab1c65a | View on GitHub
1492 - migration fails when /v1 directory already exists
Updated by ipanova@redhat.com about 8 years ago
- Status changed from ASSIGNED to POST
Updated by ipanova@redhat.com about 8 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset 9ab1c65ae195d7641ec25379b46edad8b00e07a5.
Updated by dkliban@redhat.com about 8 years ago
- Status changed from MODIFIED to 5
Updated by semyers almost 8 years ago
- Status changed from 5 to CLOSED - CURRENTRELEASE
1492 - migration fails when /v1 directory already exists
closes #1492 https://pulp.plan.io/issues/1492