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

rgw: fix SLO/DLO range requests #15060

Merged
merged 1 commit into from Jun 21, 2017

Conversation

Projects
None yet
3 participants
@shashalu
Contributor

shashalu commented May 12, 2017

Sending any SLO/DLO range requests will retrun InvalidRange error. SLO/DLO should call range_to_ofs after got object size instead of read_op.prepare().

Signed-off-by: Shasha Lu lu.shasha@eisoo.com

@shashalu

This comment has been minimized.

Contributor

shashalu commented May 16, 2017

@cbodley hi, could you review this for me? Thanks

@cbodley

This comment has been minimized.

Contributor

cbodley commented May 16, 2017

@shashalu would you be willing to add some functional tests for this to https://github.com/ceph/swift/?

@cbodley cbodley added the needs-test label May 16, 2017

@shashalu

This comment has been minimized.

Contributor

shashalu commented May 27, 2017

@cbodley there is already a function testRangedGets. But I'm not clear how to run these tests.

@cbodley

This comment has been minimized.

Contributor

cbodley commented May 30, 2017

@shashalu testRangedGets doesn't test against slo/dlo objects

here's how i run the functional tests using a vstart cluster:

~/ceph/build $ OSD=1 MON=1 RGW=1 MDS=0 MGR=0 ../src/vstart.sh -n -d

modify the sample config file at ~/swift/test/functional/sample.conf to point at radosgw port 8000:

sed 's/8080/8000/' sample.conf > rgw.conf

run the subset of tests that pass against rgw:

~/swift/test/functional $ SWIFT_TEST_CONFIG_FILE=rgw.conf nosetests -v -a '!fails_on_rgw'

@shashalu

This comment has been minimized.

Contributor

shashalu commented May 31, 2017

@cbodley Thanks, i'll try that.

@shashalu

This comment has been minimized.

Contributor

shashalu commented Jun 19, 2017

@cbodley add functional tests for this ceph/swift#3

if (r < 0) {
return r;
}

This comment has been minimized.

@cbodley

cbodley Jun 20, 2017

Contributor

looks like this block needs to go above the if (!get_data) { block (which is for HEAD requests that just want the total_len)

This comment has been minimized.

@shashalu

shashalu Jun 21, 2017

Contributor

yes, i'll revise this

r = iterate_user_manifest_parts(s->cct, store, ofs, end,
pbucket_info, obj_prefix, bucket_acl, *bucket_policy,
&total_len, nullptr, nullptr,
nullptr, nullptr);

This comment has been minimized.

@cbodley

cbodley Jun 20, 2017

Contributor

this extra call to iterate_user_manifest_parts() is needed to support negative offsets?

This comment has been minimized.

@shashalu

shashalu Jun 21, 2017

Contributor

yes. For negative offsets we should get the slo/dlo obj_size first. Then fix the range.
The first iterate_user_manifest_parts() get object's objsize. Then fix the negative ranges.
The second iterate_user_manifest_parts() get total_len
The third iterate_user_manifest_parts() read data.

rgw: fix SLO/DLO range requests
Sending any SLO/DLO range requests will retrun InvalidRange error. SLO/DLO should call range_to_ofs after got object size instead of read_op.prepare() to deal with negative offsets.

Signed-off-by: Shasha Lu <lu.shasha@eisoo.com>

@cbodley cbodley merged commit 81f85d7 into ceph:master Jun 21, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
arm64 make check arm64 make check succeeded
Details
make check make check succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment