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

fix: armclient panic when response is nil #1235

Merged
merged 1 commit into from
Mar 9, 2022

Conversation

andyzhangx
Copy link
Member

What type of PR is this?

/kind bug

What this PR does / why we need it:

fix: armclient panic when response is nil

2022-03-08T04:31:40.4980663Z stderr F I0308 04:31:40.497552    3996 utils.go:76] GRPC call: /csi.v1.Node/NodeStageVolume
2022-03-08T04:31:40.4980663Z stderr F I0308 04:31:40.498066    3996 utils.go:77] GRPC request: {"staging_target_path":"\\var\\lib\\kubelet\\plugins\\kubernetes.io\\csi\\pv\\pvc-5803bec1-eb0b-4c69-ad8f-149884af0ec8\\globalmount","volume_capability":{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}},"volume_context":{"csi.storage.k8s.io/pv/name":"pvc-5803bec1-eb0b-4c69-ad8f-149884af0ec8","csi.storage.k8s.io/pvc/name":"pvc-azurefile","csi.storage.k8s.io/pvc/namespace":"default","secretnamespace":"default","skuName":"Standard_LRS","storage.kubernetes.io/csiProvisionerIdentity":"1646710363539-8081-file.csi.azure.com"},"volume_id":"capz-bu4wzi#f1e23b0af9d594ab8a66e92#pvc-5803bec1-eb0b-4c69-ad8f-149884af0ec8#"}
2022-03-08T04:31:40.4985572Z stderr F I0308 04:31:40.498557    3996 round_trippers.go:553] GET https://10.96.0.1:443/api/v1/namespaces/default/secrets/azure-storage-account-f1e23b0af9d594ab8a66e92-secret  in 0 milliseconds
2022-03-08T04:31:40.4985572Z stderr F I0308 04:31:40.498557    3996 azurefile.go:606] could not get account(f1e23b0af9d594ab8a66e92) key from secret(azure-storage-account-f1e23b0af9d594ab8a66e92-secret), error: could not get secret(azure-storage-account-f1e23b0af9d594ab8a66e92-secret): Get "https://10.96.0.1:443/api/v1/namespaces/default/secrets/azure-storage-account-f1e23b0af9d594ab8a66e92-secret": dial tcp 10.96.0.1:443: connectex: A socket operation was attempted to an unreachable network., use cluster identity to get account key instead
2022-03-08T04:31:40.5141712Z stderr F panic: runtime error: invalid memory address or nil pointer dereference
2022-03-08T04:31:40.5141712Z stderr F [signal 0xc0000005 code=0x0 addr=0x10 pc=0x1946950]
2022-03-08T04:31:40.5141712Z stderr F 
2022-03-08T04:31:40.5141712Z stderr F goroutine 81 [running]:
2022-03-08T04:31:40.5145534Z stderr F sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient.DoHackRegionalRetryDecorator.func1.1(0xc00009e100)
2022-03-08T04:31:40.5145534Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go:162 +0x90
2022-03-08T04:31:40.515566Z stderr F github.com/Azure/go-autorest/autorest.SenderFunc.Do(0x2353760, 0xc0000a5830)
2022-03-08T04:31:40.515566Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/github.com/Azure/go-autorest/autorest/sender.go:84 +0x1f
2022-03-08T04:31:40.515566Z stderr F github.com/Azure/go-autorest/autorest.SendWithSender({0x2353760, 0xc0000a5830}, 0xc0001f6210, {0xc0004cae28, 0x5, 0x6})
2022-03-08T04:31:40.515566Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/github.com/Azure/go-autorest/autorest/sender.go:126 +0x44
2022-03-08T04:31:40.515566Z stderr F sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient.(*Client).sendRequest(0xc00048f1e0, 0x2382b78)
2022-03-08T04:31:40.515566Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go:223 +0xeb
2022-03-08T04:31:40.515566Z stderr F sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient.(*Client).PostResource(0x19, {0x2382b78, 0xc0001f6210}, {0xc0004fe140, 0x92}, {0x20fdf46, 0x8}, {0x1e2ff60, 0x32c7ad0}, 0xc0001f70b0)
2022-03-08T04:31:40.515566Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/armclient/azure_armclient.go:699 +0x45a
2022-03-08T04:31:40.515566Z stderr F sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient.(*Client).listStorageAccountKeys(0xc000498800, {0x2382b78, 0xc0001f6210}, {0xc00003a5f0, 0x1f0eef65f1}, {0xc00003a5fc, 0xc00003a5f0})
2022-03-08T04:31:40.515566Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go:190 +0x123
2022-03-08T04:31:40.515566Z stderr F sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient.(*Client).ListKeys(0xc000498800, {0x2382b78, 0xc0001f6210}, {0xc00003a5f0, 0xb}, {0xc00003a5fc, 0x17})
2022-03-08T04:31:40.5160683Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/sigs.k8s.io/cloud-provider-azure/pkg/azureclients/storageaccountclient/azure_storageaccountclient.go:166 +0x29e
2022-03-08T04:31:40.5160683Z stderr F sigs.k8s.io/cloud-provider-azure/pkg/provider.(*Cloud).GetStorageAccesskey(0xc0001f7050, {0x2382b78, 0xc0001f6210}, {0xc00003a5fc, 0x34}, {0xc00003a5f0, 0x0})
2022-03-08T04:31:40.5160683Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/sigs.k8s.io/cloud-provider-azure/pkg/provider/azure_storageaccount.go:101 +0x67
2022-03-08T04:31:40.5160683Z stderr F sigs.k8s.io/azurefile-csi-driver/pkg/azurefile.(*Driver).GetAccountInfo(0xc00017a780, {0x2382b78, 0xc0001f6210}, {0xc00003a5f0, 0x4d}, 0x0, 0xc0000d8c00)
2022-03-08T04:31:40.5160683Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/azurefile.go:607 +0xe5b
2022-03-08T04:31:40.5160683Z stderr F sigs.k8s.io/azurefile-csi-driver/pkg/azurefile.(*Driver).NodeStageVolume(0xc00017a780, {0x2382b78, 0xc0001f6210}, 0xc000425800)
2022-03-08T04:31:40.5160683Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/nodeserver.go:159 +0x28a
2022-03-08T04:31:40.5170542Z stderr F github.com/container-storage-interface/spec/lib/go/csi._Node_NodeStageVolume_Handler.func1({0x2382b78, 0xc0001f6210}, {0x2011de0, 0xc000425800})
2022-03-08T04:31:40.5170542Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go:6110 +0x78
2022-03-08T04:31:40.5170542Z stderr F sigs.k8s.io/azurefile-csi-driver/pkg/csi-common.logGRPC({0x2382b78, 0xc0001f6210}, {0x2011de0, 0xc000425800}, 0xc000410da0, 0xc00031ff20)
2022-03-08T04:31:40.5170542Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/csi-common/utils.go:79 +0x3c7
2022-03-08T04:31:40.5170542Z stderr F github.com/container-storage-interface/spec/lib/go/csi._Node_NodeStageVolume_Handler({0x20c0ba0, 0xc00017a780}, {0x2382b78, 0xc0001f6210}, 0xc0004257a0, 0x21dc6b0)
2022-03-08T04:31:40.5170542Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/github.com/container-storage-interface/spec/lib/go/csi/csi.pb.go:6112 +0x138
2022-03-08T04:31:40.5170542Z stderr F google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002db500, {0x23b1c98, 0xc000310180}, 0xc0002ba5a0, 0xc0002039b0, 0x3257ac0, 0x0)
2022-03-08T04:31:40.5170542Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/google.golang.org/grpc/server.go:1282 +0xccf
2022-03-08T04:31:40.5170542Z stderr F google.golang.org/grpc.(*Server).handleStream(0xc0002db500, {0x23b1c98, 0xc000310180}, 0xc0002ba5a0, 0x0)
2022-03-08T04:31:40.5170542Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/google.golang.org/grpc/server.go:1616 +0xa2a
2022-03-08T04:31:40.5170542Z stderr F google.golang.org/grpc.(*Server).serveStreams.func1.2()
2022-03-08T04:31:40.5170542Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/google.golang.org/grpc/server.go:921 +0x98
2022-03-08T04:31:40.5170542Z stderr F created by google.golang.org/grpc.(*Server).serveStreams.func1
2022-03-08T04:31:40.5175511Z stderr F 	/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/vendor/google.golang.org/grpc/server.go:919 +0x294

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

fix: armclient panic when response is nil

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

fix: armclient panic when response is nil

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Mar 9, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 9, 2022
@coveralls
Copy link

coveralls commented Mar 9, 2022

Coverage Status

Coverage decreased (-0.01%) to 80.182% when pulling 6a94659 on andyzhangx:armclient-panic into 6a65460 on kubernetes-sigs:master.

@andyzhangx
Copy link
Member Author

/retest

@nilo19
Copy link
Contributor

nilo19 commented Mar 9, 2022

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 9, 2022
@k8s-ci-robot k8s-ci-robot merged commit 8a8c170 into kubernetes-sigs:master Mar 9, 2022
@MartinForReal
Copy link
Contributor

/cherrypick release-1.23

@MartinForReal
Copy link
Contributor

/cherrypick release-1.1

@MartinForReal
Copy link
Contributor

/cherrypick release-1.0

@k8s-infra-cherrypick-robot

@MartinForReal: #1235 failed to apply on top of branch "release-1.23":

Applying: fix: armclient panic when response is nil
Using index info to reconstruct a base tree...
M	pkg/azureclients/armclient/azure_armclient.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/azureclients/armclient/azure_armclient.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/azure_armclient.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: armclient panic when response is nil
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.23

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-infra-cherrypick-robot

@MartinForReal: #1235 failed to apply on top of branch "release-1.1":

Applying: fix: armclient panic when response is nil
Using index info to reconstruct a base tree...
M	pkg/azureclients/armclient/azure_armclient.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/azureclients/armclient/azure_armclient.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/azure_armclient.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: armclient panic when response is nil
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-infra-cherrypick-robot

@MartinForReal: #1235 failed to apply on top of branch "release-1.0":

Applying: fix: armclient panic when response is nil
Using index info to reconstruct a base tree...
M	pkg/azureclients/armclient/azure_armclient.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/azureclients/armclient/azure_armclient.go
CONFLICT (content): Merge conflict in pkg/azureclients/armclient/azure_armclient.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix: armclient panic when response is nil
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherrypick release-1.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants