awslabs / mountpoint-s3-csi-driver

Built on Mountpoint for Amazon S3, the Mountpoint CSI driver presents an Amazon S3 bucket as a storage volume accessible by containers in your Kubernetes cluster.
Apache License 2.0
153 stars 18 forks source link

Feature Request: Enhanced Rsync Support for S3 CSI Driver #157

Closed psavva closed 3 months ago

psavva commented 4 months ago

Problem Description

When attempting to use rsync for file synchronization between a Kubernetes pod and an AWS S3 bucket mounted via the AWS S3 CSI driver, several challenges arise. The primary issues include rsync performing filesystem operations that are not supported by S3, such as permission setting and atomic renaming. This results in errors like "Operation not permitted" and "Function not implemented," complicating the use of rsync for data synchronization tasks.

Desired Solution

I propose the development of enhanced support for POSIX-like filesystem operations within the S3 service or specifically within the AWS S3 CSI driver to better accommodate file synchronization tools like rsync. The solution could include:

Alternatives Considered

To address these challenges, I have explored:

Additional Context

Seamless integration of rsync with S3 would greatly benefit a wide array of applications, from backup systems to dynamic content management for web services, by simplifying data synchronization processes. Enhancing S3's compatibility with rsync would leverage S3's storage capabilities in distributed systems like Kubernetes, where efficient and reliable data synchronization is a frequent requirement.

jjkr commented 3 months ago

Thank you for the request. The limitations on which posix operations are supported are not in the CSI driver, but mountpoint itself, which are documented here: https://github.com/awslabs/mountpoint-s3/blob/main/doc/SEMANTICS.md. I am going to close this issue and suggest you open a new issue in the mountpoint-s3 repo: https://github.com/awslabs/mountpoint-s3.

While making rsync just work does sound like a great feature, it seems unlikely mountpoint will implement things like permissions because it doesn't align with the tenets in that SEMANTICS doc. There is no close analog in s3 to unix filesystem permissions and it would be a performance hit to emulate them. It might make sense to make this opt in and is worth a discussion, but the mountpoint-s3 repo is the best place to have that discussion.