Consistency01 (consistency01)

Status: Final

Purpose

  • Check SOA serial consistency across nameservers for the tested zone.
  • Report serial distribution and detect serial variation above the configured threshold.

Preconditions And Inputs

  • Preconditions:
    • A zone.Zone object is available.
  • Required inputs:
    • Nameserver list from methods.Method4 and methods.Method5.
    • SOA answers from queried nameservers.
  • Profile/config knobs that affect behavior:
    • net.ipv4 and net.ipv6: disabled transports are skipped per nameserver.
    • resolver.defaults.parallel: per-nameserver query task parallelism.
    • constants.SerialMaxVariation: accepted numeric delta threshold (default 0).

Algorithm And Decision Flow

  1. Emit TEST_CASE_START.
  2. Build deduplicated nameserver list from Method4+Method5 by ns.String() (name/ip).
  3. For each nameserver (parallelized):
    • If transport is disabled, emit IPV4_DISABLED or IPV6_DISABLED for rrtype SOA and skip.
    • Query SOA for zone apex.
    • No response message -> emit NO_RESPONSE.
    • Response without usable SOA record for zone apex -> emit NO_RESPONSE_SOA_QUERY.
    • Otherwise store serial value for that nameserver.
  4. Group successful responses by serial value.
  5. Emit SOA_SERIAL once per serial with sorted servers.
  6. If exactly one serial exists, emit ONE_SOA_SERIAL.
  7. If multiple serials exist:
    • Emit MULTIPLE_SOA_SERIALS.
    • Compute numeric delta using first/last sorted serial keys and, when delta exceeds SerialMaxVariation, emit SOA_SERIAL_VARIATION.
  8. Emit TEST_CASE_END.

Emitted Tags (Possible Set)

TagEmitted when
IPV4_DISABLEDIPv4 transport is disabled for a queried nameserver/rrtype.
IPV6_DISABLEDIPv6 transport is disabled for a queried nameserver/rrtype.
MULTIPLE_SOA_SERIALSAt least two distinct SOA serial values were observed.
NO_RESPONSESOA query had no response message from a nameserver.
NO_RESPONSE_SOA_QUERYResponse did not contain a usable SOA record for zone apex.
ONE_SOA_SERIALExactly one SOA serial value was observed.
SOA_SERIALA specific SOA serial value and associated nameservers are reported.
SOA_SERIAL_VARIATIONSerial delta exceeded constants.SerialMaxVariation.
TEST_CASE_ENDTestcase completion marker is emitted.
TEST_CASE_STARTTestcase start marker is emitted.

Tag Arguments

TagArgument keyTypeMeaning
IPV4_DISABLEDnsstringNameserver identity (ns name only; use address for IP) skipped on IPv4.
IPV4_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV4_DISABLEDrrtypestringrrtype skipped (SOA).
IPV6_DISABLEDnsstringNameserver identity (ns name only; use address for IP) skipped on IPv6.
IPV6_DISABLEDaddressstringNameserver IP address for the same endpoint.
IPV6_DISABLEDrrtypestringrrtype skipped (SOA).
MULTIPLE_SOA_SERIALScountintNumber of distinct serial values observed.
NO_RESPONSEnsstringNameserver identity (ns name only; use address for IP) with no response.
NO_RESPONSEaddressstringNameserver IP address for the same endpoint.
NO_RESPONSE_SOA_QUERYnsstringNameserver identity (ns name only; use address for IP) without usable SOA answer.
NO_RESPONSE_SOA_QUERYaddressstringNameserver IP address for the same endpoint.
ONE_SOA_SERIALserialstringThe single observed SOA serial value.
SOA_SERIALserialstringOne observed SOA serial value.
SOA_SERIALserversarray<object>Structured nameserver identities ({ns,address} object) serving that serial.
SOA_SERIAL_VARIATIONserial_minstringLowest serial key used in variation check.
SOA_SERIAL_VARIATIONserial_maxstringHighest serial key used in variation check.
SOA_SERIAL_VARIATIONmax_variationintAllowed maximum variation threshold.
TEST_CASE_ENDtestcasestringTestcase display name (Consistency01).
TEST_CASE_STARTtestcasestringTestcase display name (Consistency01).

Severity Levels Per Tag

TagLevelNotes
IPV4_DISABLEDDEBUGDefault from share/profile.json (test_levels.CONSISTENCY).
IPV6_DISABLEDDEBUGDefault from share/profile.json (test_levels.CONSISTENCY).
MULTIPLE_SOA_SERIALSWARNINGDefault from share/profile.json (test_levels.CONSISTENCY).
NO_RESPONSEDEBUGDefault from share/profile.json (test_levels.CONSISTENCY).
NO_RESPONSE_SOA_QUERYDEBUGDefault from share/profile.json (test_levels.CONSISTENCY).
ONE_SOA_SERIALINFODefault from share/profile.json (test_levels.CONSISTENCY).
SOA_SERIALINFODefault from share/profile.json (test_levels.CONSISTENCY).
SOA_SERIAL_VARIATIONNOTICEDefault from share/profile.json (test_levels.CONSISTENCY).
TEST_CASE_ENDDEBUGDefault from share/profile.json (test_levels.CONSISTENCY).
TEST_CASE_STARTDEBUGDefault from share/profile.json (test_levels.CONSISTENCY).

Differences From Upstream

  • Upstream reference: consistency01.md
  • Differences (Upstream vs Gonemaster):
    • Upstream documents MULTIPLE_SOA_SERIALS_OK; Gonemaster does not emit that tag.
    • Upstream: does not explicitly define this detail. Gonemaster: Serial variation delta uses integer subtraction on the first and last serial values after lexicographic string-key sorting.
  • Potential upstream report:
    • no

Implementation Notes

The following behaviors are implementation choices, not mandated by protocol:

  • String-key sort for variation delta: When multiple distinct serials are observed, the variation delta is computed by sorting the serial values as strings (lexicographically) and subtracting the first from the last. Lexicographic ordering differs from numeric ordering when serials have different digit counts (e.g., "9" sorts after "10" lexicographically, so the min/max assignment and resulting delta can differ from a numerically sorted result). This only affects SOA_SERIAL_VARIATION emission when SerialMaxVariation > 0; with the default of 0 any difference between serials is flagged regardless of this sort order.
  • Deduplication by name/ip: Nameservers are deduplicated using their full name/ip identity string. Two entries with the same IP but different names are treated as distinct sources. The protocol defines no deduplication rule for testcase purposes; this choice is implementation-defined.
  • Sorted servers in SOA_SERIAL: Nameserver identities in SOA_SERIAL arguments are sorted before joining. Deterministic ordering is an implementation choice for reproducible output.

Edge Cases And Limitations

  • If no usable SOA serial is obtained from any nameserver, no serial-summary tag (ONE_SOA_SERIAL/MULTIPLE_SOA_SERIALS) is emitted.
  • Nameserver deduplication is by name/ip; same IP with different names is treated as separate sources.
  • Variation check behavior is sensitive to string-key ordering of serial values.