ConsistencyCheckerInterface
interface ConsistencyCheckerInterface (View source)
Finds and repairs ownerless zones, masterless slave zones, orphaned records and missing or duplicate SOAs. One implementation per DNS backend.
Every check returns ['status' => 'success'|'warning'|'error', 'message' => string, 'data' => list of findings].
Methods
No description
No description
Zones with owners or grants but no zones row carrying their exact name, which a switch to the API backend would add again without them. Only the SQL backend can have them.
Zone ids two zones share, whose extra owners and group grants are therefore ignored.
Group assignments stored under a zone's row id instead of its canonical id.
API key zone restrictions naming a zone id no zone has, which a zone later given that id would fall under. Only the SQL backend hands out an id again.
Zone names that exist more than once in different letter case, such as Example.com and example.com, which PowerDNS treats as the same name. Report only.
Records whose name holds uppercase letters, which PowerDNS never serves and the record lookups never find. Only the SQL backend can store them.
No description
No description
No description
No description
Run every check, keyed by check name. Null means the backend could not be read and no result can be trusted.
Assign $currentUserId as the owner of a zone that has none.
No description
Point a stranded zones row's domain_id at its own id; $zoneId is the row's primary key.
No description
Give the zone a zones row carrying its PowerDNS name; $zoneId is the domains.id.
No description
Point the API key restrictions on $zoneId, which no zone has, at no zone.
No description
Lowercase the record's name, and the name of the comments on its RRset.
No description
No description
No description
Keep the first SOA record of the zone and delete the rest.
No description
Apply the single-item repair for a consistency page check type (zones_without_owners, zones_without_canonical_ids, records_with_uppercase_names, slave_zones_without_masters, orphaned_records, duplicate_soa, zones_without_soa) to one finding.
Apply a check type's bulk repair to every finding; only the two zone checks offer one.
Details
array
checkZonesHaveOwners()
No description
array
checkZonesHaveCanonicalIds()
No description
array
checkZonesHaveNames()
Zones with owners or grants but no zones row carrying their exact name, which a switch to the API backend would add again without them. Only the SQL backend can have them.
array
checkSharedZoneIds()
Zone ids two zones share, whose extra owners and group grants are therefore ignored.
array
checkGroupGrantsOnRowIds()
Group assignments stored under a zone's row id instead of its canonical id.
array
checkApiKeyScopesNameZones()
API key zone restrictions naming a zone id no zone has, which a zone later given that id would fall under. Only the SQL backend hands out an id again.
array
checkZoneNamesDifferingInCase()
Zone names that exist more than once in different letter case, such as Example.com and example.com, which PowerDNS treats as the same name. Report only.
array
checkRecordNamesInLowercase()
Records whose name holds uppercase letters, which PowerDNS never serves and the record lookups never find. Only the SQL backend can store them.
array
checkSlaveZonesHaveMasters()
No description
array
checkRecordsBelongToZones()
No description
array
checkDuplicateSOARecords()
No description
array
checkZonesWithoutSOA()
No description
array|null
runAllChecks()
Run every check, keyed by check name. Null means the backend could not be read and no result can be trusted.
bool
fixZoneWithoutOwner(int $zoneId, int $currentUserId)
Assign $currentUserId as the owner of a zone that has none.
array
fixAllZonesWithoutOwner(int $currentUserId)
No description
bool
fixZoneCanonicalId(int $zoneId)
Point a stranded zones row's domain_id at its own id; $zoneId is the row's primary key.
array
fixAllZonesWithCanonicalIdIssue()
No description
bool
fixZoneName(int $zoneId)
Give the zone a zones row carrying its PowerDNS name; $zoneId is the domains.id.
array
fixAllZonesWithoutName()
No description
bool
fixApiKeyScopesOnMissingZone(int $zoneId)
Point the API key restrictions on $zoneId, which no zone has, at no zone.
array
fixAllApiKeyScopesOnMissingZones()
No description
bool
fixRecordNameCase(int $recordId)
Lowercase the record's name, and the name of the comments on its RRset.
array
fixAllRecordNamesCase()
No description
bool
deleteSlaveZone(int $zoneId)
No description
bool
deleteOrphanedRecord(int $recordId)
No description
bool
fixDuplicateSOA(int $zoneId)
Keep the first SOA record of the zone and delete the rest.
bool
createDefaultSOA(int $zoneId)
No description
array
fixOne(string $type, int $id, int $currentUserId)
Apply the single-item repair for a consistency page check type (zones_without_owners, zones_without_canonical_ids, records_with_uppercase_names, slave_zones_without_masters, orphaned_records, duplicate_soa, zones_without_soa) to one finding.
array
fixAll(string $type, int $currentUserId)
Apply a check type's bulk repair to every finding; only the two zone checks offer one.