]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
Fix bucket versioning vs. swift metadata bug. 29240/head
authorMarcus Watts <mwatts@redhat.com>
Wed, 24 Jul 2019 00:43:38 +0000 (20:43 -0400)
committerMarcus Watts <mwatts@redhat.com>
Wed, 24 Jul 2019 00:43:38 +0000 (20:43 -0400)
commit70d5e211a3ce97daf4f62f9b57958899e7b65f01
tree91bc52e7fd7ec6c03dd1e366853fb0bcba7a34d6
parent221d976e3c21e0d99c82f3d808b7bd1f7e5a406d
Fix bucket versioning vs. swift metadata bug.

When a bucket and object was "versioned", it was not possible to set swift
metadata on an existing object.  In swift, it is possible to post metadata
(stored as extended attributes with specific names) on objects without
bumping the version on a versioned object.  In ceph, objects in versioned
buckets *may* be versioned.  Versioned objects have a "olh" (object logical
header) header which points to the versioned header which contains or points
to the current actual data for the object.  Pre-existing logic here correctly
sets the attributes for non-versioned objects.  For versioned ojbects it
incorrectly stored those attributes in the olh rather than in the versioned header.

The corrected logic here retains the target object name and stores the
attributes in the correct header for both cases rather than in the olh for
the versioned object.

Fixes: https://tracker.ceph.com/issues/37531
Signed-off-by: Marcus Watts <mwatts@redhat.com>
src/rgw/rgw_op.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h