mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-26 05:45:57 +03:00
[GH-ISSUE #1762] Error loading IAM role name when using IMDSv2 and auto role #904
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#904
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kamilJ96 on GitHub (Sep 7, 2021).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/1762
Additional Information
When the s3fs option is set to either
-o iam_roleor-o iam_role=auto, s3fs first queries the instance metadata to figure out the IAM role. However, if IMDSv2 is required on the instance, then this query fails with a401 Unauthorizedresponse. and s3fs terminates This is because an access token hasn't been generated and sent along with the metadata request.Version of s3fs being used (s3fs --version)
1.90Version of fuse being used (pkg-config --modversion fuse, rpm -qi fuse, dpkg -s fuse)
2.9.2s3fs syslog messages (grep s3fs /var/log/syslog, journalctl | grep s3fs, or s3fs outputs)
s3fs.cpp:s3fs_init(3395): could not load IAM role name from meta data.Details about issue
S3fsCurl::LoadIAMRoleFromMetaDatacalled froms3fs_init-> Does not make use of theS3fsCurl::GetIAMv2ApiTokenfunction to first retrieve a valid access token, and add it to the list of headers.@gaul commented on GitHub (Sep 7, 2021):
@kamilJ96 Could you test with the latest master which includes #1760? @nmeyerhans
@kamilJ96 commented on GitHub (Sep 8, 2021):
@gaul can confirm that it now makes a request to get the access token before querying the IAM role, great work! Thanks @nmeyerhans
There is a separate issue to do with the Expect-100 header, but I'll open another ticket for that, cheers