Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

MaraDNS - Adding more records to zone - How to avoid restarting service?

Hi,

So currently i'm testing MaraDNS but if I want to add more records to my zone then I need to restart the service to make sure they're present. A "service maradns reload" doesn't see to force a config reload without a service restart.

So my question is. How do I reload zone config without restarting the DNS server?

Comments

  • Are you sure MaraDNS have reload feature?.

  • @mustafaramadhan - not really! I'm just testing different DNS servers at this point.

  • Better using nsd. Kloxo-MR 7.0 using it beside other dns servers.

  • AFAIK you can't avoid restarting. It starts back up very quickly so what's the problem with a restart?

    If you want something that doesn't need restarting then try powerdns with mysql backend. Just add the DNS records to the mysql database and powerdns will serve them right away.

  • Nope, MaraDNS requires a restart in order to process changes.

  • jeromezajeromeza Member
    edited August 2015

    Thanks guys, testing PowerDNS as a result.

    Trying to follow the tutorial here:

    https://www.rosehosting.com/blog/install-powerdns-and-on-a-centos-7-vps/

    BUT i'm seeing an issue where it won't serve records due to what I assume is a problem with my schema. Time to go read the docs...

    [root@localhost ~]# systemctl status pdns.service -l
    pdns.service - PowerDNS Authoritative Server
       Loaded: loaded (/usr/lib/systemd/system/pdns.service; enabled)
       Active: active (running) since Fri 2015-08-28 14:37:15 SAST; 16min ago
     Main PID: 2261 (pdns_server)
       CGroup: /system.slice/pdns.service
               └─2261 /usr/sbin/pdns_server --daemon
    
    Aug 28 14:37:15 localhost.localdomain pdns[2261]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
    Aug 28 14:37:15 localhost.localdomain pdns[2261]: Creating backend connection for TCP
    Aug 28 14:37:15 localhost.localdomain pdns[2261]: About to create 3 backend threads for UDP
    Aug 28 14:37:15 localhost.localdomain pdns[2261]: Done launching threads, ready to distribute questions
    Aug 28 14:40:48 localhost.localdomain pdns[2261]: Backend reported permanent error which prevented lookup (GSQLBackend lookup query:Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'disabled' in 'field list'), aborting
    Aug 28 14:40:48 localhost.localdomain pdns[2261]: Backend error: GSQLBackend lookup query:Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'disabled' in 'field list'
    Aug 28 14:47:53 localhost.localdomain pdns[2261]: Backend reported permanent error which prevented lookup (GSQLBackend lookup query:Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'disabled' in 'field list'), aborting
    Aug 28 14:47:53 localhost.localdomain pdns[2261]: Backend error: GSQLBackend lookup query:Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'disabled' in 'field list'
    Aug 28 14:47:55 localhost.localdomain pdns[2261]: Backend reported permanent error which prevented lookup (GSQLBackend lookup query:Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'disabled' in 'field list'), aborting
    Aug 28 14:47:55 localhost.localdomain pdns[2261]: Backend error: GSQLBackend lookup query:Failed to execute mysql_query, perhaps connection died? Err=1: Unknown column 'disabled' in 'field list'
    

    Any idea where I can find the newer sql schema for version below?

    [root@localhost ~]# yum info powerdns
    Installed Packages
    Name        : pdns
    Arch        : x86_64
    Version     : 3.4.5
    Release     : 1.el7
    Size        : 7.2 M
    Repo        : installed
    From repo   : epel
    Summary     : A modern, advanced and high performance authoritative-only nameserver
    URL         : http://powerdns.com
    License     : GPLv2
    Description : The PowerDNS Nameserver is a modern, advanced and high performance
                : authoritative-only nameserver. It is written from scratch and conforms
                : to all relevant DNS standards documents.
                : Furthermore, PowerDNS interfaces with almost any database.
    
  • EDIT:

    Got it working by using the schema here:

    CREATE TABLE domains (
      id                    INT AUTO_INCREMENT,
      name                  VARCHAR(255) NOT NULL,
      master                VARCHAR(128) DEFAULT NULL,
      last_check            INT DEFAULT NULL,
      type                  VARCHAR(6) NOT NULL,
      notified_serial       INT DEFAULT NULL,
      account               VARCHAR(40) DEFAULT NULL,
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    
    CREATE UNIQUE INDEX name_index ON domains(name);
    
    
    CREATE TABLE records (
      id                    INT AUTO_INCREMENT,
      domain_id             INT DEFAULT NULL,
      name                  VARCHAR(255) DEFAULT NULL,
      type                  VARCHAR(10) DEFAULT NULL,
      content               VARCHAR(64000) DEFAULT NULL,
      ttl                   INT DEFAULT NULL,
      prio                  INT DEFAULT NULL,
      change_date           INT DEFAULT NULL,
      disabled              TINYINT(1) DEFAULT 0,
      ordername             VARCHAR(255) BINARY DEFAULT NULL,
      auth                  TINYINT(1) DEFAULT 1,
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    
    CREATE INDEX nametype_index ON records(name,type);
    CREATE INDEX domain_id ON records(domain_id);
    CREATE INDEX recordorder ON records (domain_id, ordername);
    
    
    CREATE TABLE supermasters (
      ip                    VARCHAR(64) NOT NULL,
      nameserver            VARCHAR(255) NOT NULL,
      account               VARCHAR(40) NOT NULL,
      PRIMARY KEY (ip, nameserver)
    ) Engine=InnoDB;
    
    
    CREATE TABLE comments (
      id                    INT AUTO_INCREMENT,
      domain_id             INT NOT NULL,
      name                  VARCHAR(255) NOT NULL,
      type                  VARCHAR(10) NOT NULL,
      modified_at           INT NOT NULL,
      account               VARCHAR(40) NOT NULL,
      comment               VARCHAR(64000) NOT NULL,
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    
    CREATE INDEX comments_domain_id_idx ON comments (domain_id);
    CREATE INDEX comments_name_type_idx ON comments (name, type);
    CREATE INDEX comments_order_idx ON comments (domain_id, modified_at);
    
    
    CREATE TABLE domainmetadata (
      id                    INT AUTO_INCREMENT,
      domain_id             INT NOT NULL,
      kind                  VARCHAR(32),
      content               TEXT,
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    
    CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind);
    
    
    CREATE TABLE cryptokeys (
      id                    INT AUTO_INCREMENT,
      domain_id             INT NOT NULL,
      flags                 INT NOT NULL,
      active                BOOL,
      content               TEXT,
      PRIMARY KEY(id)
    ) Engine=InnoDB;
    
    CREATE INDEX domainidindex ON cryptokeys(domain_id);
    
    
    CREATE TABLE tsigkeys (
      id                    INT AUTO_INCREMENT,
      name                  VARCHAR(255),
      algorithm             VARCHAR(50),
      secret                VARCHAR(255),
      PRIMARY KEY (id)
    ) Engine=InnoDB;
    
    CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);
    

    AND adding (as this automates deletion of records on deletion of a domain from the domains table.)

    ALTER TABLE `records` ADD CONSTRAINT `records_ibfk_1` FOREIGN KEY (`domain_id`)
    REFERENCES `domains` (`id`) ON DELETE CASCADE;
    
Sign In or Register to comment.