]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: use primary/seconday in pddns_control and s/zone/domain
authorKees Monshouwer <mind04@monshouwer.org>
Tue, 18 May 2021 19:19:13 +0000 (21:19 +0200)
committermind04 <mind04@monshouwer.org>
Thu, 20 May 2021 14:41:21 +0000 (16:41 +0200)
docs/manpages/pdns_control.1.rst
pdns/dynhandler.cc
pdns/receiver.cc

index 1a4e3bcc14572c6b828a6747895be3871ad3f67b..3857558813dad623700c765a277121b2c64ff5cd 100644 (file)
@@ -27,36 +27,36 @@ Options
 Commands
 --------
 
-bind-add-zone *DOMAIN* *FILENAME*
+bind-add-zone *ZONE* *FILENAME*
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 When using the BIND backend, add a zone. This zone is added in-memory
 and served immediately. Note that this does not add the zone to the
 bind-config file. *FILENAME* must be an absolute path.
 
-bind-domain-extended-status [*DOMAIN*...]
+bind-domain-extended-status [*ZONE*...]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-Output an extended status of all domains, containing much more information than
-the simple domain status, like the number of records currently loaded, whether pdns
-is master or slave for the domain, the list of masters, various timers, etc
-Optionally, append *DOMAIN*\ s to get the status of specific zones.
+Output an extended status of all zones, containing much more information than
+the simple zone status, like the number of records currently loaded, whether pdns
+is primary or secondary for the zone, the list of primaries, various timers, etc
+Optionally, append *ZONE*\ s to get the status of specific zones.
 
-bind-domain-status [*DOMAIN*...]
+bind-domain-status [*ZONE*...]
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-When using the BIND backend, list status of all domains. Optionally,
-append *DOMAIN*\ s to get the status of specific zones.
+When using the BIND backend, list status of all zones. Optionally,
+append *ZONE*\ s to get the status of specific zones.
 
 bind-list-rejects
 ^^^^^^^^^^^^^^^^^
 
-When using the BIND backend, get a list of all rejected domains.
+When using the BIND backend, get a list of all rejected zones.
 
-bind-reload-now *DOMAIN* [*DOMAIN*...]
+bind-reload-now *ZONE* [*ZONE*...]
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-When using the BIND backend, immediately reload *DOMAIN* from disk.
+When using the BIND backend, immediately reload *ZONE* from disk.
 
 ccounts
 ^^^^^^^
@@ -80,22 +80,22 @@ list
 Dump all statistics and their values in a comma separated list,
 equivalent to ``show *``.
 
-list-zones [master,slave,native]
+list-zones [primary,secondary,native]
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Show a list of zones, optionally filter on the type of zones to
 show.
 
-notify *DOMAIN*
+notify *ZONE*
 ^^^^^^^^^^^^^^^
 
-Adds *DOMAIN* to the notification list, causing PowerDNS to send out
-notifications to the nameservers of a domain. Can be used if a slave
+Adds *ZONE* to the notification list, causing PowerDNS to send out
+notifications to the nameservers of a zone. Can be used if a secondary
 missed previous notifications or is generally hard of hearing. Use
-\* to notify for all domains. (Note that you may need to escape the
+\* to notify for all zones. (Note that you may need to escape the
 \* sign in your shell.)
 
-notify-host *DOMAIN* *ADDRESS*
+notify-host *ZONE* *ADDRESS*
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Same as above but with operator specified IP *ADDRESS* as
@@ -128,7 +128,7 @@ Tell a running pdns\_server to quit.
 rediscover
 ^^^^^^^^^^
 
-Instructs backends that new domains may have appeared in the
+Instructs backends that new zones may have appeared in the
 database, or, in the case of the BIND backend, in named.conf.
 
 reload
@@ -147,10 +147,10 @@ respsizes
 
 Get a histogram of the response sizes.
 
-retrieve *DOMAIN* [IP]
+retrieve *ZONE* [IP]
 ^^^^^^^^^^^^^^^^^^^^^^
 
-Retrieve slave *DOMAIN* from its master. Done nearly immediately.
+Retrieve secondary *ZONE* from its primary. Done nearly immediately.
 If IP is specified, then retrieval is forced from the specified IP.
 Port may be specified in AFI specific manner.
 
index af77e142a8a8c699a84ddecc120a6a9f39894fe2..a456464bcc69dd7b0358d201ec3bbb5a46089ac3 100644 (file)
@@ -242,13 +242,13 @@ string DLNotifyRetrieveHandler(const vector<string>&parts, Utility::pid_t ppid)
   extern CommunicatorClass Communicator;
   ostringstream os;
   if(parts.size()!=2 && parts.size()!=3)
-    return "syntax: retrieve domain [ip]";
+    return "syntax: retrieve zone [ip]";
 
   DNSName domain;
   try {
     domain = DNSName(parts[1]);
   } catch (...) {
-    return "Failed to parse domain as valid DNS name";
+    return "Failed to parse zone as valid DNS name";
   }
 
   ComboAddress master_ip;
@@ -257,7 +257,7 @@ string DLNotifyRetrieveHandler(const vector<string>&parts, Utility::pid_t ppid)
     try {
       master_ip = ComboAddress{parts[2], 53};
     } catch (...) {
-      return "Invalid master address";
+      return "Invalid primary address";
     }
     override_master = true;
   }
@@ -265,7 +265,7 @@ string DLNotifyRetrieveHandler(const vector<string>&parts, Utility::pid_t ppid)
   DomainInfo di;
   UeberBackend B;
   if(!B.getDomainInfo(domain, di)) {
-    return " Domain '"+domain.toString()+"' unknown";
+    return " Zone '" + domain.toString() + "' unknown";
   }
 
   if (override_master) {
@@ -274,13 +274,13 @@ string DLNotifyRetrieveHandler(const vector<string>&parts, Utility::pid_t ppid)
   }
 
   if(!override_master && (di.kind != DomainInfo::Slave || di.masters.empty()))
-    return "Domain '"+domain.toString()+"' is not a slave domain (or has no master defined)";
+    return "Zone '" + domain.toString() + "' is not a secondary zone (or has no primary defined)";
 
   shuffle(di.masters.begin(), di.masters.end(), pdns::dns_random_engine());
   const auto& master = di.masters.front();
   Communicator.addSuckRequest(domain, master, SuckRequest::PdnsControl, override_master);
-  g_log<<Logger::Warning<<"Retrieval request for domain '"<<domain<<"' from master '"<<master<<"' received from operator"<<endl;
-  return "Added retrieval request for '"+domain.toLogString()+"' from master "+master.toLogString();
+  g_log << Logger::Warning << "Retrieval request for zone '" << domain << "' from primary '" << master << "' received from operator" << endl;
+  return "Added retrieval request for '" + domain.toLogString() + "' from primary " + master.toLogString();
 }
 
 string DLNotifyHostHandler(const vector<string>&parts, Utility::pid_t ppid)
@@ -288,15 +288,15 @@ string DLNotifyHostHandler(const vector<string>&parts, Utility::pid_t ppid)
   extern CommunicatorClass Communicator;
   ostringstream os;
   if(parts.size()!=3)
-    return "syntax: notify-host domain ip";
+    return "syntax: notify-host zone ip";
   if(!::arg().mustDo("primary") && !(::arg().mustDo("secondary") && ::arg().mustDo("secondary-do-renotify")))
-      return "PowerDNS not configured as primary (master), or secondary (slave) with re-notifications";
+    return "PowerDNS not configured as primary, or secondary with re-notifications";
 
   DNSName domain;
   try {
     domain = DNSName(parts[1]);
   } catch (...) {
-    return "Failed to parse domain as valid DNS name";
+    return "Failed to parse zone as valid DNS name";
   }
 
   try {
@@ -305,8 +305,8 @@ string DLNotifyHostHandler(const vector<string>&parts, Utility::pid_t ppid)
   {
     return "Unable to convert '"+parts[2]+"' to an IP address";
   }
-  
-  g_log<<Logger::Warning<<"Notification request to host "<<parts[2]<<" for domain '"<<domain<<"' received from operator"<<endl;
+
+  g_log << Logger::Warning << "Notification request to host " << parts[2] << " for zone '" << domain << "' received from operator" << endl;
   Communicator.notify(domain, parts[2]);
   return "Added to queue";
 }
@@ -316,10 +316,10 @@ string DLNotifyHandler(const vector<string>&parts, Utility::pid_t ppid)
   extern CommunicatorClass Communicator;
   UeberBackend B;
   if(parts.size()!=2)
-    return "syntax: notify domain";
+    return "syntax: notify zone";
   if(!::arg().mustDo("primary") && !(::arg().mustDo("secondary") && ::arg().mustDo("secondary-do-renotify")))
-      return "PowerDNS not configured as primary (master), or secondary (slave) with re-notifications";
-  g_log<<Logger::Warning<<"Notification request for domain '"<<parts[1]<<"' received from operator"<<endl;
+    return "PowerDNS not configured as primary (primary), or secondary (secondary) with re-notifications";
+  g_log << Logger::Warning << "Notification request for zone '" << parts[1] << "' received from operator" << endl;
 
   if (parts[1] == "*") {
     vector<DomainInfo> domains;
@@ -328,7 +328,7 @@ string DLNotifyHandler(const vector<string>&parts, Utility::pid_t ppid)
     int total = 0;
     int notified = 0;
     for (const auto& di : domains) {
-      if (di.kind == DomainInfo::Master || di.kind == DomainInfo::Slave) { // MASTER and Slave if slave-renotify is enabled
+      if (di.kind == DomainInfo::Master || di.kind == DomainInfo::Slave) { // Primary and secondary if secondary-do-renotify is enabled
         total++;
         if(Communicator.notifyDomain(di.zone, &B))
           notified++;
@@ -343,7 +343,7 @@ string DLNotifyHandler(const vector<string>&parts, Utility::pid_t ppid)
     try {
       domain = DNSName(parts[1]);
     } catch (...) {
-      return "Failed to parse domain as valid DNS name";
+      return "Failed to parse zone as valid DNS name";
     }
     if(!Communicator.notifyDomain(DNSName(parts[1]), &B))
       return "Failed to add to the queue - see log";
@@ -384,9 +384,9 @@ string DLListZones(const vector<string>&parts, Utility::pid_t ppid)
   ostringstream ret;
   int kindFilter = -1;
   if (parts.size() > 1) {
-    if (toUpper(parts[1]) == "MASTER" || toUpper(parts[1]) == "PRIMARY")
+    if (toUpper(parts[1]) == "PRIMARY" || toUpper(parts[1]) == "MASTER")
       kindFilter = 0;
-    else if (toUpper(parts[1]) == "SLAVE" || toUpper(parts[1]) == "SECONDARY")
+    else if (toUpper(parts[1]) == "SECONDARY" || toUpper(parts[1]) == "SLAVE")
       kindFilter = 1;
     else if (toUpper(parts[1]) == "NATIVE")
       kindFilter = 2;
index 178f1bef80b69bf7dbdde52e372fb14433c22a93..9e04452fe1f1f5842bb6209e9379d51cc7cd2008 100644 (file)
@@ -592,8 +592,8 @@ int main(int argc, char **argv)
     DynListener::registerFunc("RPING",&DLPingHandler, "ping instance");
     DynListener::registerFunc("QUIT",&DLRQuitHandler, "quit daemon");
     DynListener::registerFunc("UPTIME",&DLUptimeHandler, "get instance uptime");
-    DynListener::registerFunc("NOTIFY-HOST",&DLNotifyHostHandler, "notify host for specific domain", "<domain> <host>");
-    DynListener::registerFunc("NOTIFY",&DLNotifyHandler, "queue a notification", "<domain>");
+    DynListener::registerFunc("NOTIFY-HOST", &DLNotifyHostHandler, "notify host for specific zone", "<zone> <host>");
+    DynListener::registerFunc("NOTIFY", &DLNotifyHandler, "queue a notification", "<zone>");
     DynListener::registerFunc("RELOAD",&DLReloadHandler, "reload all zones");
     DynListener::registerFunc("REDISCOVER",&DLRediscoverHandler, "discover any new zones");
     DynListener::registerFunc("VERSION",&DLVersionHandler, "get instance version");
@@ -603,9 +603,9 @@ int main(int argc, char **argv)
     DynListener::registerFunc("RESPSIZES", &DLRSizesHandler, "get histogram of response sizes");
     DynListener::registerFunc("REMOTES", &DLRemotesHandler, "get top remotes");
     DynListener::registerFunc("SET",&DLSettingsHandler, "set config variables", "<var> <value>");
-    DynListener::registerFunc("RETRIEVE",&DLNotifyRetrieveHandler, "retrieve slave domain", "<domain> [<ip>]");
+    DynListener::registerFunc("RETRIEVE", &DLNotifyRetrieveHandler, "retrieve slave zone", "<zone> [<ip>]");
     DynListener::registerFunc("CURRENT-CONFIG",&DLCurrentConfigHandler, "retrieve the current configuration", "[diff]");
-    DynListener::registerFunc("LIST-ZONES",&DLListZones, "show list of zones", "[master|slave|native]");
+    DynListener::registerFunc("LIST-ZONES", &DLListZones, "show list of zones", "[primary|secondary|native]");
     DynListener::registerFunc("TOKEN-LOGIN", &DLTokenLogin, "Login to a PKCS#11 token", "<module> <slot> <pin>");
     DynListener::registerFunc("XFR-QUEUE", &DLSuckRequests, "Get all requests for XFR in queue");