Closed laurnts closed 1 year ago
Hey @laurnts,
I'm going to need more details for debugging this. My first thought is that something is happening between GRPC and plugin execution.
The stacktrace comes from: https://github.com/dnsimple/terraform-provider-dnsimple/blob/master/dnsimple/resource_dnsimple_zone_record.go#L162 And I would say, that data
is nil.
In the case you get blocked for too much API requests, you will receive a 429 error code.
Let's dig deeper, I would like to know:
TF_LOG
variable??Thank you!
@nestorsalceda This is the terraform and module version Terraform v1.2.9 on linux_amd64
In the case you get blocked for too much API requests, you will receive a 429 error code. This part I don't think so as I install the same terraform on another directory linked to another zone and it works just fine.
The dns records eventually get in the DNSimple (although it gets into an error), but the terraform process cannot continue
@nestorsalceda How to get the TF_LOG variable? Is it this?
In general, this issue appear only to a particular zone_name which I am using to test (create alot of subdomains) multiple times in a certain period (I am not sure if its spammy, I created around 10 subdomain per day with terraform)
Thank you @laurnts
Let me check with the API folks to make sure that is the cause. Meanwhile we can continue with the TF_LOG
issue.
I will need you to export a couple of environment variables and then run terraform apply again:
$ export TF_LOG=DEBUG
$ export TF_LOG_PATH=dnsimple.txt
$ terraform apply
And then we will be able to see what's happening under the hoods :)
Other question I have for you @laurnts is if you are using the prefetch flag:
https://registry.terraform.io/providers/dnsimple/dnsimple/latest/docs#prefetch
Set to true to enable prefetching ZoneRecords when dealing with large configurations. This is useful when you are dealing with API rate limitations given your number of zones and zone records.
Thank you!
@nestorsalceda Attached is the log file. Here I am only starting a simple webserver at Hetzner Cloud -> get the IP -> put it in DNSimple dnsimple.txt
I am currently running with the prefetch option (also the contain of this log)
I think I got it @laurnts
2022-09-14T21:38:39.870+0200 [INFO] provider.terraform-provider-dnsimple_v0.13.0: 2022/09/14 21:38:39 [DEBUG] DNSimple Record create recordAttributes: dnsimple.ZoneRecordAttributes{ZoneID:"", Type:"A", Name:(*string)(0xc0005229f0), Content:"167.235.54.136", TTL:60, Priority:0, Regions:[]string(nil)}: timestamp=2022-09-14T21:38:39.870+0200
2022-09-14T21:38:40.261+0200 [ERROR] vertex "module.dnsimple_hcloud[0].dnsimple_zone_record.primary_host" error: Failed to create DNSimple Record: POST https://api.dnsimple.com/v2/121961/zones/dev.storeframe.io/records: 400 Validation failed
For some reason, we are receiving a validation error but is not getting propagated correctly.
So next steps:
I'm going to expedite this fix and I hope I have a fix in next couple of days.
Sounds good to you?
Thank you for your help!
Hi @nestorsalceda
I think the validation 400 error is because another same zone name already exist (due to testing the panic error). So let me know if there is something else I have to look into, meanwhile I will be waiting for your response. Thank you
Hi @nestorsalceda I see that you closed the issue, but I don't think the matter is resolved.
Hi @nestorsalceda I see that you closed the issue, but I don't think the matter is resolved.
Ouch, it was automatically closed when I merged the PR. Let me to reopen.
Tomorrow I will publish a new dnsimple-go client and I will upgrade the Terraform client with 2 patches:
Thank you for your patience :)
@laurnts I just published a new version 0.14.0 that will address this issue :)
Thank you for your patience!
@nestorsalceda Ive tested it with DNSimple 0.14 but I still run into an error (same error).
Hey @laurnts
I cut a new release 0.14.1 that will avoid the panic. I thought the error were in the error propagation but I found there were a panic when using the prefetching and the record cannot be found on the prefetched list.
I will be happy to hear you feedback.
Thanks for your patience.
@nestorsalceda The new release fixes the issue with the panic, but I still run into an issue with prefetch. The subdomain get inserted into DNSimple but run into this error.
@nestorsalceda The new release fixes the issue with the panic, but I still run into an issue with prefetch. The subdomain get inserted into DNSimple but run into this error.
@nestorsalceda is there any updates for this issue?
Hey @laurnts
No at all. We fixed the panic but changing the behavior will require some extra prioritization because this may affect to other users.
My suggestion here will be to close this issue, related to the panic and open a new one as a feature request to allow modifying registries when the prefetch is enabled.
Panic Output
Anyone knows what I am dealing with here? With same code, I can deploy to another domain (zone name) It appears to me that it might be a possibility that I added too many subdomain within certain period of time which I am getting blocked. Can someone confirm this?