container sync breaks DLO manifests referring to the same container

Bug #1613681 reported by Stefan Majewsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Confirmed
Wishlist
Unassigned

Bug Description

A follow-up to https://bugs.launchpad.net/swift/+bug/1613316.

Suppose that you have two containers, e.g. "source" and "target", connected by a container-sync relation. Also suppose that the source container contains a DLO which refers to segments in the same container, e.g. "X-Object-Manifest: source/segments".

This DLO will be synced to the target container, but the manifest will still refer to the old container name, thus probably producing a broken object on the receiving side. The more plausible behavior would be for the container sync to recognize that the segments are in the same container, and rewrite the X-Object-Manifest header to refer to the target container when the DLO is created on the target side.

Revision history for this message
Alistair Coles (alistair-coles) wrote :

There is a note here [1] that segments must be sync'd as well as manifests, but it could be clearer that the source and target container names must be the same.

I have improved the container sync docs here [2]

[1] http://docs.openstack.org/developer/swift/overview_container_sync.html
[2] https://review.openstack.org/356012

Revision history for this message
Alistair Coles (alistair-coles) wrote :

I would suggest that the proposed server behaviour is undesirable. Yes, there may be use cases where the end-result is as proposed, and they may be the common cases. But there may also be use cases where the intention is that the synced manifest in the target container continues to point to segments in the source container. It would be dangerous to assume the intent of the user and start re-writing user-generated metadata when syncing objects.

Although it is not a *great* experience, I am inclined to think that it's best to educate the user as to what to expect from container sync through better documentation.

Changed in swift:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/356012
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=cc2b2cf9c8a5cb913817e2f900c676809cd2e027
Submitter: Jenkins
Branch: master

commit cc2b2cf9c8a5cb913817e2f900c676809cd2e027
Author: Alistair Coles <email address hidden>
Date: Tue Aug 16 16:21:59 2016 +0100

    Improve doc for using container-sync with large objects

    Clarify that synced segment container names must be the same
    when syncing large objects.

    Also add multipart-menifest query string option to API ref
    for object GETs.

    Change-Id: Ib2d2a1e6c1e5eff215fc75c2b49e7d6758b17b7e
    Partial-Bug: #1613681
    Closes-Bug: #1613316

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/hummingbird)

Fix proposed to branch: feature/hummingbird
Review: https://review.openstack.org/363111

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (feature/hummingbird)
Download full text (84.1 KiB)

Reviewed: https://review.openstack.org/363111
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=1ab2a296f58ae76aeffef9f3f0fb90e15358be27
Submitter: Jenkins
Branch: feature/hummingbird

commit 3b5850836c59c46f2507a7f62aceccf4c37e5d41
Author: gecong1973 <email address hidden>
Date: Tue Aug 30 15:08:49 2016 +0800

    Remove white space between print and ()

    There is a white space between print and ()
    in /tempauth.py, This patch fix it

    Change-Id: Id3493bdef12223aa3a2bffc200db8710f5949101

commit f88e7fc0da2ed6a63e0ea3c3459d80772b3068cd
Author: zheng yin <email address hidden>
Date: Mon Aug 29 20:21:44 2016 +0800

    Clarify test case in common/ring/test_builder

    They use a bare assertRaises(ValueError, ring.RingBuilder, *,*,*), but
    it's not clear which one raises which ValueError(), so I extend them to
    validate the error strings as well.

    Change-Id: I63280a9fc47ff678fe143e635046a0b402fd4506

commit d68b1bd6ddf44c5088e9d02dcb2f1b802c71411b
Author: zhufl <email address hidden>
Date: Mon Aug 29 14:31:27 2016 +0800

    Remove unnecessary tearDown

    This is to remove unnecessary tearDown to keep code clean.

    Change-Id: Ie70e40d6b55f379b0cc9bc372a35705462cade8b

commit d2fc2614575b04fd9cab5ae589880b92eee9b186
Author: Matthew Oliver <email address hidden>
Date: Fri Aug 19 16:17:31 2016 +1000

    Authorise versioned write PUTs before copy

    Currently a versioned write PUT uses a pre-authed request to move
    it into the versioned container before checking whether the
    user is authorised. This can lead to some interesting behaviour
    whereby a user can select a versioned object path that it does not
    have access to, request a put on that versioned object, and this
    request will execute the copy part of the request before it fails
    due to lack of permissions.

    This patch changes the behaviour to be the same as versioned DELETE
    where the request is authorised before anything is moved.

    Change-Id: Ia8b92251718d10b1eb44a456f28d3d2569a30003
    Closes-Bug: #1562175

commit c1ef6539b6ba9d2e4354c9cd2eec8a0195cdb19f
Author: Clay Gerrard <email address hidden>
Date: Thu Aug 25 11:00:49 2016 -0700

    add test for expirer processes == process

    This is a follow up from a change that improved the error message.

    Related-Change: I3d12b79470d122b2114f9ee486b15d381f290f95

    Change-Id: I093801f3516a60b298c13e2aa026c11c68a63792

commit 01477c78c1163822de41484e914a0736e622085b
Author: zheng yin <email address hidden>
Date: Thu Aug 25 15:37:42 2016 +0800

    Fix ValueError information in obj/expirer

    I fix error information in raise ValueError(...)
    For example:
        if a>=b:
            # It should be under below and not 'a must be less than or equal to b'
            raise ValueError('a must be less than b')

    Change-Id: I3d12b79470d122b2114f9ee486b15d381f290f95

commit b81f53b964fdb8f3b50dd369ce2e194ee4dbb0b7
Author: zheng yin <email address hidden>
Date: Tue Aug 23 14:26:47 2016 +0800

    Improve readability in the obj server's unit tests

    This change improves the reada...

tags: added: in-feature-hummingbird
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.