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

Allow parallelism #3

Open
heitmanr opened this issue Jan 31, 2022 · 0 comments
Open

Allow parallelism #3

heitmanr opened this issue Jan 31, 2022 · 0 comments

Comments

@heitmanr
Copy link

System Information

I'm using a terraform-module:

  • it creates a vsphere-VM

This VM uses dynamic/DHCP for it's management-IP.

So your module seems to be perfect to pre-populate my OPNSense-Lab-Firewall with DHCP and DNS entries.

If I use the module twice, for two VM-instances, it breaks...

for example

c:\ terraform apply
...
╷
│ Error: mapping doesn't exists for this MAC address
│
│   with module.vcenter-v.opnsense_dhcp_static_map.vcsa-dhcp,
│   on ..\#modules\vsphere-vcenter\42-vcenter-static-dhcp-ip.tf line 8, in resource "opnsense_dhcp_static_map" "vcsa-dhcp":
│    8: resource "opnsense_dhcp_static_map" "vcsa-dhcp" {
│
╵
╷
│ Error: host override entry doesn't exists
│
│   with module.vcenter-v.opnsense_dns_host_override.vcsa-dns,
│   on ..\#modules\vsphere-vcenter\42-vcenter-static-dhcp-ip.tf line 15, in resource "opnsense_dns_host_override" "vcsa-dns":
│   15: resource "opnsense_dns_host_override" "vcsa-dns" {
│
╵
╷
│ Error: host override entry doesn't exists
│
│   with module.vcenter-t.opnsense_dns_host_override.vcsa-dns,
│   on ..\#modules\vsphere-vcenter\42-vcenter-static-dhcp-ip.tf line 15, in resource "opnsense_dns_host_override" "vcsa-dns":
│   15: resource "opnsense_dns_host_override" "vcsa-dns" {
│
╵

Sometimes, DHCP and/or DNS-Entries get created, so after a dozen "terraform apply"-rounds all entries are there.

Since both modules get created in parallel:

  • the terraform-provider-opnsense has two TCP/HTTPs-Sessions open towards the Firewall
    I suspect some parts in the code blocking each other.

Sometimes, it seems to end in an infinite loop:

c:\ terraform apply
...
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [20s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [30s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [40s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [50s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [1m0s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [1m10s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [1m20s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [1m30s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [1m40s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [1m50s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [2m0s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [2m10s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [2m20s elapsed]
module.vcenter-v.opnsense_dns_host_override.vcsa-dns: Still creating... [2m30s elapsed]
Stopping operation...

Interrupt received.
Please wait for Terraform to exit or data loss may occur.
Gracefully shutting down...


Two interrupts received. Exiting immediately. Note that data loss may have occurred.

╷
│ Error: operation canceled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant