Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th January 2010, 21:40
Uvigii Uvigii is offline
Junior Member
 
Join Date: Aug 2006
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default DNS Replication

2 (or more) ISPC3. Updates on 1st are propagated to all MyDNS. Need testing and feedback.
I've change the following (on the slave server):
/etc/mydns.conf
Code:
soa-where = server_id = X
rr-where =  server_id = X
Code:
soa-where = server_id = 1
rr-where =  server_id = 1
/usr/local/ispconfig/server/server.php
Code:
 // Check if there is anything to update
        $tmp_rec = $app->dbmaster->queryOneRecord("SELECT count(server_id) as number from sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]." OR server_id = 0)");
Code:
 // Check if there is anything to update
        $tmp_rec = $app->dbmaster->queryOneRecord("SELECT count(server_id) as number from sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]." OR server_id=1 OR server_id = 0)");
/usr/local/ispconfig/server/lib/classes/modules.inc.php
Code:
//* If its a multiserver setup
                if($app->db->dbHost != $app->dbmaster->dbHost) {

                        $sql = "SELECT * FROM sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]."  OR server_id = 0) ORDER BY datalog_id";
Code:
//* If its a multiserver setup
                if($app->db->dbHost != $app->dbmaster->dbHost) {

                        $sql = "SELECT * FROM sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]." OR server_id = 1 OR server_id = 0) ORDER BY datalog_id";
about 30 lines below, near "$app->db->query($sql)"
Code:
$app->db->query($sql)
to
Code:
 if (($d['server_id'] == $conf["server_id"]) OR ($d['server_id'] == 0 ))
  {
    $app->db->query($sql);
   }  else {
     if (($d['dbtable'] == 'dns_rr')  OR ($d['dbtable'] == 'dns_soa') OR ($d['dbtable'] == 'dns_template'))
        {
           $app->db->query($sql);
         }
}
It is now possible to 'clone' config from master to that slave, also pick up updates for this slave (but will not serve them, unless you chose your server_id in mydns.conf). It is possible to break other modules configuration with the above, but I do not run other modules on that slave so I'm not digging deeper for now.

Last edited by Uvigii; 8th January 2010 at 21:47.
Reply With Quote
The Following User Says Thank You to Uvigii For This Useful Post:
falko (9th January 2010)
Sponsored Links
  #2  
Old 10th January 2010, 15:35
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

The above should work and a similar replication mode is already included in SVN and will be released with ISPConfig 3.0.2
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th January 2010, 22:03
lucani lucani is offline
Member
 
Join Date: Nov 2009
Posts: 81
Thanks: 4
Thanked 4 Times in 3 Posts
Default

What about MyDNS as Master replication to slave Bind ? It still doesnt work, MyDNS reports wrong, older serial of SOA. Even if I change records in zone, serial is changing in MyDNS database but it notifying wrong serial to slaves bind (or maybe it doesnt notify in general)
Reply With Quote
  #4  
Old 1st February 2010, 13:45
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 262
Thanks: 32
Thanked 6 Times in 5 Posts
Default

yes, it still doesn't work with MyDNS, I am waiting on this fix as well.
Reply With Quote
  #5  
Old 1st February 2010, 13:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

Then you should write the mydns developers a email or post in their mailinglist. The problem is that mydns is not sending notifies when a record has been chnaged in the mydns database. Notifies are only sent when you restart mydns.

If you use mydns as master and slave, then replication is working fine as you use mysql replication for this setup. We use this for years without a problem.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 1st February 2010, 13:50
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 262
Thanks: 32
Thanked 6 Times in 5 Posts
Default

are you saying that if mydns is restarted every 5 mins, the problem will go away?

why doesn't ISPC restart MyDNS whenever changes have been made in DNS configuration and if propagation to slave is requested?
Reply With Quote
  #7  
Old 1st February 2010, 14:01
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

Quote:
are you saying that if mydns is restarted every 5 mins, the problem will go away?
Yes.

Quote:
why doesn't ISPC restart MyDNS whenever changes have been made in DNS configuration and if propagation to slave is requested?
Because the normal ispconfig setup is to use mydns as master and slave and not bind as slave which works flawlessly. Also the restart means that all slaves will get notified for all domains and not just the changed domain, so this can cause load problems on larger systems.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 1st February 2010, 14:13
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 262
Thanks: 32
Thanked 6 Times in 5 Posts
Default

hmm.

thanks for the info.

can you confirm we are talking about
myDNS : http://mydns.bboy.net/
or
myDNS-NG: http://www.mydns.pl/

which one is used?
Reply With Quote
  #9  
Old 1st February 2010, 14:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

Thats the same, take a look at the release dates. mydns-ng is the latest version of the mydns software. As with every software, you should use the latest released stable version, which is mydns-ng.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 1st February 2010, 14:44
manarak manarak is offline
Senior Member
 
Join Date: Apr 2009
Posts: 262
Thanks: 32
Thanked 6 Times in 5 Posts
 
Default

thanks.
I just upgraded ISPC to 3.0.16 and everything looks fine.

I downloaded v. 1.2.8.27 which was rumored to solve the delegation to bind problem.
Let's check if this is true.

I guess the upgrade for myDNS has to be done manually?
Is there anything I should watch out for or can I just
Quote:
./configure
make
??
it won't break existing DNS entries, will it?
Reply With Quote
Reply

Bookmarks

Tags
dns, master, replication, slave

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid Proxy Caching on Linux obzerver Installation/Configuration 4 13th August 2008 19:51
Google Apps dayjahone General 19 29th March 2008 17:25
DNS Configuration Problems VMartins Installation/Configuration 10 24th July 2007 14:40
Unable send receive emails vassilis3 Installation/Configuration 15 19th May 2007 14:34
No SPF record. beryl Installation/Configuration 6 17th May 2007 19:52


All times are GMT +2. The time now is 00:12.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.