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

Apply for namecheap_record does not apply and doesn't time out #16

Closed
nicoleyson opened this issue Mar 29, 2019 · 10 comments
Closed

Apply for namecheap_record does not apply and doesn't time out #16

nicoleyson opened this issue Mar 29, 2019 · 10 comments

Comments

@nicoleyson
Copy link

Terraform Version

Terraform v0.11.13

Affected Resource(s)

namecheap_record

Terraform Configuration Files

resource "namecheap_record" "subdomain" {
  count   = "${length(var.subdomains)}"
  domain  = "${var.domain}"
  name    = "${element(var.subdomains,count.index)}"
  address = "partners.vacasa.com"
  type    = "CNAME"
}

Debug Output

Still creating... (45m31s elapsed)

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.
No panic, attempting to create for 45 minutes

Expected Behavior

Either it times out or creates the record

Actual Behavior

What actually happened?
I tried to apply one namecheap_record resource, and has been hanging on Still creating... for 45 minutes.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Are there anything atypical about your accounts that we should know?

Using a sandbox account, hesitant to try on production.

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
Unsure if this is related-
#13

@adamdecaf
Copy link
Collaborator

It could be related to #13, but what version of the namecheap provider are you using? I fixed a bug that sounds very similar to yours in 1.2.0.

https://github.com/adamdecaf/terraform-provider-namecheap/releases/tag/1.2.0

@adamdecaf
Copy link
Collaborator

@nicoleyson Did you figure this out? Need some help?

@OGProgrammer
Copy link
Contributor

IP probably isn't whitelisted but I do have concerns with how slow this is. We should contact Namecheap about the throttling and work with them on a way to fix/raise that. I have not been hitting the Retry parts but I am managing 30+ domains with this and watching terraform build the apply/plan seems to fetch domain info serially. Perhaps we can async these calls within reason (under whatever Namecheap comes back as us with). You could argue I shouldn't use it for so many domains but with route_53 I bet it would be way faster than this. It still gets the job done, just have a feeling there is room for improvement somewhere still. Do you work at Namecheap @adamdecaf or know someone?

@adamdecaf
Copy link
Collaborator

I don't work at Namecheap and don't know anyone who does. IIRC their API didn't handle concurrent requests. Maybe they have a newer API that does?

What version are you on? I lowered the retry sleep interval, which helped speed up applys after an error. I can make a RC version to try -- it'll be on Terraform 0.12 though.

@nicoleyson
Copy link
Author

nicoleyson commented May 21, 2019

Oops sorry, I missed these notifications!
Thank you so much for checking in on this, @adamdecaf !!!

I am no longer using this provider because of this bug, but looking at my commit history... my makefile looked like this:

install:
	mkdir -p ~/.terraform.d/plugins/
        curl -L  https://github.com/adamdecaf/terraform-provider-namecheap/releases/download/1.2.0/terraform-provider-namecheap-osx-amd64 > ~/.terraform.d/plugins/terraform-provider-namecheap_v1.2.0 

So definitely 1.2.0.

With regards to whitelisting, I believe I was using a combination of

data "http" "host_ip" {
  url = "https://ipv4.icanhazip.com"
}

and ${chomp(data.http.host_ip.body)} to get the ip and I ensured I whitelisted the relevant IP in namecheap as well.

@adamdecaf
Copy link
Collaborator

Okay, sounds like the performance is definitely an issue. I hope the next release, which upgrades to Terraform 0.12 when Hashicorp releases it, will be faster for everyone.

@adamdecaf
Copy link
Collaborator

1.3.0 of this provide has been released. Does that improve the performance for you at all?

@OGProgrammer
Copy link
Contributor

Def see an improvement , thanks adam

@adamdecaf
Copy link
Collaborator

Thanks. Feel free to ping this issue or open a new one with other problems.

@cu12
Copy link

cu12 commented Oct 11, 2019

Sorry to comment on a closed issue, but I think this could be useful for you too. This also could be due to the amount of DNS records you are trying to add, limit is 150.

Error on the interface, looks like this, when you reached the limit:

Error occured: Too many host records, not supported by DNS System V2. Maximum number of records supported by DNS System V2 is 150. Please delete the extra records from All Host Records page and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants