CiscoDevNet / terraform-provider-aci

Terraform Cisco ACI provider
https://registry.terraform.io/providers/CiscoDevNet/aci/latest/docs
Mozilla Public License 2.0
88 stars 101 forks source link

Still creating when more than 6 items #29

Closed hakras closed 4 years ago

hakras commented 4 years ago

Hello,

I am experiencing a strange issue that I cannot figure out. I am using Terraform version 0.12.20 and ACI Provider version 0.2.0. It seems that if the plan has more than 6 items it hangs on "Still creating". I have left it for over an hour and it doesn't complete. I have tried many different variations of code and run into this issue again and again. If I force stop the plan and run it again, it sometimes completes. I have tried just creating 8 empty tenants and get "Still creating". If I create 6 empty tenants, it works fine. I even changed to another system in a different network and the issue persists. I have output the log using LOG="DEBUG" and TF_LOG_PATH="log.txt", but nothing pops out different between a plan that works and a plan that hangs.

Bullenj01 commented 4 years ago

Same Terraform v12.24 ACI v2.0

Everything worked fine while I was building but after running a destroy and apply it only creates around 9 items. It never errors out on the same object. I'm using cert based auth and parallelism =1

terraform output:

Do you want to perform these actions in workspace "dev"? Terraform will perform the actions described above. Only 'yes' will be accepted to approve.

Enter a value: yes

aci_tenant.dev: Creating... aci_tenant.dev: Creation complete after 2s [id=uni/tn-dev] aci_vrf.public: Creating... aci_vrf.public: Creation complete after 1s [id=uni/tn-common/ctx-dev-public] aci_vrf.main: Creating... aci_vrf.main: Creation complete after 1s [id=uni/tn-common/ctx-dev-main] aci_application_profile.credit-dmz: Creating... aci_application_profile.credit-dmz: Creation complete after 1s [id=uni/tn-dev/ap-10.233.246.0_24] aci_application_profile.legacy-dmz: Creating... aci_application_profile.legacy-dmz: Creation complete after 1s [id=uni/tn-dev/ap-10.130.83.0_24] aci_application_profile.test: Creating... aci_application_profile.test: Creation complete after 1s [id=uni/tn-dev/ap-10.223.71.0_24] aci_application_profile.credit: Creating... aci_application_profile.credit: Creation complete after 1s [id=uni/tn-dev/ap-10.223.140.0_24] aci_application_profile.shared-services: Creating... aci_application_profile.shared-services: Creation complete after 1s [id=uni/tn-dev/ap-10.233.75.0_24] aci_application_profile.store-vm: Creating... aci_application_profile.store-vm: Creation complete after 1s [id=uni/tn-dev/ap-10.233.100.0_24] aci_application_profile.private: Creating... aci_application_profile.private: Still creating... [10s elapsed] aci_application_profile.private: Still creating... [20s elapsed] aci_application_profile.private: Still creating... [30s elapsed] aci_application_profile.private: Still creating... [40s elapsed] aci_application_profile.private: Still creating... [50s elapsed] aci_application_profile.private: Still creating... [1m0s elapsed] aci_application_profile.private: Still creating... [1m10s elapsed] aci_application_profile.private: Still creating... [1m20s elapsed] aci_application_profile.private: Still creating... [1m30s elapsed] aci_application_profile.private: Still creating... [1m40s elapsed] aci_application_profile.private: Still creating... [1m50s elapsed] aci_application_profile.private: Still creating... [2m0s elapsed] aci_application_profile.private: Still creating... [2m10s elapsed] aci_application_profile.private: Still creating... [2m20s elapsed] Interrupt received. Please wait for Terraform to exit or data loss may occur. Gracefully shutting down... Stopping operation...

nkatarmal-crest commented 4 years ago

@Bullenj01 Can you please share your .tf files? I am working on this provider, i tried to re-produce this issue in my environment but i am not able to re-produce it. I am able to create 54 resources in one go, with or without parallelism flag. Using both the Authentication methods. Also which OS you are using?

hakras commented 4 years ago

@nkatarmal-crest , I can do something simple like create 5 blank tenants and it will create them flawlessly. If I destroy and modify the tf file to create 8 blank tenants, it will create 6 and go into a "Still creating" message. I am running Terraform from Windows.

Bullenj01 commented 4 years ago

confirmed its a windows thing. from linux I can deploy no problem

hakras commented 4 years ago

Running the code from a Linux system worked as expected. Thanks!

francesco-supportlan commented 4 years ago

Hi,

I have the same issue. I'm creating several aci_access_port_selector and it keeps saying still creating after around 45 ports. I'm running different modules. 1st one goes through, 2nd one as well and I'm getting this message at the 3rd module. In debug mode I don't see anything wrong. Tried with a linux machine and macOS. Tested with user/password and certificate authentication. By the way, when using certificate based authentication, aci_rest resource returns bad request. This means, I need to create a dedicated modules for all rest_api resources and add a specific aci provider to use user/password.

Attached my terraform files. terraform_project.zip

nkatarmal-crest commented 4 years ago

@hakras @francesco-supportlan @Bullenj01 Can you guys run the plan with Provider version 0.2.1? I was able to create all the resource for the code mentioned by @francesco-supportlan .

francesco-supportlan commented 4 years ago

It seems working now but let me do more testing and come back asap

Bullenj01 commented 4 years ago

Confirmed working in 0.2.1. Created 30 resources in one shot

nkatarmal-crest commented 4 years ago

Cool i am closing this issue.