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

Provider crashed while deleting saved search #145

Open
cosmincrihan opened this issue Dec 16, 2022 · 2 comments
Open

Provider crashed while deleting saved search #145

cosmincrihan opened this issue Dec 16, 2022 · 2 comments

Comments

@cosmincrihan
Copy link

Received the following error during an apply command, while terraform was trying to destroy a saved search object:

module.oracle_hosts_entities_search.splunk_saved_searches.savedsearch: Destroying... [id=oracle_hosts_entities_search]
itsi_entity.oracle_instance_entity["NAME_OF_ENTITY"]: Creation complete after 29s [id=648272e5-7c66-3642-2519-0934c662a5ec]
╷
│ Error: Plugin did not respond
│ 
│ The plugin encountered an error, and failed to respond to the
│ plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may
│ contain more details.
╵

Stack trace from the terraform-provider-splunk_v1.4.17 plugin:

panic: runtime error: index out of range [0] with length 0

goroutine 52 [running]:
github.com/splunk/terraform-provider-splunk/splunk.savedSearchesDelete(0xc0000963f0, {0xbc97c0, 0xc00000e140})
	github.com/splunk/terraform-provider-splunk/splunk/resource_splunk_saved_searches.go:1598 +0x374
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0xc00064e1b0, 0xc0006ee370, 0xc00020d220, {0xbc97c0, 0xc00000e140})
	github.com/hashicorp/[email protected]/helper/schema/resource.go:283 +0x257
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0xc000690000, 0xc00059fa48, 0xd148a1, 0xf)
	github.com/hashicorp/[email protected]/helper/schema/provider.go:294 +0x70
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0xc000650048, {0xc000096000, 0x4b3fa6}, 0xc000096000)
	github.com/hashicorp/[email protected]/internal/helper/plugin/grpc_provider.go:885 +0x7c5
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0xce27e0, 0xc000650048}, {0xe8a8d0, 0xc0004661b0}, 0xc0000a82a0, 0x0)
	github.com/hashicorp/[email protected]/internal/tfplugin5/tfplugin5.pb.go:3305 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000438480, {0xe978a0, 0xc00067a180}, 0xc000214300, 0xc00056ce70, 0x13c5860, 0x0)
	google.golang.org/[email protected]/server.go:1024 +0xd1e
google.golang.org/grpc.(*Server).handleStream(0xc000438480, {0xe978a0, 0xc00067a180}, 0xc000214300, 0x0)
	google.golang.org/[email protected]/server.go:1313 +0xa56
google.golang.org/grpc.(*Server).serveStreams.func1.1()
	google.golang.org/[email protected]/server.go:722 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
	google.golang.org/[email protected]/server.go:720 +0xef

Error: The terraform-provider-splunk_v1.4.17 plugin crashed!

After the crash, trying the apply again with no code change seemed to have fixed it though.
However, submitting the log here anyway.

@anushjay
Copy link
Collaborator

@cosmincrihan If you can provide a sample configuration (just the specific resource that fails would suffice) and the version of Splunk you're running it against that would be very helpful.

@cosmincrihan
Copy link
Author

@anushjay I attached both the resource in the state file that failed to delete and the corresponding Terraform code.
The version of Splunk used was 8.1.1.

savedsearch_object.zip

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

No branches or pull requests

2 participants