.TP
\fBzone\-check\fP [\fIzone\fP\&...]
Test if the server can load the zone. Semantic checks are executed if enabled
-in the configuration. If invoked with the forced flag, an error is returned
+in the configuration. If invoked with the force option, an error is returned
when semantic check warning appears. (*)
.TP
\fBzone\-reload\fP [\fIzone\fP\&...]
Trigger a zone reload from a disk without checking its modification time. For
slave zone, the refresh from a master server is scheduled; for master zone,
the notification of slave servers is scheduled. An open zone transaction
-will be aborted! If invoked with the forced flag, also zone modules will be
-re\-loaded. (#)
+will be aborted! If invoked with the force option, also zone modules will be
+re\-loaded, but blocking mode might not work reliably. (#)
.TP
\fBzone\-refresh\fP [\fIzone\fP\&...]
Trigger a check for the zone serial on the zone\(aqs master. If the master has a
**zone-check** [*zone*...]
Test if the server can load the zone. Semantic checks are executed if enabled
- in the configuration. If invoked with the forced flag, an error is returned
+ in the configuration. If invoked with the force option, an error is returned
when semantic check warning appears. (*)
**zone-reload** [*zone*...]
Trigger a zone reload from a disk without checking its modification time. For
slave zone, the refresh from a master server is scheduled; for master zone,
the notification of slave servers is scheduled. An open zone transaction
- will be aborted! If invoked with the forced flag, also zone modules will be
- re-loaded. (#)
+ will be aborted! If invoked with the force option, also zone modules will be
+ re-loaded, but blocking mode might not work reliably. (#)
**zone-refresh** [*zone*...]
Trigger a check for the zone serial on the zone's master. If the master has a
# Load zones
serial = master.zone_wait(zone)
-def reload_zone(version, exp_serial, exp_version):
+def reload_zone(version, exp_serial, exp_version, msg):
master.update_zonefile(zone, version)
- if random.random() < 0.5:
+ opt = random.choice([1, 2, 3])
+ if opt == 1:
master.reload()
- else:
- master.ctl(random.choice(["-f", " "]) + " zone-reload " + zone[0].name, wait=True)
+ if opt == 2:
+ master.ctl("zone-reload " + zone[0].name, wait=True)
+ if opt == 3:
+ master.ctl("-f zone-reload " + zone[0].name, wait=True)
+ t.sleep(1) # forced zone-reload does *only schedule* LOAD event
new_serial = master.zone_wait(zone)
if new_serial != exp_serial:
- set_err("SOA MISMATCH")
+ set_err("SOA MISMATCH %s (%d)" % (msg, opt))
detail_log("!Zone '%s' SOA serial %s != %s" % (zone[0].name, new_serial, exp_serial))
return
resp = master.dig("new-record%d.%s" % (exp_version, zone[0].name), "A")
resp.check(rcode="NOERROR")
# Zone changes, serial increases (create changeset)
-reload_zone(1, serial + 1, 1)
+reload_zone(1, serial + 1, 1, "create changeset")
# Zone changes, serial doesn't change (create changeset, increment serial automatically)
-reload_zone(2, serial + 2, 2)
+reload_zone(2, serial + 2, 2, "auto incremented")
# Zone changes, serial jumps out-of-range (journal is not applicable)
-reload_zone(3, serial + 2, 2)
+reload_zone(3, serial + 2, 2, "journal not applied")
# Stop master.
master.stop()