goofys icon indicating copy to clipboard operation
goofys copied to clipboard

Unable to write file > 5mb to GCS

Open MinosPong opened this issue 8 years ago • 5 comments

VERSION: 0.0.18-2a3ff2a2adbed07472b7902dfca348c5a21bd92b

I am trying to play goofys with GCS and it have error when cp file >5mb

> cp largefile /mnt/mount/
cp: error writing ‘/mnt/mount/largefile’: Invalid argument
cp: failed to extend ‘/mnt/mount/largefile’: Invalid argument
cp: failed to close ‘/mnt/mount/largefile’: Invalid argument

From capture I see Request

POST /bucket/largefile?uploads= HTTP/1.1\r\n
Host: storage.googleapis.com\r\n
Content-Length: 0\r\n
Accept-Encoding: gzip\r\n
... [auth-header skipped here]

And Response

HTTP/1.1 400 Bad Request\r\n
Content-Type: application/xml; charset=UTF-8
Content-Length: 188
Vary: Origin
Server: UploadServer

<?xml version='1.0' encoding='UTF-8'?><Error><Code>InvalidArgument</Code><Message>Invalid argument.</Message><Details>POST object expects Content-Type multipart/form-data</Details></Error>

MinosPong avatar Jan 05 '18 10:01 MinosPong

This is because GCS's S3 implementation does not support S3 multipart uploads and instead reinvented another API (ugh). Coincidentally I've started working on a fix for this so stay tuned.

kahing avatar Jan 06 '18 01:01 kahing

Is there a reason why you use goofys instead of gcsfuse?

kahing avatar Jan 06 '18 18:01 kahing

Yes, our application is using goofys + s3, and we are migrating it to GCS. We want to keep using goofys because of its performance, and align the tech in s3 and gcs application.

MinosPong avatar Jan 07 '18 03:01 MinosPong

Could you help me test the latest commit? It seems to work for me in tests and some smallish uploads

kahing avatar Jan 08 '18 07:01 kahing

Yes. It looks fine now~~ Thank you for your fast response ^^

MinosPong avatar Jan 10 '18 08:01 MinosPong