3

I have mounted a bucket with:

hostname:/ # gcsfuse --implicit-dirs --foreground bucketname /directory
Using mount point: /directory
Opening GCS connection...
WARNING: gcsfuse invoked as root. This will cause all files to be owned by
root. If this is not what you intended, invoke gcsfuse as the user that will
be interacting with the file system.
Opening bucket...
Mounting file system...
File system has been successfully mounted.

Then, in another connection, I run this:

hostname:/ # head /directory/subdirectory/file.bak
head: error reading '/directory/subdirectory/file.bak': Input/output error

At the same time, on the first shell with gcsfuse, I see this:

fuse: 2019/06/11 13:23:28.153146 *fuseops.ReadFileOp error: fh.reader.ReadAt: startRead: NewReader: Received unexpected status code 200 instead of HTTP 206

On the other hand, directories on the tree are perfectly traversable.

EDIT: With --debug_gcs I found this:

gcs: 2019/06/11 13:40:17.339999 Req             0x7a: -> ListObjects() (44.661907ms): OK
gcs: 2019/06/11 13:40:17.340263 Req             0x7e: <- ListObjects()
gcs: 2019/06/11 13:40:17.340263 Req             0x7d: <- StatObject("subdirectory/file.bak/")
gcs: 2019/06/11 13:40:17.383932 Req             0x7d: -> StatObject("subdirectory/file.bak/") (43.666095ms): gcs.NotFoundError: googleapi: Error 404: No such object: bucket/subdirectory/file.bak/, notFound
gcs: 2019/06/11 13:40:17.435100 Req             0x7e: -> ListObjects() (94.837769ms): OK
gcs: 2019/06/11 13:40:17.435561 Req             0x7f: <- Read("subdirectory/file.bak", [0, 3698))
gcs: 2019/06/11 13:40:17.471072 Req             0x7f: -> Read("subdirectory/file.bak", [0, 3698)) (35.514446ms): Received unexpected status code 200 instead of HTTP 206
fuse: 2019/06/11 13:40:17.471088 *fuseops.ReadFileOp error: fh.reader.ReadAt: startRead: NewReader: Received unexpected status code 200 instead of HTTP 206

It seems that this is not the normal permissions error in gcsfuse but semthing with --implied-dirs. Can somebody help?

Envite
  • 321
  • 2
  • 6
  • 16
  • I am not sure it will help but I had a similar issue which was solved by adding ` --key-file=/path/to/service_account.json` to gcsfuse, but i didn't use --implied-dirs – Erez Ben Harush Jun 11 '19 at 12:52
  • 1
    Thanks, @ErezBenHarush but it is not a problem with permissions. I am perfectly able to access a file located in the "root" of the bucket: read, write, edit, etc. – Envite Jun 11 '19 at 15:03
  • I see this frequently and have to write every piece of software I run in order to expect i/o errors and to retry. Feels like something that should be handled at the gcsfuse level but I'm not quite sure what the underlying problem is. I opened an issue: https://github.com/GoogleCloudPlatform/gcsfuse/issues/402 – carbocation Jul 01 '20 at 17:36
  • If anyone finds this through Google: `implied-dirs` is now `implicit-dirs` – stiller_leser Jul 31 '20 at 13:30

0 Answers0