• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Add DNS records via API bug?

Matthew James

Basic Pleskian
Hi,

I am using the API to add DNS records however when adding records, the serial number is updated for every single record that's added, rather than once per XML request - surely this isn't correct?

This would mean If I were to add say 50 records and then delete them all and add 50 records again, I wouldn't be able to do any more DNS updates until the next day.

Is this the intended behaviour or is it a bug?

Thanks
 
I have forwarded your question to developers for clarification. I will update this thread with their answer as soon as I receive it.
 
I have received following information from developers:

I've checked the issue on PPP 9.2.3 for Unix and found that every DNS record from API-RPC request is added to DNS zone independently, so the serial number in SOA record is updated for every record, not for the whole API-RPC request.

Currently no custom fix for the issue is available because it will require to redesign this functionality in API-RPC.
 
Hi,

Thanks for the update, do you know if it's likely to get fixed any time soon?

This is causing a big problem for me because it seems, when the serial number is updated in quick succession that notifies are not sent correctly to the secondary nameserver therefore it does not receive all the updated records correctly.

This is probably a BIND issue, but I haven't been able to find a way around it.

Thanks
 
Not sure that it will be done soon, because:

Currently no custom fix for the issue is available because it will require to redesign this functionality in API-RPC.
 
Ok, it's not too much of a problem if I can get BIND to send all the notifies when the zone is updated, can you advise a way to get this to work correctly.

Currently it seems that the notifies do not queue up, resulting in them all not being sent.
 
I have forwarded your question to developers. Let's wait their answer.
 
Reported problem still under developer's investigation. I have no any ETA when it can be fixed.
 
This is a shame, as it's causing a major problem for me - nobody can update DNS records due to replication to secondary nameserver being out of sync.

If you update the records via Plesk directly, it works fine. I think this is because you make all the updates to the records and then you click the "update" button which just submits it once rather than once for every record like the API does.

I'm sure this can't be too hard for the developers to fix, just moving the command that does the update to after the loop rather than inside it at a guess.
 
I have received following comments from developers:


Plesk supports two dns zone serial formats:
1. UNIXTIMESTAMP.
2. YYYYMMDDNN - recommended by IETF and RIPE.

This would mean If I were to add say 50 records and then delete them all and add 50 records again, I wouldn't be able to do any more DNS updates until the next day.
This is an actual problem for YYYYMMDDNN format. But you can switch to UNIXTIMESTAMP format and get 86400 values for one day. It can be done at 'Domain -> DNS Settings -> SOA record' page in CP.

This is causing a big problem for me because it seems, when the serial number is updated in quick succession that notifies are not sent correctly to the secondary nameserver therefore it does not receive all the updated records correctly.
Plesk updates only primary DNS server, but not secondary.

This is probably a BIND issue, but I haven't been able to find a way around it.
Probably, yes.

Ok, it's not too much of a problem if I can get BIND to send all the notifies when the zone is updated, can you advise a way to get this to work correctly. Currently it seems that the notifies do not queue up, resulting in them all not being sent.
We can advise, if you will provide more detailed information about DNS servers configuration.
 
Thanks for the information.

Thinking about it, when you click the "update" button in Plesk for a DNS zone after making updates to it, does this run a script on the server that actually does the update that I'd be able to run from command line?

If so, I'm thinking one workaround would be to run the usual stuff through the API and then run this script afterwards to tell it update the zone, hence then syncing all the records and serial correctly.

Would it be possible to do this, if so, which script is it?
 
I have actually found a temporary solution:

/usr/local/psa/bin/dns --on domain

Seems to send a notify to the secondary nameserver which puts it back in sync.

Whilst this workaround kind of works for now, I still think this issue does need addressing :)
 
Back
Top