Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Provider panics during resource deletion when connection to vRA is lost #70

Open
marratj opened this issue May 18, 2020 · 1 comment
Open

Comments

@marratj
Copy link

marratj commented May 18, 2020

vRA 7.x version
1.0.1
Terraform version
0.12.24

Describe the bug
During resource deletion when the GetRequestStatus call in waitForRequestCompletion to vRA API is not responding for whatever reason (an intermittent connection issue for example) the provider will panic with a runtime error: invalid memory address or nil pointer dereference.

677:	        	reqestStatusView, _ := vraClient.GetRequestStatus(requestID)
688:		status = reqestStatusView.Phase // --> this fails with a nil pointer exception in case vRA doesn't respond to the API call

To Reproduce

  • Trigger resource deletion (might also work during resource creation)
  • break network connectivity to the vRA API for a short time (10 seconds, during the waitForRequestCompletion loop)

Expected behavior
There should be a error checking and/or retry mechanism that doesn't lead the provider to panic when network connectivity to the vRA API is lost intermittently

@Prativa20
Copy link
Contributor

@marratj , looking into it. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants