Project

Profile

Help

Issue #1492

closed

migration fails when /v1 directory already exists

Added by jluza over 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
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 #1

Updated by mhrivnak over 8 years ago

  • Triaged changed from No to Yes
Actions #2

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.

Actions #3

Updated by rbarlow about 8 years ago

  • Description updated (diff)
Actions #4

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

Revision 9ab1c65a | View on GitHub

1492 - migration fails when /v1 directory already exists

closes #1492 https://pulp.plan.io/issues/1492

Added by ipanova@redhat.com about 8 years ago

Revision 9ab1c65a | View on GitHub

1492 - migration fails when /v1 directory already exists

closes #1492 https://pulp.plan.io/issues/1492

Added by ipanova@redhat.com about 8 years ago

Revision 9ab1c65a | View on GitHub

1492 - migration fails when /v1 directory already exists

closes #1492 https://pulp.plan.io/issues/1492

Added by ipanova@redhat.com about 8 years ago

Revision 9ab1c65a | View on GitHub

1492 - migration fails when /v1 directory already exists

closes #1492 https://pulp.plan.io/issues/1492

Actions #5

Updated by ipanova@redhat.com about 8 years ago

  • Status changed from ASSIGNED to POST
Actions #6

Updated by ipanova@redhat.com about 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #7

Updated by dkliban@redhat.com about 8 years ago

  • Status changed from MODIFIED to 5
Actions #8

Updated by semyers almost 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #9

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF