vrrp: a no line that names a setting undoes the setting, not the group #1960

Merged
jaylouisw merged 1 commit from rev/1118-0835 into main 2026-11-18 08:52:09 +00:00
Owner

no vrrp 42 preempt read the vrid, ignored the rest of the line and deleted the group. show running-config writes no vrrp 42 preempt for a group whose preemption is off, so the console was printing a config it read back as a deletion - the paste took the virtual gateway with it (the property #1230 exists to hold).

What the device does is the vendor grammar: no vrrp <group> preempt is the documented way to turn preemption off - "To disable this function, use the no form of this command", syntax no vrrp group preempt (Cisco IOS FHRP Command Reference, vrrp preempt) - and the configuration guide sample interface block lists no vrrp 100 preempt beside vrrp 100 ip 10.1.0.100. priority and timers advertise carry the same default-restoring no form (100 and 1 second).

Changed

  • engine/cli.js, _ifaceMode(): no vrrp <vrid> preempt|priority|advertise undoes that one setting and keeps the group (VRRP group 10 preempt disabled, ... priority reset to 100, ... advertises every 1 s). Bare no vrrp <vrid> still removes the group. Any other word is refused by name - % Unrecognized vrrp command: ... (this console can unset: priority, preempt, advertise - no vrrp 10 removes the group) - so a guess never deletes a group.
  • test/vrrp-no-form.test.js (new, 27 assertions): receipts, the group and its neighbours untouched, the paste-back, the refusal, the bare removal.
  • test/config-roundtrip.test.js: a fixture that configures preempt: false with priority 120 from the console, prints the config and replays it.
  • docs/CLI.md VRRP section (syntax list plus the paragraph that documented the deletion as the only no form), docs/plans/undo-granularity.md step 2 marked landed, new research/vrrp-no-form-scope.md.

Unresolved (recorded in the research note)

  • Nothing reads preempt during an election yet: computeVrrp() elects from scratch each pass and groupState() is called only by tests. The flag is stored, printed and validated; no packet changes - that would be a convergence change, which the plan excludes.
  • show vrrp has no column for it. IOS 15.x show vrrp brief prints P/blank in Pre; IOS XE 16/17 prints Y/N in the same column, and Cisco's own 15.x page carries both sentences. One transcript from the imitated platform would settle which.
  • no vrrp <vrid> ip <addr> (remove one virtual address) is still refused as unrecognized - a separate question.

Gates

  • node scripts/syntax-check.js: 411 files OK
  • full npm test: 338 suites, 11,758 assertions, 0 failed
`no vrrp 42 preempt` read the vrid, ignored the rest of the line and deleted the group. `show running-config` writes ` no vrrp 42 preempt` for a group whose preemption is off, so the console was printing a config it read back as a deletion - the paste took the virtual gateway with it (the property #1230 exists to hold). What the device does is the vendor grammar: `no vrrp <group> preempt` is the documented way to turn preemption off - *"To disable this function, use the no form of this command"*, syntax `no vrrp group preempt` ([Cisco IOS FHRP Command Reference, `vrrp preempt`](https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipapp_fhrp/command/fhp-cr-book/fhp-v1.html)) - and the configuration guide sample interface block lists `no vrrp 100 preempt` beside `vrrp 100 ip 10.1.0.100`. `priority` and `timers advertise` carry the same default-restoring `no` form (100 and 1 second). ### Changed - `engine/cli.js`, `_ifaceMode()`: `no vrrp <vrid> preempt|priority|advertise` undoes that one setting and keeps the group (`VRRP group 10 preempt disabled`, `... priority reset to 100`, `... advertises every 1 s`). Bare `no vrrp <vrid>` still removes the group. Any other word is refused by name - `% Unrecognized vrrp command: ... (this console can unset: priority, preempt, advertise - no vrrp 10 removes the group)` - so a guess never deletes a group. - `test/vrrp-no-form.test.js` (new, 27 assertions): receipts, the group and its neighbours untouched, the paste-back, the refusal, the bare removal. - `test/config-roundtrip.test.js`: a fixture that configures `preempt: false` with `priority 120` from the console, prints the config and replays it. - `docs/CLI.md` VRRP section (syntax list plus the paragraph that documented the deletion as the only `no` form), `docs/plans/undo-granularity.md` step 2 marked landed, new `research/vrrp-no-form-scope.md`. ### Unresolved (recorded in the research note) - Nothing reads `preempt` during an election yet: `computeVrrp()` elects from scratch each pass and `groupState()` is called only by tests. The flag is stored, printed and validated; no packet changes - that would be a convergence change, which the plan excludes. - `show vrrp` has no column for it. IOS 15.x `show vrrp brief` prints `P`/blank in `Pre`; IOS XE 16/17 prints `Y`/`N` in the same column, and Cisco's own 15.x page carries both sentences. One transcript from the imitated platform would settle which. - `no vrrp <vrid> ip <addr>` (remove one virtual address) is still refused as unrecognized - a separate question. ### Gates - `node scripts/syntax-check.js`: 411 files OK - full `npm test`: **338 suites, 11,758 assertions, 0 failed**
vrrp: a no line that names a setting undoes the setting, not the group
All checks were successful
CI / Classify the change (pull_request) Successful in 6s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 21s
CI / Test (Node 20) (pull_request) Successful in 50s
CI / Test (Node 18) (pull_request) Successful in 59s
CI / Test (Node 22) (pull_request) Successful in 58s
CI / Arm auto-merge (pull_request) Successful in 19s
c503ed599b
`no vrrp 42 preempt` read the vrid, ignored the rest of the line and deleted the group - so
`show running-config`, which writes `  no vrrp 42 preempt` for a group whose preemption is off,
printed a config the console read back as a deletion, and the paste took the virtual gateway with it
(#1230). IOS's `no` form of an attribute command removes that attribute and leaves the virtual router
standing - "To disable this function, use the no form of this command" (Cisco IOS First Hop Redundancy
Protocols Command Reference, `vrrp preempt`) - and the configuration guide's sample interface block
lists `no vrrp 100 preempt` beside `vrrp 100 ip 10.1.0.100`.

`preempt` now goes off, `priority` back to 100 and `advertise` back to 1 second, each leaving the group
and its other settings alone; the bare `no vrrp <vrid>` still removes it, and any other word is refused
by name rather than read as the bare form. The research note records the evidence and the half still
open: nothing reads the flag during an election, and `show vrrp` has no column for it.

Tests: test/vrrp-no-form.test.js (27 assertions), a test/config-roundtrip.test.js fixture for the
paste-back; full suite 338 suites / 11,758 assertions, 0 failed; syntax-check 411 files.

Co-authored-by: Hermes Agent <jay@jayw.uk>
jaylouisw force-pushed rev/1118-0835 from c503ed599b
All checks were successful
CI / Classify the change (pull_request) Successful in 6s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke test (pull_request) Successful in 7s
CI / Docker build (pull_request) Successful in 21s
CI / Test (Node 20) (pull_request) Successful in 50s
CI / Test (Node 18) (pull_request) Successful in 59s
CI / Test (Node 22) (pull_request) Successful in 58s
CI / Arm auto-merge (pull_request) Successful in 19s
to 9794f8cb1c
All checks were successful
CI / Classify the change (pull_request) Successful in 8s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 8s
CI / Server smoke test (pull_request) Successful in 8s
CI / Docker build (pull_request) Successful in 22s
CI / Test (Node 20) (pull_request) Successful in 56s
CI / Test (Node 18) (pull_request) Successful in 1m1s
CI / Test (Node 22) (pull_request) Successful in 56s
CI / Arm auto-merge (pull_request) Successful in 9s
2026-11-18 08:50:02 +00:00
Compare
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1960
No description provided.