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
151 stars 18 forks source link

Bad file descriptor #183

Closed Kamukage3e closed 1 month ago

Kamukage3e commented 2 months ago

/kind bug

What happened? I have app that uses websocket connection and records session concurrently with writing session recordings to s3 bucket via mountpoint s3 csi driver. when happening reconnect websocket connection it shows error " bad file descriptor cannot open the file" from s3 bucket. My app will attempt open that file and update continuously session recordings old created file even websocket reconnect. video type is h.264 It worked only in yandex csi s3 driver image

What you expected to happen? Need to add continuously old created file.
How to reproduce it (as minimally and precisely as possible)? I will help by my side to reproduce it on my own server Anything else we need to know?:

Environment

arsh commented 2 months ago

Hello @Kamukage3e.

Is you application attempting to append to an existing file? If yes, that is not supported by Mountpoint. For reference, here is a link to the writing semantics supported by Mountpoint[1].

If you need further help, can you provide the Mountpoint logs? To get the logs, below are some instructions.

# first find uid for a particular customer pod
$ CUSTOMER_POD_NAME=s3-app
$ kubectl get pods ${CUSTOMER_POD_NAME} -o jsonpath='{.metadata.uid}'
<POD_ID>

# next, ssh into the node running the pod and execute the following to find systemd service name:
# NOTE: this won't work if service is already dead
$ CUSTOMER_POD_UID=<POD_ID>
$ PV_NAME=s3-pv
$ ps -ef | grep "$CUSTOMER_POD_UID.*$PV_NAME" | grep -v "grep"
root      231632       <REDACTED>
$ MOUNT_PID=231632
$ UNIT=$(systemctl status $MOUNT_PID | grep --only-matching "mount-s3-.*\.service" | tail -1)

# finally fetch logs from the node
$ journalctl --unit $UNIT

[1] https://github.com/awslabs/mountpoint-s3/blob/main/doc/SEMANTICS.md#writes

dannycjones commented 1 month ago

We'll close this issue for now. As Andres explained, Mountpoint doesn't support appending to a file at this time.

Please do reopen or open a new issue if you needed.