DirectSlave - solution to add and remove zones on slave without DirectAdmin

Some searching and it looks like i dont have "FindBin" installed. It is part of Perl 5.18 and i have 5.14, Debian Wheezy is still at 5.14

hmm what todo? remove perl package and install manually ?
 
Does anyone have any suggestions for my issue on Debian ?

I could force an upgrade using next release (jessie) from aptsources.list but i am affraid to break other packages.
 
Does DS know how to respond to a DA request wheter a domain is already present in the DNS? I have a setup where I run nameservers totally separated from the DA servers, so we have slightly modified the DS script on the master.
From the master nameservers DS log I can see that the domain check is performed by DA server, but it still overwrites the zone file when I add a domain, which is already present on server #1, on server #2.
Adding a domain from server #2, which already exists on server #1
x.x.x.2 - - [15/Feb/2014:09:31:19 +0200] "GET /CMD_API_DNS_ADMIN?action=exists&domain=testdomain.com HTTP/1.0" 200 - "-" "-"
x.x.x.2 - - [15/Feb/2014:09:31:19 +0200] "GET /CMD_API_USER_EXISTS?user=test123 HTTP/1.0" 200 - "-" "-"
x.x.x.2 - - [15/Feb/2014:09:31:19 +0200] "POST /CMD_API_DNS_ADMIN?action=rawsave&domain=testdomain.com HTTP/1.0" 200 - "-" "-"
x.x.x.2 - - [15/Feb/2014:09:31:20 +0200] "POST /CMD_API_DNS_ADMIN?action=rawsave&domain=testdomain.com HTTP/1.0" 200 - "-" "-"
Resetting the zone file on server #1
x.x.x.1 - - [15/Feb/2014:09:31:55 +0200] "POST /CMD_API_DNS_ADMIN?action=rawsave&domain=testdomain.com HTTP/1.0" 200 - "-" "-"
 
Last edited:
I need to know the answer to this too, as I'm completely rebuilding my DNS structure within the next month and I'm trying to decide whether to keep using my Master2Slave DNS Replicator or to switch to DirectSlave.

(My Master2Slave DNS Replicator checks duplicates, keeps the first, and reports in an email if there were other attempts, but gives no details.

Once we get this resolved, I'd be interested in using your modifications. Would you consider sharing?

Jeff
 
My scripting abilities are small, but we checked the script and it doesn't. Basically, if you're running DirectSlave in master mode, it overwrites the whole zone file:
Code:
if(&exist($domain)) {
	    if($config->{mode} eq "master") { &rewrite($domain,$zone); }
	    &reload($domain);
	    &action_log( "reloaded $domain on master $master" );
	} else {
	    my $if_master = "as master from $master";
	    if($config->{mode} eq "slave") { $if_master = "with master $master"; }
	    &add($domain,$master,$zone);
	    &reload($domain);
	    &action_log( "domain $domain added $if_master" );
	}

To make it work, you would need to add another variable (something like $host_ip) to define on which server the domain is hosted. Then modify the script to perform a check if the server requesting a zone rewrite is authorized to do it.
I can share the modified script for the slave, but if i remember correctly, it is just one line, telling which is the master ns.
 
I'm bulding out 2 new slave nameservers by the end of March, to replace an aging solution. I had hoped to replace Master2Slave DNS Replicator with DirectAdmin as hidden masters (on hosting severs) and DirectSlave on slave servers. But I must have notification of duplicates; that spec was in my original design spec for Master2Slave. So I guess I'm stuck still using it for now.

Thanks for the clarification.

Jeff
 
Hi.

on centos 6 64 Bit i have a little problem.
when i add an new zone directsalve add the the but in each entry they put in front of the master entry ::ffff:

zone "testing.de" { type slave; file "/etc/named/secondary/testing.de.db"; masters { ::ffff:MASTERIP; }; max-retry-time 1200; min-retry-time 1200; };

So bind gives an error.

zone testing.de/IN: refresh: failure trying master ::ffff:MASTERIP#53 (source ::#0): operation canceled

any ideas ?

Mario
 
I'm trying to install this on debian and having a hard time finding the associated packages for the modules. I did try install the POSIX one via cpan using install POSIX however it took ages and asked loads of questions that I didn't know the answer to.

So does anyone have a list of packages I need to install using apt-get? I looked at install aptitude but that requires 67.6 MB space and installs unnecessary packages which I don't need (i'm trying to keep everything minimal).

So far I have

POSIX - ?
FindBin - libfindbin-libs-perl
CGI - ?
Crypt::passwdMD5 - libcrypt-passwdmd5-perl
Digest::MD5 - libdigest-md5-file-perl
Config::Auto - libconfig-auto-perl
MIME:Base64 - libmime-base64-urlsafe-perl
Net::Server - libnet-server-perl
Net::CIDR - libnet-cidr-perl
 
Last edited:
Another question i got it installed now i dont get any errors an d i am recieving the zone's from the masters
the /etc/namedb/directslave.conf is filled with :
zone "domain.com" { type slave; file "/etc/namedb/secondary/domain.com.db"; masters { 92.48.232.36; }; max-retry-time 1200; min-retry-time 1200; };
If im running /usr/local/directslave/bin/directslave --debug im seeing the raw zone.

The only thing is that the
/etc/namedb/secondary/domain.com.db
isn't created the
/etc/namedb/secondary/
keeps empty i cant seem to figure out why this is
 
Knowing your I presume you checked the owner and rights of the directory.

Do you get any errors when restarting or running rndc?
 
as far as i know they are

drwxr-xr-x. 3 named named 4096 Jul 5 09:28 namedb
drwxr-xr-x. 2 named named 4096 Jul 5 09:18 secondary

im not getting any errors, and directslave uid is root and gid is named
 
hmm and now it doesnt anymore :(

another strange item is that it mixes up all zone file for example the domain.com.db has the zone details for domain.nl and so on all zone info is from 1 domain
 
Oh that's very odd... then something else must be wrong. But I don't have a clue what. I only had the previous version running.
If it's important you might want to write an email to Roman, normally he responds reasonably fast.
 
Hello,
our DA servers, connected to several DirectSlave server using the DA Cluster feature and showing a lot of errors in DA's log:
Code:
Cluster DIRECTSLAVE1.COM: Error deleting remote dns zone (DOMAIN1.COM): (null)
Cluster DIRECTSLAVE2.COM: Error checking for remote dns zone (DOMAIN2.COM): (null)
Cluster: Error writing remote dns zone at host DIRECTSLAVE3.COM for domain (DOMAIN2.COM): (null) (retry=0)

is this DirectSlave's or DA's side?
 
Back
Top