Skip to content

add workarounds for Ceph RGW to Swift backend#5224

Merged
ncw merged 1 commit into
rclone:masterfrom
vmpjdc:swift-workarounds
Jun 28, 2024
Merged

add workarounds for Ceph RGW to Swift backend#5224
ncw merged 1 commit into
rclone:masterfrom
vmpjdc:swift-workarounds

Conversation

@vmpjdc

@vmpjdc vmpjdc commented Apr 8, 2021

Copy link
Copy Markdown
Contributor

What is the purpose of this change?

Ceph's Swift API emulation does not fully confirm to the API spec.
As a result, it sometimes returns fewer items in a container than
the requested limit, which according to the spec should means
that there are no more objects left in the container. (Note that
python-swiftclient always fetches unless the current page is empty.)

This commit adds a pair of new Swift backend settings to handle this.

Set fetch_until_empty_page to true to always fetch another
page of the container listing unless there are no items left.

Alternatively, set partial_page_fetch_threshold to an integer
percentage. In this case rclone will fetch a new page only when
the current page is within this percentage of the limit.

Was the change discussed in an issue or in the forum before?

PR against ncw/swift with research and discussion: ncw/swift#167

Swift API reference: https://docs.openstack.org/swift/latest/api/pagination.html

Checklist

  • I have read the contribution guidelines.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • I'm done, this Pull Request is ready for review :-)

@vmpjdc

vmpjdc commented Apr 11, 2021

Copy link
Copy Markdown
Contributor Author

This is related to my open PR ncw/swift#167

@ivandeex

Copy link
Copy Markdown
Member

@ncw @jetpackdanger
The upstream patch was merged 💪
It's time to get this one reviewed/merged

@vmpjdc

vmpjdc commented Oct 18, 2021

Copy link
Copy Markdown
Contributor Author

@ivandeex Yup, thanks! I hope to be able to return to this soon. We've still happily using rclone for our migrations and will be even happier when we don't have to worry about which binary we're using! :)

@vmpjdc vmpjdc force-pushed the swift-workarounds branch 2 times, most recently from 4f52856 to bdacbad Compare October 22, 2021 02:53
@ivandeex ivandeex requested a review from ncw October 22, 2021 08:49
@ivandeex ivandeex marked this pull request as ready for review October 22, 2021 08:49
@ivandeex

Copy link
Copy Markdown
Member

Is this ready for review?

@ivandeex ivandeex added this to the v1.58 milestone Oct 22, 2021
@vmpjdc vmpjdc force-pushed the swift-workarounds branch from bdacbad to a461cce Compare October 26, 2021 04:41
@vmpjdc vmpjdc changed the title [WIP] wire up RADOSGW Swift API workarounds add workarounds for Ceph RGW to Swift backend Oct 26, 2021
@vmpjdc

vmpjdc commented Oct 26, 2021

Copy link
Copy Markdown
Contributor Author

@ivandeex I think it's worth a first look , now that I've written a proper commit message!

I've left two things unchecked because I'm not sure there's a reasonable way test this change, and I wasn't sure if these options were suitable for documenting in fs.RegInfo but I'm happy do so.

@ncw ncw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay on this!

Let's get this merged :-)

It seems to be missing the config definitions but otherwise looks good!

Comment thread backend/swift/swift.go
Comment thread backend/swift/swift.go
@vmpjdc vmpjdc force-pushed the swift-workarounds branch from a461cce to de58d86 Compare December 3, 2021 02:18
@vmpjdc

vmpjdc commented Dec 3, 2021

Copy link
Copy Markdown
Contributor Author

Yikes, I'm really not sure where the last two weeks went! Anyway, I've added the config definitions as requested, and the result of rclone help backend swift in my local build looks OK to me.

@ivandeex ivandeex modified the milestones: v1.58, v1.59 Mar 19, 2022
@buengese

Copy link
Copy Markdown
Member

This has sat stale for a long time know. Is this workaround even still necessary at this point or has this been fixed in radosgw. Maybe you could confirm this @jetpackdanger

@ncw ncw modified the milestones: v1.59, v1.60 Jul 9, 2022
@ncw ncw removed this from the v1.60 milestone Dec 5, 2022
Ceph's Swift API emulation does not fully confirm to the API spec.
As a result, it sometimes returns fewer items in a container than
the requested limit, which according to the spec should means
that there are no more objects left in the container.  (Note that
python-swiftclient always fetches unless the current page is empty.)

This commit adds a pair of new Swift backend settings to handle this.

Set `fetch_until_empty_page` to true to always fetch another
page of the container listing unless there are no items left.

Alternatively, set `partial_page_fetch_threshold` to an integer
percentage.  In this case rclone will fetch a new page only when
the current page is within this percentage of the limit.

Swift API reference: https://docs.openstack.org/swift/latest/api/pagination.html

PR against ncw/swift with research and discussion: ncw/swift#167

Fixes rclone#7924
@ncw

ncw commented Jun 28, 2024

Copy link
Copy Markdown
Member

This fix is still needed!

Sorry I never merged it.

I've rebased it on master and I'll get it merged.

@ncw ncw merged commit bd5799c into rclone:master Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants