Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoCredentialProviders error surfaces when using goofys on ec2 instances with IMDSv2 enabled. #671

Open
TheBIsReal opened this issue Jan 14, 2022 · 2 comments

Comments

@TheBIsReal
Copy link

Greetings 馃憢

I麓m struggling to auto-mount my bucket using fstab with the following configuration:
/usr/sbin/goofys#mybucketname /mnt/data fuse _netdev,allow_other,--file-mode=0660,--dir-mode=0770,--uid=1000,--gid=1000 0 0

When executing mount -a goofys fails with the messages seen below:

s3.INFO Switching from region 'us-east-1' to 'eu-west-1'
s3.ERROR code=NoCredentialProviders msg=no valid providers in chain. Deprecated.#012#011For verbose messaging see aws.Config.CredentialsChainVerboseErrors, err=<nil>
s3.ERROR code=NoCredentialProviders msg=no valid providers in chain. Deprecated.#012#011For verbose messaging see aws.Config.CredentialsChainVerboseErrors, err=<nil>
main.ERROR Unable to access 'mybucketname': NoCredentialProviders: no valid providers in chain. Deprecated.#012#011For verbosemessaging see aws.Config.CredentialsChainVerboseErrors
main.FATAL Mounting file system: Mount: initialization failed

We are operating on an ec2 instance using IMDSv2. Previously we used IMDSv1 without any issues. Once we麓ve upgraded to v2 for our ec2-instances, the described issue occured without any additional change.

Have you any idea why goofys does not find the credentials of the ec2 instance role?

Kind regards,
Bastian

@llamafilm
Copy link

llamafilm commented Nov 16, 2023

This issue is already fixed in the latest code, but it hasn't been released yet so you have to build from source, as mentioned in #727.

@bebosudo
Copy link

Thanks @llamafilm, your comment helped me realize that the latest goofys release may not contain the IRSA feature, so I rebuilt it and now goofys is mounting S3 buckets using IAM roles!

Here are some steps I did in a ubuntu container on EKS to build goofys, which may be useful to others too:

$ curl -L https://go.dev/dl/go1.21.4.linux-amd64.tar.gz > go1.21.4.linux-amd64.tar.gz
$ rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.4.linux-amd64.tar.gz
$ export PATH=$PATH:/usr/local/go/bin
$ export GOPATH=$HOME/work
$ go install github.com/kahing/goofys@350ff31
$ ~/work/bin/goofys ${BUCKET_NAME} /media

@kahing any possibility to trigger a new rebuild of goofys? The latest release is very old.. Thanks a lot for this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants