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

Azure unit test TestGetSubscriptionIdFromInstanceMetadata is failing with nil pointer #3861

Closed
mwielgus opened this issue Feb 1, 2021 · 1 comment · Fixed by #3864
Closed
Labels
area/provider/azure Issues or PRs related to azure provider kind/bug Categorizes issue or PR as related to a bug. test

Comments

@mwielgus
Copy link
Contributor

mwielgus commented Feb 1, 2021

Logs are below:

W0201 08:28:22.137334   16230 azure_util.go:337] Template improperly formatted
W0201 08:28:22.141498   16230 azure_util.go:337] Template improperly formatted
E0201 08:28:22.151560   16230 azure_agent_pool.go:409] Get name for instance {"/subscriptions/sub/resourceGroups/rg/providers/provider/virtualMachines/as-vm-0/"} failed: resource name was missing from identifier
W0201 08:28:22.153655   16230 azure_agent_pool.go:546] NIC ID is not set for VM (rg/as-vm-0)
I0201 08:28:22.153723   16230 azure_agent_pool.go:555] deleting VM: rg/as-vm-0
I0201 08:28:22.153800   16230 azure_agent_pool.go:559] waiting for VirtualMachine deletion: rg/as-vm-0
I0201 08:28:22.153883   16230 azure_agent_pool.go:586] found os disk storage reference: foo vhds bar.vhd
I0201 08:28:22.153942   16230 azure_agent_pool.go:588] deleting blob: vhds/bar.vhd
E0201 08:28:22.918923   16230 azure_agent_pool.go:415] Delete virtual machine "as-vm-0" failed: storage: service returned error: StatusCode=403, ErrorCode=AccountIsDisabled, ErrorMessage=The specified account is disabled.
RequestId:48aef6ef-f01e-011e-1974-f8c979000000
Time:2021-02-01T08:28:22.8930697Z, RequestInitiated=Mon, 01 Feb 2021 08:28:21 GMT, RequestId=48aef6ef-f01e-011e-1974-f8c979000000, API Version=, QueryParameterName=, QueryParameterValue=
W0201 08:28:22.922843   16230 azure_agent_pool.go:546] NIC ID is not set for VM (rg/as-vm-0)
I0201 08:28:22.922911   16230 azure_agent_pool.go:555] deleting VM: rg/as-vm-0
I0201 08:28:22.922943   16230 azure_agent_pool.go:559] waiting for VirtualMachine deletion: rg/as-vm-0
I0201 08:28:22.923007   16230 azure_agent_pool.go:586] found os disk storage reference: foo vhds bar.vhd
I0201 08:28:22.923035   16230 azure_agent_pool.go:588] deleting blob: vhds/bar.vhd
E0201 08:28:22.972393   16230 azure_agent_pool.go:415] Delete virtual machine "as-vm-0" failed: storage: service returned error: StatusCode=403, ErrorCode=AccountIsDisabled, ErrorMessage=The specified account is disabled.
RequestId:48aef715-f01e-011e-3b74-f8c979000000
Time:2021-02-01T08:28:22.9461082Z, RequestInitiated=Mon, 01 Feb 2021 08:28:22 GMT, RequestId=48aef715-f01e-011e-3b74-f8c979000000, API Version=, QueryParameterName=, QueryParameterValue=
--- FAIL: TestGetSubscriptionIdFromInstanceMetadata (0.01s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1eb0412]

goroutine 61 [running]:
testing.tRunner.func1.1(0x2091bc0, 0x34b9920)
	/opt/hostedtoolcache/go/1.14.14/x64/src/testing/testing.go:999 +0x461
testing.tRunner.func1(0xc0001fb680)
	/opt/hostedtoolcache/go/1.14.14/x64/src/testing/testing.go:1002 +0x606
panic(0x2091bc0, 0x34b9920)
	/opt/hostedtoolcache/go/1.14.14/x64/src/runtime/panic.go:975 +0x3e3
k8s.io/autoscaler/cluster-autoscaler/cloudprovider/azure.TestGetSubscriptionIdFromInstanceMetadata(0xc0001fb680)
	/home/runner/work/autoscaler/autoscaler/go/src/k8s.io/autoscaler/cluster-autoscaler/cloudprovider/azure/azure_config_test.go:243 +0x62
testing.tRunner(0xc0001fb680, 0x2343968)
	/opt/hostedtoolcache/go/1.14.14/x64/src/testing/testing.go:1050 +0x1ec
created by testing.(*T).Run
	/opt/hostedtoolcache/go/1.14.14/x64/src/testing/testing.go:1095 +0x538
FAIL	k8s.io/autoscaler/cluster-autoscaler/cloudprovider/azure	0.955s
@mwielgus mwielgus added test area/provider/azure Issues or PRs related to azure provider kind/bug Categorizes issue or PR as related to a bug. labels Feb 1, 2021
@mwielgus
Copy link
Contributor Author

mwielgus commented Feb 1, 2021

cc:
@feiskyer
@nilo19
@marwanad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/azure Issues or PRs related to azure provider kind/bug Categorizes issue or PR as related to a bug. test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant