Skip to content

Sync preinstall/sbr-config to upstream v1.5.0 - #594

Open
WekaJosh wants to merge 6 commits into
masterfrom
feature/sbr-config-1.2.0
Open

Sync preinstall/sbr-config to upstream v1.5.0#594
WekaJosh wants to merge 6 commits into
masterfrom
feature/sbr-config-1.2.0

Conversation

@WekaJosh

Copy link
Copy Markdown
Collaborator

Syncs preinstall/sbr-config/ to SBR-Config v1.2.0, a bug-fix release from a full-project review.

Highlights

  • Multi-IP interfaces no longer break --configure. Interfaces with several IPv4 addresses previously planned duplicate ip route add commands; the second failed with EEXIST and aborted the whole apply. Persistence backends also mishandled these (networkd wrote one file per IP with the last overwriting the rest, netplan emitted invalid duplicate YAML keys, the NM dispatcher generated unreachable case branches). All backends now emit one config per interface covering every address.
  • Rollback is a true snapshot restore. Backups now capture every managed persistence file alongside rt_tables. Rollback restores the running configuration from backup time: SBR rules, routes, rt_tables entries, sysctl values, and persistence file contents all return to their backed-up state, and anything added since is removed. Legacy backups fall back to the previous behavior.
  • Sysctl persistence writes the complete required set, not just the current run's delta, so settings that were already correct at runtime survive reboot.
  • ifupdown persistence is idempotent across repeat runs (no more stacked duplicate post-up/pre-down blocks).
  • Assorted smaller fixes: rule priority allocation, lock-file race, netplan apply timeout, relative log paths, strict-umask directory creation, missing /etc/iproute2 auto-created.

Mirror was verified to be an exact copy of upstream v1.1.0 before syncing, so no local changes were overwritten.

🤖 Generated with Claude Code

WekaJosh and others added 2 commits August 13, 2026 13:51
Bug-fix release. Highlights:
- Multi-IP interfaces no longer break --configure (duplicate route
  adds EEXIST'd and aborted the apply); persistence backends now emit
  one config per interface covering all its addresses.
- Rollback is a true snapshot restore: SBR rules, routes, rt_tables,
  sysctl, and persistence files return to their backed-up state.
- Sysctl persistence writes the complete required set, not the delta.
- ifupdown persistence is idempotent across repeat runs.
- Assorted smaller fixes (rule priority allocation, lock race,
  netplan apply timeout, relative log paths, strict-umask dirs).

Full changelog: https://github.com/WekaJosh/SBR-Config (v1.1.0..v1.2.0)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Fixes boot-time sysctl errors for late-created interfaces (ib*):
per-interface rp_filter keys are no longer persisted to sysctl.d.
conf.default covers interfaces created after boot and the kernel uses
max(all, iface), so the global settings are sufficient. Clean
--configure runs self-heal files written by v1.2.0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@WekaJosh WekaJosh changed the title Sync preinstall/sbr-config to upstream v1.2.0 Sync preinstall/sbr-config to upstream v1.2.1 Sep 1, 2026
@WekaJosh

WekaJosh commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Updated to v1.2.1, which supersedes v1.2.0: the v1.2.0 sysctl persistence change wrote per-interface rp_filter keys into /etc/sysctl.d, which fail at boot for interfaces created by late driver load (Mellanox/IPoIB ib*) and on systems imaged from hosts with different NICs. v1.2.1 persists global keys only (conf.default covers late-created interfaces; the kernel uses max(all, iface) so conf.all=2 is sufficient) and self-heals affected files on the next clean --configure run. Release notes: https://github.com/WekaJosh/SBR-Config/releases/tag/v1.2.1

Systems-interaction fixes: networkd persistence becomes drop-ins (the
old standalone .network files could shadow or be shadowed by the link's
real config), netplan persistence merges existing routes instead of
overriding them, VLAN (dotted) interface names no longer break sysctl
handling, and the sysctl self-heal is hardened (no dry-run writes,
content-comparison staleness, rollback-time healing).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@WekaJosh WekaJosh changed the title Sync preinstall/sbr-config to upstream v1.2.1 Sync preinstall/sbr-config to upstream v1.3.0 Sep 1, 2026
@WekaJosh

WekaJosh commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Updated to v1.3.0. Two of the fixes matter for review: the systemd-networkd backend now writes drop-ins into .network.d/ instead of standalone .network files (networkd applies only the first lexically-matching file per link, so standalone files could shadow the link's real config or be silently ignored), and the netplan backend merges existing routes/routing-policy instead of overriding them (netplan replaces list values wholesale across files). Also: VLAN interface names no longer break sysctl handling, and the sysctl self-heal is hardened. Release notes: https://github.com/WekaJosh/SBR-Config/releases/tag/v1.3.0

Live-VM-validated fixes: interface-scoped DHCP lease lookups, table
allocation avoids kernel-active numeric tables (cloud-init /
ec2-net-utils policy routing), and netplan persistence skips
netplan-unmanaged interfaces instead of letting networkd strip their
addresses. Validated end-to-end on Ubuntu 26.04 and Amazon Linux 2023.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@WekaJosh WekaJosh changed the title Sync preinstall/sbr-config to upstream v1.3.0 Sync preinstall/sbr-config to upstream v1.3.1 Sep 1, 2026
@WekaJosh

WekaJosh commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Updated to v1.3.1: three fixes found during live VM validation on Ubuntu 26.04 (netplan) and Amazon Linux 2023 (systemd-networkd) -- interface-scoped DHCP lease lookups, routing-table allocation that avoids kernel-active numeric tables (cloud-init/ec2-net-utils policy routing), and netplan persistence skipping netplan-unmanaged interfaces. Both distros passed the full configure / reboot / rollback matrix, including coexistence with cloud-init and amazon-ec2-net-utils policy routing. Release notes: https://github.com/WekaJosh/SBR-Config/releases/tag/v1.3.1

Rule priorities allocate from 10000 instead of 100 (leaving lower
values for VPN/firewall/admin rules that should take precedence), and
every persistence backend now sets the priority explicitly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@WekaJosh WekaJosh changed the title Sync preinstall/sbr-config to upstream v1.3.1 Sync preinstall/sbr-config to upstream v1.4.0 Sep 1, 2026
@WekaJosh

WekaJosh commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Updated to v1.4.0: IP rule priorities now allocate from 10000 instead of 100, leaving lower priorities free for VPN/firewall/admin rules that should evaluate first, and all persistence backends set the priority explicitly (the NM dispatcher and ifupdown backends previously let the kernel assign one at boot). Existing systems keep working rules at old priorities; rollback + configure renumbers. Release notes: https://github.com/WekaJosh/SBR-Config/releases/tag/v1.4.0

Adds -R/--rule-priority for a configurable rule priority base
(default 10000); persistence now follows actual per-IP rule
priorities, and the planner enforces a hard ceiling below the main
table lookup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@WekaJosh WekaJosh changed the title Sync preinstall/sbr-config to upstream v1.4.0 Sync preinstall/sbr-config to upstream v1.5.0 Sep 1, 2026
@WekaJosh

WekaJosh commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

Updated to v1.5.0: adds -R/--rule-priority to set the rule priority base per environment (default 10000), persistence now derives priorities from the rules actually in effect (per source IP), and the planner refuses to allocate priorities at/above the main table lookup. Release notes: https://github.com/WekaJosh/SBR-Config/releases/tag/v1.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant