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
^^^^^^^
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
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
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.
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;
try {
master_ip = ComboAddress{parts[2], 53};
} catch (...) {
- return "Invalid master address";
+ return "Invalid primary address";
}
override_master = true;
}
DomainInfo di;
UeberBackend B;
if(!B.getDomainInfo(domain, di)) {
- return " Domain '"+domain.toString()+"' unknown";
+ return " Zone '" + domain.toString() + "' unknown";
}
if (override_master) {
}
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)
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 {
{
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";
}
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;
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++;
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";
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;
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");
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");