-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Feature request: Add Linode as a DNS provider #143
Comments
Hey there, can you please try with I went the long route for some reason. You should just have to specify your It's not tested though, so it might not work the first time 😉 |
Thanks for the quick add! I deployed the image and it properly detected my current settings, which is great! I can force changes in my config if you'd like to test these 2 use cases before merging in? Thanks again! |
Yes that would be appreciated! 🎖️ And also thanks for the PR review!
You can set your A record to And you can remove the A record and see if the updater creates it on its update period. But don't worry too much if that's troublesome, we can just 'assume' it works and someone can create an issue if it doesn't. It's also related to #129 which is not supported for all the other DNS for now. |
I updated my A record in the Linode manager to point to 127.0.01, and an hour later, the record still hasn't been updated back. Config from docker compose: ddns-updater:
container_name: ddns
image: qmcgaw/ddns-updater:linode
restart: unless-stopped
networks:
- default
ports:
- 8082:8082/tcp
volumes:
- ${CONFIG}/config/ddns/data:/updater/data
environment:
- CONFIG={"settings":[{"provider":"linode","domain":"${LINODE_DOMAIN}","host":"${LINODE_HOST}","token":"${LINODE_TOKEN}","ip_version":"ipv4"}]}
- PERIOD=15m
- UPDATE_COOLDOWN_PERIOD=10m
- IP_METHOD=cycle
- IPV4_METHOD=cycle
- IPV6_METHOD=cycle
- HTTP_TIMEOUT=30s
# Web UI
- LISTENING_PORT=8082
- ROOT_URL=/ Logs:
Any more info you need from me? |
🤔 Strange what do you get with |
Just saw a new error come through on the dashboard:
|
That error totally makes sense, silly me. By the way is the error not showing the Docker logs as well? 🤔 Anyway, I just pushed a fix in 7aac7ef the image is now updated (only for |
I did eventually get errors in the docker log, but one of the values was off:
The provider is listed as luadns even though I've set linode as my provider |
Ahh, actually the DDNS UI is saying that the A record has been updated, but the record is not actually updated in Linode
Maybe because the provider is luadns? |
Sorry, one more thing I spotted - I set my config in docker-compose to check my IP address every 15 mins, but it looks like it is being checked every 1 min?
My docker-compose config is in a comment above After attempting to set the new IP, I also didn't get a cool down of 10m as set in my config above |
That's just an error in the display as you pointed out in the code review 😉 I fixed it.
That is just the healthcheck doing:
It doesn't do an update. Although now that you're saying it, making it quieter would be an idea too.
I pushed some additional commits which:
Please |
I realized this morning what happened - the A record for my main domain got updated instead of the sub domain that I wanted to be updated I have a domain entry for example.com (domain id 123) Within this entry I have A records for example.com (record id 456) and (subdomain.example.com ( record id 789) The record id for 456 was updated when 789 should have been updated! |
Oh ok, I think I might had forgotten to filter records with the host in my code... God I need more unit testing but my weekend coding is lazy 😄 I'll fix it this evening, thanks for your patience! |
Thanks! Im also curious:
Why do the lookup if we're not going to act on this info? Couldn't we limit the lookup to once every "x configured" minutes and act on it then if something has changed? |
Alright it's now fixed, indeed I forgot to filter on the host. About the healthcheck, it only:
And these two operations are 'free' (= you won't get banned), so it runs every 60 seconds. The 'update' mechanism related with the
Now if the healthcheck fails, that's essentially to let the user know something's wrong with for example the authentication etc. You can also configure your container to restart when being unhealthy for example. On the other hand, I removed the |
ok that makes sense, thanks for the explanation! Just tested the updater, and the IP updater is now working as expected. I changed the IP on Linode to 127.0.0.1, recreated the ddns container, and it correctly updated it to my current IP address, with the correct logs in However, when I stopped the container, removed my A record and started the container again, it didn't create the A record from scratch. Nothing in docker logs. Maybe because of the cooldown period? Or maybe the DNS has been cached. Either way, I'll leave the container running for another hour to see if the A record is recreated. On another minor minor note, the docker logs have a variable in them - not sure if it's because this is a separate build away from
|
Looks like it detects that the record is missing, and tries creating it, but nothing has appeared in my admin panel. No other logs underneath either. I'm also not sure where the 127.0.0.1 has come from, since the record doesn't exist at all - maybe a default value? On the ddns webpage, the status has been set as |
Normally it doesn't log anything except if there is an error or warning. However, for now I just check we get a
Yes that could be why you still see
Well that is definitely useful, I already had that mistake in 4 repositories and was about to add it to like 10 more 😄 Thanks!! |
This is the new line I see in my logs now! |
Can yoi the try again? Newer image should print the json received 🤔 |
{
"data": [
{
"id": 333,
"type": "A",
"name": "",
"target": "1.2.3.4",
"priority": 0,
"weight": 0,
"port": 0,
"service": null,
"protocol": null,
"ttl_sec": 0,
"tag": null,
"created": "2014-03-01T21:31:50",
"updated": "2021-01-18T07:15:55"
},
{
"id": 888,
"type": "CNAME",
"name": "*",
"target": "***.com",
"priority": 0,
"weight": 0,
"port": 0,
"service": null,
"protocol": null,
"ttl_sec": 0,
"tag": null,
"created": "2021-01-11T05:57:09",
"updated": "2021-01-11T05:57:09"
},
{
"id": 999,
"type": "A",
"name": "***",
"target": "5.6.7.8",
"priority": 0,
"weight": 0,
"port": 0,
"service": null,
"protocol": null,
"ttl_sec": 0,
"tag": null,
"created": "2014-03-01T21:31:50",
"updated": "2014-03-01T21:31:50"
},
{
"id": 101010,
"type": "A",
"name": "***",
"target": "9.0.1.2",
"priority": 0,
"weight": 0,
"port": 0,
"service": null,
"protocol": null,
"ttl_sec": 0,
"tag": null,
"created": "2020-01-13T01:34:00",
"updated": "2021-01-11T05:17:19"
},
{
"id": 111,
"type": "A",
"name": "***",
"target": "3.4.5.6",
"priority": 0,
"weight": 0,
"port": 0,
"service": null,
"protocol": null,
"ttl_sec": 0,
"tag": null,
"created": "2014-03-01T21:31:50",
"updated": "2014-03-01T21:31:50"
}
],
"page": 1,
"pages": 1,
"results": 5
} There were a few other MX and TXT records which I've removed. |
Oh god, silly me... That's what happens when you copy pasta! Should be fixed now I think. |
That did it! A record was created from scratch and the correct JSON payload was received back :) |
Great! Merging in |
What's the feature?
Please add Linode as a DNS provider
Extra information?
personalAccessToken
- it will be 64 chars. Assign it thedomain
permissionsdomainId
andrecordId
for the A record you want to update. I did this by inspecting the network tab as I manually updated the record. They will both be integersPUT
request to update the record when your IP changes. Here is the JS to do so:On success, a JSON response with the updated A record will be returned to you.
Thanks so much!
The text was updated successfully, but these errors were encountered: