Disable zones instead of deleting them
A disabled zone stays in Jarl with its records, options and history, still editable, but named doesn't load it; enabling it serves it as it is then. Signed zones, and zones another view shares, can't be disabled. jarl zone disable|enable, the zone page's Disable/Enable button. Database schema 7. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
59baccd636
commit
89663e366b
24 files changed
+264
-26
No files matched your search
@@ -410,6 +410,22 @@ run "wipe the child" 0 $J zone dnssec wipe sub.adbraun.test --view external --ye
|
||||
run "delete the child" 0 $J zone delete sub.adbraun.test --view external --yes
|
||||
run "remove the delegation" 0 $J record delete adbraun.test sub NS --view external --yes
|
||||
|
||||
# Disabled zones: kept in Jarl, not loaded by named.
|
||||
run "zone for disabling" 0 $J zone create parked.test --view internal --ns ns1.adbraun.test.
|
||||
run "record in it" 0 $J record add parked.test www A 192.0.2.70 --view internal
|
||||
expect_dig "parked www served" "192.0.2.70" www.parked.test A
|
||||
run "zone disable" 0 $J zone disable parked.test --view internal
|
||||
contains "recursion"
|
||||
expect_dig "disabled zone not served" "" www.parked.test A
|
||||
run "named.conf says it's disabled" 0 grep -q 'zone "parked.test" is disabled in Jarl' $E/etc-jarl/named.conf
|
||||
run "zone list marks it" 0 $J zone list
|
||||
contains "parked.test.*primary (disabled)"
|
||||
run "editing a disabled zone works (no reload of a zone named lacks)" 0 $J record add parked.test api A 192.0.2.71 --view internal
|
||||
run "zone enable" 0 $J zone enable parked.test --view internal
|
||||
expect_dig "enabled zone served again" "192.0.2.70" www.parked.test A
|
||||
expect_dig "with the change made while disabled" "192.0.2.71" api.parked.test A
|
||||
run "delete it" 0 $J zone delete parked.test --view internal --yes
|
||||
|
||||
# Blocking (docs/blocking.md). It only changes answers to recursive
|
||||
# queries, so these ask with recursion and look at which policy zone (if
|
||||
# any) the answer came from.
|
||||
|
||||
Reference in new issue
Block a user