A backup now carries the routing configuration (#1279) #1280
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1280
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/config-completeness"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A backup of a configured router now carries its routing configuration.
Fixes #1279.
The gap
Eight layer-3 features were configurable, stored in
device.config, and printed nowhere:ip name-server <addr>config.dnsServersscion <isd-as>config.scionAsospf router-id,ospf areaconfig.ospfip ospf cost|area|passiveconfig.ospf.interfaces[]router bgp,bgp router-id,neighbor … remote-asconfig.bgpipv6 address <p>/<len>config.ip6[iface]ipv6 route,ipv6 gatewayconfig.routes6,config.gateway6ipv6 nd ra|suppress-ra|prefixconfig.raRestoring that backup gives a different device — one that looks configured and is not. Same class as #1232
(VRRP printed nowhere), one level out.
Why the existing completeness sweep could not see it
test/config-roundtrip.test.jsasserts the printed config replays and that nothing configured is missing fromthe text. Both are trivially true of a feature nobody configured in the sweep: it prints what each device
holds and reads it back, and an absent feature has nothing to be left out of.
The guard that can see it
test/config-completeness.test.js(56 checks, 20 fail withengine/cli.jsreverted) declares everykey
device.configcan hold, with the pattern the printer must produce for it — plus a stated reason for thetwo that are deliberately never printed (
gateway6Iface,motd). A key it has not been taught fails thesuite, so a new piece of state that nobody taught the printer ships as a test failure instead of a silent
omission:
It also asserts, per feature: the command is accepted, the config text changes, the printed line appears,
a default device prints none of them (no invented defaults), each is removable again, and the whole lot
replays with zero rejected lines into a byte-identical config on the ASR 1001-X, the ISR 4331 and the
generic router.
Printing order matters and is tested implicitly by the byte-identical replay:
ospf router-idis emittedbefore the interface blocks whose
ip ospf …lines require the process to exist.One level down: a DHCP pool's leaves
test/dhcp-pool-undo.test.js(51 checks, 20 fail reverted) — the parent level was #1278, the leaves werehalf missing and half silent:
no network,no host <addr>% Unrecognized DHCP pool commandno rangeno default-router|dns-server|leaseno excluded-address 10.5.0.510.5.0.6— how a box starts handing out an address that was reserved for a printerEach now removes only its own leaf, says what it removed, and refuses — naming the pool and the leaf — when
there is nothing there.
no rangestill leaves the pool incomplete and now says so about the pool:rather than a bare error code that looks like a rejection.
no hostworks by address or by MAC.Docs
docs/CLI.md: the "What the config contains" table gains all eight sections, and explains why the replaysweep cannot see a feature nobody configured, with the census that can.
Suite: 154 suites, 6,487 assertions, 0 failed.