mountpoint-s3-csi-driver: Cannot write when using `allow-other` MP option
/kind bug
What happened? Unable to write. Currently testing with AWS IAM role that has all s3 action permissions on the bucket being used by the EKS Mountpoint S3 addon.
/datas3_us/live/pg-manager/pg_wal/spilo/****-*****10140$ tar -czvf archive_name.tar.gz 13edd11c-7e37-4b11-b54d-c8308013957d/
13edd11c-7e37-4b11-b54d-c8308013957d/
13edd11c-7e37-4b11-b54d-c8308013957d/wal/
13edd11c-7e37-4b11-b54d-c8308013957d/wal/11/
13edd11c-7e37-4b11-b54d-c8308013957d/wal/11/basebackups_005/
13edd11c-7e37-4b11-b54d-c8308013957d/wal/11/basebackups_005/base_00000001000000000000000D_00000040/
13edd11c-7e37-4b11-b54d-c8308013957d/wal/11/basebackups_005/base_00000001000000000000000D_00000040/extended_version.txt
13edd11c-7e37-4b11-b54d-c8308013957d/wal/11/basebackups_005/base_00000001000000000000000D_00000040/tar_partitions/
13edd11c-7e37-4b11-b54d-c8308013957d/wal/11/basebackups_005/base_00000001000000000000000D_00000040/tar_partitions/part_00000000.tar.lzo
gzip: stdout: Input/output error
tar: archive_name.tar.gz: Cannot write: Broken pipe
tar: Child returned status 1
tar: Error is not recoverable: exiting now
What you expected to happen? Zip a large directory recursively to a zip file within the S3 bucket. How to reproduce it (as minimally and precisely as possible)? see above Anything else we need to know?:
apiVersion: v1
kind: PersistentVolume
metadata:
name: s3-eks-us-pv
namespace: ****
spec:
capacity:
storage: 1200Gi
accessModes:
- ReadWriteMany
mountOptions:
- allow-delete
- allow-other
- region us-east-1
- uid=1000
- gid=1000
csi:
driver: s3.csi.aws.com
volumeHandle: eks-logging-****-volume
volumeAttributes:
bucketName: eks-logging-****
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: s3-eks-us-pvc
namespace: ****
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 1200Gi
volumeName: s3-eks-us-pv
Environment
- Kubernetes version (use
kubectl version):Server Version: version.Info{Major:"1", Minor:"25+", GitVersion:"v1.25.16-eks-8cb36c9", GitCommit:"3a3ea80e673d7867f47bdfbccd4ece7cb5f4a83a", GitTreeState:"clean", BuildDate:"2023-11-22T21:53:22Z", GoVersion:"go1.20.10", Compiler:"gc", Platform:"linux/amd64"} - Driver version:
v1.2.0-eksbuild.1
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (6 by maintainers)
Turns out my issue is the S3 bucket that I create is used a self-managed KMS for encrytion and the SA used by the S3 CSI driver has no access to the KMS. after grant access to the SA, I can read/write to the bucket.
We were able to get this working for our use-case by adjusting the jenkins agent to run as uid=0, gid=0 and removing the flags for
--allow-otheranduid,gid. Working PV config:I did not close the issue as we believe there is still a bug with
--allow-other. However, we’ve managed a workaround so you’re welcome to close.