Actions
Issue #1492
closedmigration fails when /v1 directory already exists
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version - Docker:
master
Platform Release:
Target Release - Docker:
2.0.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix, Pulp 2
Sprint:
Quarter:
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.
Actions
1492 - migration fails when /v1 directory already exists
closes #1492 https://pulp.plan.io/issues/1492