Closed nstuyvesant closed 8 years ago
Hey @nstuyvesant , thanks for submitting this issue.
I honestly never tried to use the '@' notation. I assumed it to just work, but maybe there's some protection mechanism from GoDaddy or they simply use something else to reference to the main domain (maybe just an empty string?). I need to investigate more on this side.
For what regards your second point, It's probably the IP cache kicking in and avoiding to send the request to GoDaddy. So just to make this a little bit cleaner (the documentation maybe goes too short on this part), let me explain what happens exactly behind the scenes:
When you use the command the first time, it detects the public IP of your machine and it stores that into a temp file (you can see the default location of this file by using the --help
option). The next time you invoke the command it compares your current public IP with your cached one. If it is the same, it assumes there's no need to update the DNS, so the request to GoDaddy API isn't triggered at all.
At this stage, if you want to force a request anyway, you can either delete the cache file or use the --ipfile
option to specify a different cache file.
I should probably change something here to allow the refresh mechanism and the IP cache to be more understandable and easy to use.
I have three options in mind:
--force
o --no-cache
option that, when set, ignores the IP cache file and always trigger the request to the API server (easy to implement);--ipfile
option. (a bit harder to implement, but more flexible);--force
or --no-cache
option to override the configuration easily in the case it's needed for a specific run (harder implementation, but definitely the most flexible and probably the easiest to use from a user perspective). At this stage I am more inclined to implement the third option, but feel free to let me know your thoughts on this!
Here's the relevant line from my JSON: "records": [{"type": "A", "name": "@", "ttl": 600}]
$ godaddy-dns [Sat May 21 2016 13:40:35 GMT-0400 (EDT)] Failed request to GoDaddy Api Another record with the same attributes already exists
When I changed "@" to "foo", it created the A record with no problem.
Also noticed that if I change the IP of "foo" on GoDaddy's website to something bogus then re-rerun godaddy-dns, it does not update the IP address and there is no error message.