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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to the Azure China storage container #50

Closed
Abel-Liu opened this issue Apr 29, 2020 · 7 comments
Closed

Failed to connect to the Azure China storage container #50

Abel-Liu opened this issue Apr 29, 2020 · 7 comments
Labels
question Further information is requested

Comments

@Abel-Liu
Copy link

What happened:

blobfuse report error:

Failed to connect to the storage container. There might be something wrong about the storage config, please double check the storage account name, account key and container name. errno = 403

What did I do:

I have installed via kubectl apply -f https://raw.githubusercontent.com/Azure/kubernetes-volume-drivers/master/flexvolume/blobfuse/deployment/blobfuse-flexvol-installer-1.9.yaml

/var/log/blobfuse-driver.log content:

Wed Apr 29 07:39:35 UTC 2020 EXEC: mkdir -p /var/lib/kubelet/pods/2244d38f-c312-4b7e-a404-45e931001c04/volumes/azure~blobfuse/test-blobfuse
Wed Apr 29 07:39:35 UTC 2020 INF: AZURE_STORAGE_ACCESS_KEY is set
Wed Apr 29 07:39:35 UTC 2020 INF: BLOBENDPOINT is set
Wed Apr 29 07:39:35 UTC 2020 INF: export storage account - export AZURE_STORAGE_ACCOUNT=resources
Wed Apr 29 07:39:35 UTC 2020 EXEC: blobfuse /var/lib/kubelet/pods/2244d38f-c312-4b7e-a404-45e931001c04/volumes/azure~blobfuse/test-blobfuse --container-name=k8s --tmp-path=/tmp/blobfuse -o allow_other  --file-cache-timeout-in-seconds=120
Wed Apr 29 07:39:36 UTC 2020 ERROR: { "status": "Failure", "message": "Failed to mount device /dev/ at /var/lib/kubelet/pods/2244d38f-c312-4b7e-a404-45e931001c04/volumes/azure~blobfuse/test-blobfuse, accountname:resources, error log:Wed
Apr 29 07:39:35 UTC 2020 EXEC: blobfuse /var/lib/kubelet/pods/2244d38f-c312-4b7e-a404-45e931001c04/volumes/azure~blobfuse/test-blobfuse --container-name=k8s --tmp-path=/tmp/blobfuse -o allow_other --file-cache-timeout-in-seconds=120" }

Then SSH to AKS vmss and test this:

mkdir /tmp/abc
export AZURE_STORAGE_ACCOUNT=resources
export AZURE_STORAGE_SAS_TOKEN="?sv=2019-02-02&ss=bfqt&srt=sco&sp=rwdlacup&se=2020-04-29T17:02:52Z&st=2020-04-29T09:02:52Z&spr=https,http&sig=..."

/usr/bin/blobfuse /tmp/abc --container-name=k8s --tmp-path=/tmp/blobfuse -o allow_other -o ro --file-cache-timeout-in-seconds=120 --use-https=true --blobEndpoint="https://resources.blob.core.chinacloudapi.cn"

Then report 403 error. I am sure storage account name and sas token are right, and container exists, I also tested use access key and failed too.

Hope you give suggestions, thanks a lot.

Environment:

  • Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.5", GitCommit:"20c265fef0741dd71a66480e35bd69f18351daea", GitTreeState:"clean", BuildDate:"2019-10-15T19:16:51Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.7", GitCommit:"6c143d35bb11d74970e7bc0b6c45b6bfdffc0bd4", GitTreeState:"clean", BuildDate:"2019-12-13T18:46:24Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

@andyzhangx
Copy link
Collaborator

add one more export command for azure china:

export AZURE_STORAGE_BLOB_ENDPOINT=resources.blob.core.chinacloudapi.cn

@andyzhangx
Copy link
Collaborator

and for flexvolume driver, you should create secret, e.g.

kubectl create secret generic blobfusecreds --from-literal blobendpoint="resources.blob.core.chinacloudapi.cn" --from-literal accountname=ACCOUNT-NAME --from-literal accountsastoken="sastoken" --type="azure/blobfuse"

@andyzhangx andyzhangx added the question Further information is requested label Apr 29, 2020
@Abel-Liu
Copy link
Author

I add AZURE_STORAGE_BLOB_ENDPOINT but still not working.

@andyzhangx
Copy link
Collaborator

can you run "blobfuse --version", only version > 2.0 would work on Azure China.

@Abel-Liu
Copy link
Author

blobfuse version is 1.0.3.

Do we have k8s deploy yaml or docker image that install version above 2.0?

@Abel-Liu
Copy link
Author

It works! Thanks a lot.

@andyzhangx andyzhangx changed the title Failed to connect to the storage container Failed to connect to the Azure China storage container Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants