Azure / azure-storage-fuse

A virtual file system adapter for Azure Blob storage
Other
647 stars 204 forks source link

mode: azcli can't find credentials and fails #1420

Closed drewmacphee closed 2 months ago

drewmacphee commented 2 months ago

Which version of blobfuse was used?

2.3.0

Which OS distribution and version are you using?

Ubuntu 22.04

If relevant, please share your mount command.

sudo blobfuse2 mount /blob --config-file=./config.yaml

What was the issue encountered?

mode azcli refuses to authenticate

Have you found a mitigation/solution?

No

Please share logs if available.

[/blob] LOG_ERR [block_blob.go (199)]: BlockBlob::TestPipeline : Failed to validate account with given auth %!s(func() string=0x889cc0) LOG_ERR [azstorage.go (161)]: AzStorage::configureAndTest : Failed to validate credentials [AzureCLICredential: ERROR: Please run 'az login' to setup account.#012] [/blob] LOG_ERR [azstorage.go (101)]: AzStorage::Configure : Failed to validate storage account [failed to authenticate credentials for azstorage] [/blob] LOG_ERR [pipeline.go (69)]: Pipeline: error creating pipeline component azstorage [failed to authenticate credentials for azstorage]

I'm using a shared VM so can't use MSIs and need to retire tokens and keys and so an trying to get azcli mode to work. I authenticate with az login but it never seems to pick up the creds to successfully log in.

vibhansa-msft commented 2 months ago

Are you using the same shell where you do "az login" and launch blobfuse. If you login to a VM and then spawn a container where blobfuse mounts it may not be able to retrieve the token fetched by cli.

drewmacphee commented 2 months ago

Ah.. that makes sense. Sudo az login fixed it. Thanks!