Bug 691023

Summary: master sends wrong serial to slave
Product: [Fedora] Fedora EPEL Reporter: Vasiliy G Tolstov <v.tolstov>
Component: pdnsAssignee: Morten Stevens <mstevens>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el5CC: mstevens, ruben
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-26 17:45:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vasiliy G Tolstov 2011-03-26 08:50:15 UTC
Description of problem:
I have ptr record in mysql database. Current info from first and second ns servers:

dig @ns1.clodo.ru  238.127.188.in-addr.arpa SOA
238.127.188.in-addr.arpa. 86400	IN	SOA	ns1.clodo.ru. clodo.clodo.ru. 3534744392 3600 600 86400 3600

dig @ns2.clodo.ru  238.127.188.in-addr.arpa SOA
238.127.188.in-addr.arpa. 86400	IN	SOA	ns1.clodo.ru. clodo.clodo.ru. 3534744390 3600 600 86400 3600


When i try notify slave, that zone changes i see in slave log:
Mar 26 11:46:26 monitoring pdns[16436]: Received NOTIFY for 238.127.188.in-addr.arpa from master 188.127.236.4, we are up to date: 2147483647<=3534744390

And zone not updated.
I thinks this related to bug, fixed in http://wiki.powerdns.com/trac/changeset/2077/trunk/pdns/pdns/slavecommunicator.cc



Version-Release number of selected component (if applicable):
2.9.22-3.el5

How reproducible:
install pdns and have very big serial in database

Steps to Reproduce:
1.
2.
3.
  
Actual results:
failed to update slave

Expected results:
seccuseful update slave

Additional info:

Comment 1 Ruben Kerkhof 2011-03-26 12:52:15 UTC
What is the column type of the serial in your database schema?
Making it an unsigned int should help.

Comment 2 Vasiliy G Tolstov 2011-03-26 16:04:23 UTC
on master:

       Table: domains
Create Table: CREATE TABLE `domains` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `master` varchar(128) DEFAULT NULL,
  `last_check` int(11) DEFAULT NULL,
  `type` varchar(6) NOT NULL,
  `notified_serial` int(11) DEFAULT NULL,
  `account` varchar(40) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name_index` (`name`)
) ENGINE=MyISAM AUTO_INCREMENT=41342 DEFAULT CHARSET=latin1


on slave:

CREATE TABLE domains (
              id                INTEGER PRIMARY KEY,
              name              VARCHAR(255) NOT NULL COLLATE NOCASE,
              master            VARCHAR(128) DEFAULT NULL,
              last_check        INTEGER DEFAULT NULL,
              type              VARCHAR(6) NOT NULL,
              notified_serial   INTEGER DEFAULT NULL, 
              account           VARCHAR(40) DEFAULT NULL
            );

Comment 3 Ruben Kerkhof 2011-03-26 16:14:13 UTC
Ok, you might want to change the notified_serial column to unsigned integer, since the integer can overflow when it gets too big.

Comment 4 Vasiliy G Tolstov 2011-03-26 16:19:43 UTC
In master and slave?

Comment 5 Ruben Kerkhof 2011-03-26 22:13:44 UTC
Yes, both.

Comment 6 Vasiliy G Tolstov 2011-03-28 06:36:47 UTC
(In reply to comment #5)
> Yes, both.

Chage for both servers - this not close the problem.
After changing schema and setting new serial of SOA record slave recieves wrong serial from master

Mar 28 10:34:04 monitoring pdns[15311]: Received NOTIFY for 238.127.188.in-addr.arpa from 188.127.236.4, we are up to date: 2147483647<=3534744394

(master SOA 238.127.188.in-addr.arpa. 86400	IN	SOA	ns1.clodo.ru. clodo.clodo.ru. 3534744395 3600 600 86400 3600 )

(slave SOA 238.127.188.in-addr.arpa. 86400	IN	SOA	ns1.clodo.ru. clodo.clodo.ru. 3534744394 3600 600 86400 3600)

Comment 7 Ruben Kerkhof 2011-03-28 07:20:49 UTC
Is the change_date column for the SOA record higher on the master then it is on the slave?

Comment 8 Vasiliy G Tolstov 2011-03-28 07:32:53 UTC
Master and slave has 0 on this. After change in master to 1, nothing changed

Mar 28 11:32:13 monitoring pdns[15311]: Received NOTIFY for 238.127.188.in-addr.arpa from 188.127.236.4, we are up to date: 2147483647<=3534744394

Comment 9 Ruben Kerkhof 2011-03-28 07:53:48 UTC
Ok, then I have no idea what's wrong.

Would you mind posting your issue on the powerdns mailing list?

Comment 10 Vasiliy G Tolstov 2011-03-28 08:00:15 UTC
I'm already do this see link
http://wiki.powerdns.com/trac/ticket/96#comment:2

Comment 11 Ruben Kerkhof 2011-03-28 08:03:43 UTC
Ah, I didn't know that was you :)

I'll see if I can backport this change to 2.9.22

Comment 12 Vasiliy G Tolstov 2011-03-29 06:35:13 UTC
(In reply to comment #11)
> Ah, I didn't know that was you :)
> 
> I'll see if I can backport this change to 2.9.22

Sorry, but when You can try to backport this?

Comment 13 Ruben Kerkhof 2011-03-29 10:05:54 UTC
I'm pretty busy atm, but somewhere this week.

I've been thinking about this some more, and something doesn't make sense.
If you've converted the column on your slave the serial on your slave should be lower than the master. What's the serial in the slave db? Have you tried restarting the slave, maybe it's caching the SOA records.

Comment 14 Vasiliy G Tolstov 2011-03-29 10:27:38 UTC
I'm try to completely destroy slave db and says master to notify slave about all zones - problem stays...

Comment 15 Morten Stevens 2012-10-26 17:45:42 UTC
Fixed in: pdns-3.1-1.el6

https://admin.fedoraproject.org/updates/pdns-3.1-1.el6