-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Linode DNS Pagination Bug "Domain does not exist" #4956
Comments
Please upgrade to the latest code and try again first. Maybe it's already fixed. |
Another option would be to make the API query return only the desired domain (instead of listing all domains and going through the results): _get_root() {
domain="$1"
#...
# line 135 below:
if _H4="X-Filter: {\"domain:\":\"$domain\"}" _rest GET; then I think this way it fixes the pagination issue. Can you test? |
didn't work unfortunately
|
Ops, sorry. There's a typo in the line I wrote. There's an invalid extra ':' character in the filter. The correct one is: if _H4="X-Filter: {\"domain\":\"$domain\"}" _rest GET; then The reasoning of the above is, whenever you run on command line:
it will return just the desired domain. Can you please try again? |
good catch, although although I hardcoded it to _get_root() {
domain=$1
i=2
p=1
_debug domain $domain
domainfix=$(printf "%s" "$domain" | cut -d . -f $i-100)
_debug domainfix $domainfix
if _H4="X-Filter: {\"domain\":\"$domainfix\"}" _rest GET; then |
Ok. Though reading the code again, this would work only for third level records. For higher level records, e.g. For it to work in all cases the |
fixes issue acmesh-official#4956 previous code only worked for the first 10 domains on the account (as Linode API returned a paginated response, with only 10 records). This change makes an exact search query for each subdomain, completely removing any need for walking through paginated responses. What makes it work for large accounts with any number of domains.
fixes issue acmesh-official#4956 previous code only worked for the first 10 domains on the account (as Linode API returned a paginated response, with only 10 records). This change makes an exact search query for each subdomain, completely removing any need for walking through paginated responses. What makes it work for large accounts with any number of domains.
Linode DNS will return
Domain does not exist.
if the domain does not exist in the first page of results.My domain is contained on page 2 of 3 and only the first page is checked.
curl -H "Authorization: Bearer TOKEN" https://api.linode.com/v4/domains
Changing the
GET
URL tohttps://api.linode.com/v4/domains?page_size=500
resolves my issue but does not resolve the pagination issue.dnsapi/dns_linode_v4.sh
The text was updated successfully, but these errors were encountered: