oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
758 stars 676 forks source link

Poor terraform performance after creating a DRG on a PCA #1920

Open lawa1974 opened 1 year ago

lawa1974 commented 1 year ago

Community Note

Terraform Version and Provider Version

Terraform v1.3.6
on linux_amd64
+ provider registry.terraform.io/hashicorp/oci v5.2.1

It's the same behaviour with v5.4.0

Affected Resource(s)

affected_resources = oci_core_drg

Terraform Configuration Files

resource "oci_identity_compartment" "cmp-uln" {
  compartment_id = var.tenancy_ocid
  name           = "cmp-uln"
  description    = "ULN-Mirror compartment"
  enable_delete  = true
}

resource "oci_core_vcn" "vcn-uln" {
  compartment_id = oci_identity_compartment.cmp-uln.id
  display_name   = "vnc-uln"
  cidr_blocks    = ["10.0.0.0/16"]
}

resource "oci_core_drg" "drg_uln_test" {
   compartment_id = oci_identity_compartment.cmp-uln.id
   display_name   = "drg-uln-test"
}

Debug Output


2023-07-13T14:00:30.448Z [INFO]  Starting apply for oci_core_drg.drg_uln_test
2023-07-13T14:00:30.449Z [DEBUG] oci_core_drg.drg_uln_test: applying the planned Create change
2023-07-13T14:00:30.449Z [TRACE] GRPCProvider: ApplyResourceChange
2023-07-13T14:00:30.449Z [INFO]  provider.terraform-provider-oci_v5.2.1: 2023/07/13 14:00:30 [DEBUG] setting computed for "default_drg_route_tables" from ComputedKeys: timestamp=2023-07-13T14:00:30.449Z
2023-07-13T14:00:30.449Z [INFO]  provider.terraform-provider-oci_v5.2.1: 2023/07/13 14:00:30 [DEBUG] setting computed for "freeform_tags" from ComputedKeys: timestamp=2023-07-13T14:00:30.449Z
2023-07-13T14:00:31.017Z [INFO]  provider.terraform-provider-oci_v5.2.1: 2023/07/13 14:00:31 [DEBUG] Waiting for state to become: [AVAILABLE]: timestamp=2023-07-13T14:00:31.017Z
2023-07-13T14:00:34.824Z [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/hashicorp/oci\"] (close)"
2023-07-13T14:00:34.825Z [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/oci\"] (close)" is waiting for "oci_core_drg.drg_uln_test"
2023-07-13T14:00:39.825Z [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/hashicorp/oci\"] (close)"
2023-07-13T14:00:39.825Z [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/oci\"] (close)" is waiting for "oci_core_drg.drg_uln_test"
[0m[1moci_core_drg.drg_uln_test: Still creating... [10s elapsed][0m[0m2023-07-13T14:00:44.825Z [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/oci\"] (close)" is waiting for "oci_core_drg.drg_uln_test"
2023-07-13T14:00:44.825Z [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/hashicorp/oci\"] (close)"
2023-07-13T14:00:49.825Z [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/hashicorp/oci\"] (close)"
2023-07-13T14:00:49.825Z [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/oci\"] (close)" is waiting for "oci_core_drg.drg_uln_test"
[0m[1moci_core_drg.drg_uln_test: Still creating... [20s elapsed][0m[0m
2023-07-13T14:00:54.826Z [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/oci\"] (close)" is waiting for "oci_core_drg.drg_uln_test"
...
...
[0m[1moci_core_drg.drg_uln_test: Still creating... [2m0s elapsed][0m[0m
2023-07-13T14:02:34.835Z [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/oci\"] (close)" is waiting for "oci_core_drg.drg_uln_test"
2023-07-13T14:02:34.835Z [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/hashicorp/oci\"] (close)"
2023-07-13T14:02:35.961Z [INFO]  provider.terraform-provider-oci_v5.2.1: 2023/07/13 14:02:35 [DEBUG] BaseCrud.setState: state: "AVAILABLE": timestamp=2023-07-13T14:02:35.961Z

Expected Behavior

When creating a Dynamic Routing Gateway (DRG) in the PCA Compute Enclave through the web interface, it takes approximately 10 seconds. However, when attempting to create a DRG using Terraform, it consistently takes over 2 minutes. Once the DRG is created, all subsequent "terraform apply" runs take longer than before. It appears that there is a waiting period for something during these runs, causing the performance of Terraform to degrade from that point onwards. Similarly, deleting the DRG takes about 2 minutes, and once the DRG is deleted, the Terraform runs return to normal execution times.

Actual Behavior

Poor terraform performance when the DRG is created.

Steps to Reproduce

Create the above resources with terraform on a Oracle Private Cloud Appliance (PCA)

tf-oci-pub commented 1 year ago

Thank you for reporting the issue. We have raised an internal ticket to track this. Our service engineers will get back to you.

lschubert commented 1 year ago

Is there any status update on this, please?

eikstang commented 9 months ago

similar issue here. any update?