409 exception from glance-replicator for image upload if image already exists

Bug #1030396 reported by Michael Still
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Michael Still

Bug Description

If the master and the slave glance have different permissions, you can end up with a 409 exception at upload. For example:

 - the image is visible to the replication user on the master
 - the image is present on the slave, but not visible to the replication user

The replicator checks for the existance of the image by doing a HEAD on http://server:port/v1/images/uuid and gets a 404 back. It therefore decides the image doesn't exist and that it should be replicated. It does a POST for that URL, and gets a 409 back saying that UUID is already in use.

This should be handled with an informational message describing the problem.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/10476

Changed in glance:
status: New → In Progress
Brian Waldon (bcwaldon)
Changed in glance:
milestone: none → folsom-3
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/10476
Committed: http://github.com/openstack/glance/commit/7335088d896442e961c07e71bbb67ffd98f1f87a
Submitter: Jenkins
Branch: master

commit 7335088d896442e961c07e71bbb67ffd98f1f87a
Author: Michael Still <email address hidden>
Date: Sun Jul 29 10:05:45 2012 +1000

    Handle images which exist but can't be seen.

    If the master and the slave glance have different permissions, you
    can end up with a 409 exception at upload. For example:

     - the image is visible to the replication user on the master
     - the image is present on the slave, but not visible to the
       replication user

    The replicator checks for the existance of the image by doing a HEAD
    on http://server:port/v1/images/uuid and gets a 404 back. It therefore
    decides the image doesn't exist and that it should be replicated. It
    does a POST for that URL, and gets a 409 back saying that UUID is
    already in use.

    Resolves bug 1030396.

    Change-Id: Id5fdb7977692593fd6c2e203f0440d4aa5339d92

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: folsom-3 → 2012.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.