IBM-Cloud / terraform-provider-ibm

https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs
Mozilla Public License 2.0
339 stars 650 forks source link

IBM-Cloud terraform-provider-ibm_v1.29.0 plugin crashes while attempting to remove rabbitmq3.9 #4833

Open tuhincicd opened 10 months ago

tuhincicd commented 10 months ago

issue IBM-Cloud terraform-provider-ibm_v1.29.0 plugin crashes while attempting to remove rabbitmq3.9 . this is observed in IBM Cloud dev environment . Production and preproduction does not have this behaviour . rabbitmq 3.9 version is end of life and soon to be discontinued by IBM .

terraform-provider-ibm_v1.29.0 plugin

error specifics

Stack trace from the terraform-provider-ibm_v1.29.0 plugin:

panic: runtime error: integer divide by zero

Debug Output

2023-09-28T16:37:42.770Z [INFO] backend/local: plan operation completed

Error: Plugin did not respond

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Request cancelled

with module.cloudant.ibm_resource_key.cloudant_key, on .terraform/modules/cloudant/cloudant/cloudant.tf line 34, in resource "ibm_resource_key" "cloudant_key": 34: resource "ibm_resource_key" "cloudant_key" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Error: Request cancelled

with module.cloudantte.ibm_resource_key.cloudant_key, on .terraform/modules/cloudantte/cloudant/cloudant.tf line 34, in resource "ibm_resource_key" "cloudant_key": 34: resource "ibm_resource_key" "cloudant_key" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Error: Request cancelled

with module.cos.ibm_cos_bucket.bucket, on .terraform/modules/cos/s3/main.tf line 110, in resource "ibm_cos_bucket" "bucket": 110: resource "ibm_cos_bucket" "bucket" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Error: Request cancelled

with module.cos.ibm_resource_key.cos_key, on .terraform/modules/cos/s3/main.tf line 133, in resource "ibm_resource_key" "cos_key": 133: resource "ibm_resource_key" "cos_key" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Error: Request cancelled

with module.cos.ibm_resource_key.cos_hmac_key, on .terraform/modules/cos/s3/main.tf line 139, in resource "ibm_resource_key" "cos_hmac_key": 139: resource "ibm_resource_key" "cos_hmac_key" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Error: Plugin did not respond

with module.cos_cp4s.ibm_resource_instance.cos_instance, on .terraform/modules/cos_cp4s/s3/main.tf line 102, in resource "ibm_resource_instance" "cos_instance": 102: resource "ibm_resource_instance" "cos_instance" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Plugin did not respond

with module.elastic79.ibm_database.elastic, on .terraform/modules/elastic79/elastic/elastic.tf line 83, in resource "ibm_database" "elastic": 83: resource "ibm_database" "elastic" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Request cancelled

with module.etcd.ibm_database.etcd, on .terraform/modules/etcd/etcd/etcd.tf line 83, in resource "ibm_database" "etcd": 83: resource "ibm_database" "etcd" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Error: Plugin did not respond

with module.iam-administrator.data.ibm_iam_access_group.accgrp, on .terraform/modules/iam-administrator/iam/main.tf line 27, in data "ibm_iam_access_group" "accgrp": 27: data "ibm_iam_access_group" "accgrp" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.

Error: Plugin did not respond

with module.iam-developer.data.ibm_iam_access_group.accgrp, on .terraform/modules/iam-developer/iam/main.tf line 27, in data "ibm_iam_access_group" "accgrp": 27: data "ibm_iam_access_group" "accgrp" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.

Error: Plugin did not respond

with module.iam-support.data.ibm_iam_access_group.accgrp, on .terraform/modules/iam-support/iam/main.tf line 27, in data "ibm_iam_access_group" "accgrp": 27: data "ibm_iam_access_group" "accgrp" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadDataSource call. The plugin logs may contain more details.

Error: Request cancelled

with module.postgresql12cases.ibm_database.postgresql, on .terraform/modules/postgresql12cases/postgresql/postgresql.tf line 82, in resource "ibm_database" "postgresql": 82: resource "ibm_database" "postgresql" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Error: Plugin did not respond

with module.rabbitmq311.ibm_database.rabbitmq, on .terraform/modules/rabbitmq311/rabbitmq/rabbitmq.tf line 82, in resource "ibm_database" "rabbitmq": 82: resource "ibm_database" "rabbitmq" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Plugin did not respond

with module.rabbitmq39.ibm_database.rabbitmq, on .terraform/modules/rabbitmq39/rabbitmq/rabbitmq.tf line 82, in resource "ibm_database" "rabbitmq": 82: resource "ibm_database" "rabbitmq" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: expected length of adminpassword to be in the range (10 - 32), got testing

with module.rabbitmq39[0].ibm_database.rabbitmq, on .terraform/modules/rabbitmq39/rabbitmq/rabbitmq.tf line 89, in resource "ibm_database" "rabbitmq": 89: adminpassword = var.rabbitmq_admin_credentials

Error: Plugin did not respond

with module.redis.ibm_database.redis, on .terraform/modules/redis/redis/redis.tf line 82, in resource "ibm_database" "redis": 82: resource "ibm_database" "redis" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Plugin did not respond

with module.vpc.ibm_is_vpc.vpc, on .terraform/modules/vpc/vpc/main.tf line 31, in resource "ibm_is_vpc" "vpc": 31: resource "ibm_is_vpc" "vpc" {

The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ReadResource call. The plugin logs may contain more details.

Error: Request cancelled

with module.cos_cp4s_backup_bucket.ibm_cos_bucket.bucket, on .terraform/modules/cos_cp4s_backup_bucket/s3/shared/bucket/main.tf line 85, in resource "ibm_cos_bucket" "bucket": 85: resource "ibm_cos_bucket" "bucket" {

The plugin.(*GRPCProvider).UpgradeResourceState request was cancelled.

Stack trace from the terraform-provider-ibm_v1.29.0 plugin:

panic: runtime error: integer divide by zero

goroutine 487 [running]: github.com/IBM-Cloud/terraform-provider-ibm/ibm.resourceIBMDatabaseInstanceRead(0xc00087c000, 0x27ae1c0, 0xc000469800, 0x3a3bb00, 0xc000180800) github.com/IBM-Cloud/terraform-provider-ibm/ibm/resource_ibm_database.go:1314 +0x225a github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).read(0xc000c8a380, 0x2c9ba48, 0xc001539080, 0xc00087c000, 0x27ae1c0, 0xc000469800, 0x0, 0x0, 0x0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.0/helper/schema/resource.go:335 +0x1ee github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(Resource).RefreshWithoutUpgrade(0xc000c8a380, 0x2c9ba48, 0xc001539080, 0xc00046d7a0, 0x27ae1c0, 0xc000469800, 0xc00141eca8, 0x0, 0x0, 0x0) github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.0/helper/schema/resource.go:624 +0x1cb github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(GRPCProviderServer).ReadResource(0xc00021de00, 0x2c9ba48, 0xc001539080, 0xc0015390c0, 0xc001539080, 0x40ba05, 0x2636560) github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.0/helper/schema/grpc_provider.go:575 +0x43b github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(server).ReadResource(0xc000fb6580, 0x2c9baf0, 0xc001539080, 0xc001c0b740, 0xc000fb6580, 0xc000f0ccf0, 0xc00066fba0) github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/server/server.go:298 +0x105 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x26dd080, 0xc000fb6580, 0x2c9baf0, 0xc000f0ccf0, 0xc001c0b6e0, 0x0, 0x2c9baf0, 0xc000f0ccf0, 0xc00114e000, 0x106c) github.com/hashicorp/terraform-plugin-go@v0.3.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214 google.golang.org/grpc.(Server).processUnaryRPC(0xc000543c00, 0x2cb47b8, 0xc000683080, 0xc00125a700, 0xc000ddc930, 0x39dd430, 0x0, 0x0, 0x0) google.golang.org/grpc@v1.32.0/server.go:1194 +0x52b google.golang.org/grpc.(Server).handleStream(0xc000543c00, 0x2cb47b8, 0xc000683080, 0xc00125a700, 0x0) google.golang.org/grpc@v1.32.0/server.go:1517 +0xd0c google.golang.org/grpc.(Server).serveStreams.func1.2(0xc0000584a0, 0xc000543c00, 0x2cb47b8, 0xc000683080, 0xc00125a700) google.golang.org/grpc@v1.32.0/server.go:859 +0xab created by google.golang.org/grpc.(Server).serveStreams.func1 google.golang.org/grpc@v1.32.0/server.go:857 +0x1fd

Error: The terraform-provider-ibm_v1.29.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.

2023-09-28T16:37:42.833Z [DEBUG] provider: plugin exited 2023-09-28T16:37:42.834Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2023-09-28T16:37:42.834Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2023-09-28T16:37:42.849Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/null/3.2.1/linux_amd64/terraform-provider-null_v3.2.1_x5 pid=826 2023-09-28T16:37:42.851Z [DEBUG] provider: plugin exited 2023-09-28T16:37:42.870Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.29.0/linux_amd64/terraform-provider-ibm_v1.29.0 pid=876 2023-09-28T16:37:42.871Z [DEBUG] provider: plugin exited


with use of higher version plugins , the following error is observed :

Error: [ERROR] This database appears to have have 0 members. Unable to proceed

Warning: Argument is deprecated

with module.elastic79.ibm_database.elastic, on .terraform/modules/elastic79/elastic/elastic.tf line 93, in resource "ibm_database" "elastic": 93: members_memory_allocation_mb = var.elastic_data_members

use group instead

(and 17 more similar warnings elsewhere) 2023-09-28T13:51:46.349Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2023-09-28T13:51:46.365Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/ibm-cloud/ibm/1.57.0/linux_amd64/terraform-provider-ibm_v1.57.0 pid=749 2023-09-28T13:51:46.369Z [DEBUG] provider: plugin exited

====================

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

omaraibrahim commented 10 months ago

Hi @tuhincicd thank you for reaching out!

Can you please attempt your operation with the latest version of the terraform-provider? Version 1.29.0 is a couple years old and our ibm_database resources and datasources have changed quite a bit since then.

Thanks and hope you have a wonderful day!