2

On Google Cloud I have 4 buckets and I have two VMs running, one Ubuntu 14 and the other 16. On both machines, I can mount (gcsfuse) all four buckets.

However, I'm having a problem with one (and only one) bucket (project-x-logs). On the machine running Ubuntu 14 I can create a file:

user@instance-4 > pwd
/home/user/work/Project-X/project-x-logs
user@instance-4 > touch del.me
user@instance-4 > ls -l
total 0
-rw-r--r-- 1 user user 0 Jan 24 17:00 del.me
user@instance-4 > 

And I can see it on the Ubuntu 16 machine:

user@instance-gpu-6 > pwd
/home/user/work/Project-X
user@instance-gpu-6 > cd project-x-logs/
user@instance-gpu-6 > ls -l 
total 0
-rw-r--r-- 1 user user 0 Jan 24 17:00 del.me
user@instance-gpu-6 > 

So it looks like this bucket is properly mounted on both machines.

However, when I try to create another file on the Ubuntu 16 machine I get an error:

user@instance-gpu-6 > pwd
/home/user/work/Project-X/project-x-logs
user@instance-gpu-6 > touch delmetoo.me
touch: cannot touch 'delmetoo.me': Input/output error
user@instance-gpu-6 > 

I've opened up the perms as far and wide as I can, but nothing seems to work.

Any suggestions as to how to solve this or at least debug it will be most appreciated.

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19
Joe
  • 511
  • 1
  • 6
  • 13

1 Answers1

0

After much experimentation and searching, the best solution I can come up with is to run the following:

(python35gpu) user@instance-gpu-6 > gcloud auth application-default login

You are running on a Google Compute Engine virtual machine.
The service credentials associated with this virtual machine
will automatically be used by Application Default
Credentials, so it is not necessary to use this command.

If you decide to proceed anyway, your user credentials may be visible
to others with access to this virtual machine. Are you sure you want
to authenticate with your personal account?

Do you want to continue (Y/n)?  Y

Go to the following link in your browser:

    https://accounts.google.com/o/oauth2/auth?redirect_uri=big_long_link


Enter verification code: <paste sha-type code here>

Credentials saved to file: [/home/user/.config/gcloud/application_default_credentials.json]

These credentials will be used by any library that requests
Application Default Credentials.
(python35gpu) user@instance-gpu-6 > 

Clicking on the big_long_link in the terminal window will open a tab in Chrome displaying a sha-type code. Cut and paste that into the terminal prompt and that should grant access to any new or existing buckets (they still need to be mounted, however0

Joe
  • 511
  • 1
  • 6
  • 13