Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jewel: rgw: improve support for Swift's object versioning. #10710

Merged
1 commit merged into from Aug 22, 2016

Conversation

rzarzynski
Copy link
Contributor

@rzarzynski rzarzynski added this to the jewel milestone Aug 12, 2016
@rzarzynski
Copy link
Contributor Author

The backport has been tested with the same subset of tests and version of Tempest like the source PR. Results:

$ ./run_tempest.sh -V "`cat ./refstack.txt`"
{3} tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_get_object_using_temp_url [0.047138s] ... ok
{3} tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_put_object_using_temp_url [0.133802s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_2d_way [0.298047s] ... ok
{2} tempest.api.object_storage.test_object_version.ContainerTest.test_versioned_container [1.247077s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_across_containers [0.762872s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_in_same_container [0.217653s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_to_itself [0.114686s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_create_object [0.084597s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_delete_object [0.058768s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_get_object [0.075343s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_get_object_if_different [0.061381s] ... ok
{1} tempest.api.object_storage.test_object_services.ObjectTest.test_object_upload_in_segments [0.434193s] ... ok
{0} tempest.api.object_storage.test_object_expiry.ObjectExpiryTest.test_get_object_after_expiry_time [12.110566s] ... ok

======
Totals
======
Ran: 13 tests in 19.0000 sec.
 - Passed: 13
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 15.6461 sec.

==============
Worker Balance
==============
 - Worker 0 (1 tests) => 0:00:12.110566
 - Worker 1 (9 tests) => 0:00:02.116627
 - Worker 2 (1 tests) => 0:00:01.247077
 - Worker 3 (2 tests) => 0:00:00.182021

@oritwas oritwas self-assigned this Aug 12, 2016
@ghost ghost changed the title jewel, rgw: improve support for Swift's object versioning. jewel: rgw: improve support for Swift's object versioning. Aug 15, 2016
@ghost
Copy link

ghost commented Aug 15, 2016

@rzarzynski could you please update the commit message to explain how the conflicts were resolved ?

commit=c884a5c ; picked_from=$(git show --no-patch --pretty=%b $commit  | perl -ne 'print if(s/.*cherry pick.* from commit (\w+).*/$1/)') ; diff -u --ignore-matching-lines '^[^+-]'   <(git show $picked_from) <(git show $commit)
--- /dev/fd/63  2016-08-15 23:40:57.190765188 +0200
+++ /dev/fd/62  2016-08-15 23:40:57.294765048 +0200
@@ -85,13 +90,11 @@
 +  }
 +
    op_ret = store->create_bucket(*(s->user), s->bucket, zonegroup_id,
--              placement_rule, swift_ver_location,
--              pquota_info, attrs,
+-              placement_rule, swift_ver_location, attrs,
 -              info, pobjv, &ep_objv, creation_time,
 -              pmaster_bucket, true);
 +                                placement_rule, s->bucket_info.swift_ver_location,
-+                                pquota_info, attrs,
-+                                info, pobjv, &ep_objv, creation_time,
++                                attrs, info, pobjv, &ep_objv, creation_time,
 +                                pmaster_bucket, true);
    /* continue if EEXIST and create_bucket will fail below.  this way we can
     * recover from a partial create by retrying it. */
@@ -106,10 +109,11 @@
 +        s->bucket_info.swift_versioning = (! swift_ver_location->empty());
 +      }
 +
-       /* This will also set the quota on the bucket. */
++      /* This will also set the quota on the bucket. */
        op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs,
                                      &s->bucket_info.objv_tracker);
-@@ -2511,6 +2524,18 @@ void RGWPutObj::execute()
+     } while (op_ret == -ECANCELED && tries++ < 20);
+@@ -2414,6 +2428,18 @@ void RGWPutObj::execute()
  
    processor = select_processor(*static_cast(s->obj_ctx), &multipart);
  
@@ -591,11 +595,10 @@
  // vim: ts=8 sw=2 smarttab
  
 +#include 
-+
- #include "include/assert.h"
+ #include 
  
- #include "common/Formatter.h"
-@@ -538,6 +540,33 @@ static void get_rmattrs_from_headers(const req_state * const s,
+ #include "include/assert.h"
+@@ -507,6 +508,33 @@ static void get_rmattrs_from_headers(const req_state * const s,
    }
  }

This patch allows RadosGW to pass the RefStack with an accuracy
to the RFC7230 violation issue which is clearly a Tempest bug.

Fixes: http://tracker.ceph.com/issues/15925
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit 237ad12)

Conflicts:
	src/rgw/rgw_op.cc
          In contrast to master, Jewel doesn't support
          container quota of Swift API. All tracks of this
          feature have been eradicated from the patch.
	src/rgw/rgw_rest_swift.cc
          Jewel doesn't include boost/optional.hpp but has
          boost/utility/in_place_factory.hpp. The conflict
          has been resolved to pull in both headers.
@rzarzynski
Copy link
Contributor Author

@dachary: updated.

ghost pushed a commit that referenced this pull request Aug 16, 2016
…ject versioning.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
ghost pushed a commit that referenced this pull request Aug 17, 2016
…ject versioning.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
@ghost
Copy link

ghost commented Aug 21, 2016

@oritwas is this run of rgw http://tracker.ceph.com/issues/16344#note-27 good enough to merge this pull request ?

@oritwas
Copy link
Member

oritwas commented Aug 22, 2016

yes, the failures are not related

@ghost ghost merged commit 0cd574f into ceph:jewel Aug 22, 2016
ghost pushed a commit that referenced this pull request Aug 22, 2016
…ject versioning.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants