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

BUG: 1.69.0 panic when attempting to update ibm_resource_instance #5618

Closed
willholley opened this issue Sep 5, 2024 · 6 comments · Fixed by #5622
Closed

BUG: 1.69.0 panic when attempting to update ibm_resource_instance #5618

willholley opened this issue Sep 5, 2024 · 6 comments · Fixed by #5622
Labels
bug crash Panics on provider service/Resource Management Issues related to Resource Manager or Resource controller Issues

Comments

@willholley
Copy link
Contributor

willholley commented Sep 5, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform IBM Provider Version

Terraform 1.7.5
IBM Provider 1.69.0

Affected Resource(s)

  • ibm_resource_instance

Terraform Configuration Files

resource "ibm_resource_instance" "cloud_object_storage_dsx" {
  name              = "cloud-object-storage-dsx"
  service           = "cloud-object-storage"
  plan              = "standard"
  location          = "global"
  resource_group_id = module.resource_groups.resource_group_ids["default"]
}

Debug Output

Panic Output

ibm_resource_instance.cloud_object_storage_dsx: Modifying... [id=crn:v1:bluemix:public:cloud-object-storage:global:a/xxxx:7219eeed-c4c9-406d-8b1f-acc8a784e510::]

ibm_resource_instance.cloud_object_storage_dsx: Still modifying... [id=crn:v1:bluemix:public:cloud-object-stor...7219eeed-c4c9-406d-8b1f-acc8a784e510::, 10s elapsed]

╷

│ Error: Request cancelled

│ 

│   with ibm_resource_instance.cloud_object_storage_dsx,

│   on cos.tf line 5, in resource "ibm_resource_instance" "cloud_object_storage_dsx":

│    5: resource "ibm_resource_instance" "cloud_object_storage_dsx" {

│ 

│ The plugin.(*GRPCProvider).ApplyResourceChange request was cancelled.

╵


Stack trace from the terraform-provider-ibm_v1.69.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x250cc2b]
goroutine 162 [running]:
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/resourcecontroller.waitForResourceInstanceUpdate.func1()
	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/resourcecontroller/resource_ibm_resource_instance.go:904 +0x2eb

github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry.(*StateChangeConf).WaitForStateContext.func1()
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/retry/state.go:113 +0x1b0
created by github.com/hashicorp/terraform-plugin-sdk/v2/helper/retry.(*StateChangeConf).WaitForStateContext in goroutine 111
	github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/retry/state.go:86 +0x23b

Error: The terraform-provider-ibm_v1.69.0 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Expected Behavior

Resource should have updated.

Actual Behavior

The plugin crashed.

Steps to Reproduce

  1. terraform apply

Important Factoids

#5602 looks like a related change.

References

  • #0000
@github-actions github-actions bot added bug crash Panics on provider service/Resource Management Issues related to Resource Manager or Resource controller Issues labels Sep 5, 2024
@willholley willholley changed the title 1.69.0 crash when attempting to update ibm_resource_instance 1.69.0 panic when attempting to update ibm_resource_instance Sep 5, 2024
@willholley willholley changed the title 1.69.0 panic when attempting to update ibm_resource_instance BUG: 1.69.0 panic when attempting to update ibm_resource_instance Sep 5, 2024
@hkantare
Copy link
Collaborator

hkantare commented Sep 5, 2024

@willholley Can you share complete steps . Does creation and update is with same binary?

@willholley
Copy link
Contributor Author

our CI which runs terraform is quite complex - I haven't attempted to create a minimal reproduction yet.

It seems to be always failing on cos service instances and when updating last_operation.

The resources were created long ago - some are 3/4 years old and some a few months old.

@willholley
Copy link
Contributor Author

if it's useful, we upgraded from provider version 1.66.0

@hkantare
Copy link
Collaborator

hkantare commented Sep 5, 2024

May be old instances is missing to have (LastOperation)
instance.LastOperation.Async
@willholley can we have some nil check before accessing

@willholley
Copy link
Contributor Author

@JunliWang
Copy link
Contributor

both LastOperation and LastOperation.Async could be nil,
adding this check in above PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug crash Panics on provider service/Resource Management Issues related to Resource Manager or Resource controller Issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants