Closed hemanthnakkina closed 2 months ago
@hemanthnakkina we really need a small plan which reproduces this issue, not a full scale run of sunbeam.
@hmlanigan I am not able to reproduce the problem when terraform plan is applied with -parallelism=1
520-tfplan.txt
Please use the attached terraform plan and run the following command to reproduce the problem:
terraform apply -auto-approve -parallelism=4
If parallelism is reduced to 2, I am not able to reproduce.
On a side note, I see the computed attribute storage for each application is filled with all the storage details of the model (irrespective of application has storage or not). Is it expected?
Hey, the problem was in improper handling of cannot convert storage details
error. After fixing it, I was able to build sunbeam on my machine locally:
2024-07-12T14:08:24.995+0300 [TRACE] provider.terraform-provider-juju_v0.14.0: Received downstream response: diagnostic_error_count=0 diagnostic_warning_count=0 tf_req_duration_ms=5181 tf_req_id=c6494d76-b093-2e17-72c8-ceda4d4f9d3f @caller=/home/anvial/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov6/internal/tf6serverlogging/downstream_request.go:42 @module=sdk.proto tf_rpc=ApplyResourceChange tf_proto_version=6.6 tf_provider_addr=registry.terraform.io/juju/juju tf_resource_type=juju_integration timestamp="2024-07-12T14:08:24.995+0300"
2024-07-12T14:08:24.995+0300 [TRACE] provider.terraform-provider-juju_v0.14.0: Served request: @caller=/home/anvial/go/pkg/mod/github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov6/tf6server/server.go:878 tf_provider_addr=registry.terraform.io/juju/juju tf_req_id=c6494d76-b093-2e17-72c8-ceda4d4f9d3f tf_rpc=ApplyResourceChange @module=sdk.proto tf_proto_version=6.6 tf_resource_type=juju_integration timestamp="2024-07-12T14:08:24.995+0300"
2024-07-12T14:08:25.004+0300 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
juju_integration.designate-to-neutron[0]: Creation complete after 5s [id=openstack:designate:dnsaas:neutron:external-dns]
2024-07-12T14:08:25.012+0300 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2024-07-12T14:08:25.013+0300 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-07-12T14:08:25.019+0300 [INFO] provider: plugin process exited: plugin=.terraform/providers/registry.terraform.io/juju/juju/0.14.0/linux_amd64/terraform-provider-juju_v0.14.0 id=604282
2024-07-12T14:08:25.019+0300 [DEBUG] provider: plugin exited
Apply complete! Resources: 120 added, 0 changed, 0 destroyed.
Outputs:
ca-offer-url = "admin/openstack.certificate-authority"
cert-distributor-offer-url = "admin/openstack.cert-distributor"
cinder-ceph-offer-url = "admin/openstack.cinder-ceph"
keystone-endpoints-offer-url = "admin/openstack.keystone-endpoints"
keystone-offer-url = "admin/openstack.keystone-credentials"
nova-offer-url = "admin/openstack.nova"
ovn-relay-offer-url = "admin/openstack.ovn-relay"
rabbitmq-offer-url = "admin/openstack.rabbitmq"
┌─[±][test_branch ?:2 ✗][sunbeam-terraform][]
I'll prepare the PR right now.
Description
Panic when running terraform plan that has storage_directives
Urgency
Blocker for our release
Terraform Juju Provider version
0.13.0-rc1
Terraform version
1.9.1
Juju version
3.5.2
Terraform Configuration(s)
Reproduce / Test
Debug/Panic Output
Notes & References
The terraform plan has storage_directives where application mysql has storage_directives set explicitly with values in terraform.tfvvars.json. Some other applications like keystone, glance, ovn has storage_directives as {} to pick the defaults from charm metadata.yaml. The plan is applied with default parallelism.