feat: config mode vs api mode for topology management#1772
Open
micpapal wants to merge 56 commits into
Open
Conversation
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com> Signed-off-by: Michele Papalini <49271675+micpapal@users.noreply.github.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Contributor
|
The latest Buf updates on your PR. Results from workflow ci-buf / buf (pull_request).
|
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
…groupdeployment-based-routing Signed-off-by: Michele Papalini <micpapal@cisco.com>
…ment-based-routing' into 1768-config-mode-vs-api-mode-for-topology-management
…ment-based-routing' into 1768-config-mode-vs-api-mode-for-topology-management Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Base automatically changed from
1745-update-slimctl-controller-commands-for-groupdeployment-based-routing
to
main
June 29, 2026 13:13
Signed-off-by: Michele Papalini <micpapal@cisco.com>
9dde01c to
bbe416c
Compare
…nagement Signed-off-by: Michele Papalini <micpapal@cisco.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
Signed-off-by: Michele Papalini <micpapal@cisco.com>
This reverts commit 1aafee8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary
Implements dual topology management modes for the SLIM control plane: config-managed (YAML file is source of truth) and API-managed (DB is source of truth with full CRUD via gRPC/CLI). Adds topology mutation commands, persistence for config→API mode transitions, and controller restart resilience.
Topology management modes
The control plane operates in one of two mutually exclusive modes based on whether the config file contains a
topologysection:Config mode (topology section present)
$groupexpansion re-evaluated when new nodes registerAPI mode (no topology section)
slimctland gRPC APIsChanges
Topology persistence and startup logic
clear_runtime_state()— new DB method that clears nodes, links, routes but preserves topology config. Called on API-mode startup.clear_all_state()— clears everything (runtime + topology). Called on config-mode startup. Internally delegates toclear_runtime_state().persist_segments_to_db()— in config mode, writes expanded segments/links to DB afterrebuild_link_graph(), enabling config→API mode transition without losing topologyload_topology_from_db()— on API-mode startup, reconstructs in-memory segment graphs from DBTopology mutation APIs (API mode only)
controller segment add <NAME>— create a new segmentcontroller segment remove <NAME>— remove a segment and all its linkscontroller link add --segment <S> <GROUP_A> <GROUP_B>— add inter-group link to a segmentcontroller link remove --segment <S> <GROUP_A> <GROUP_B>— remove inter-group link from a segmentAddSegment,RemoveSegment,AddTopologyLink,RemoveTopologyLinkNode reconnection resilience
clear_runtime_state()DB schema additions
topology_segmentstable — stores segment definitionstopology_segment_linkstable — stores inter-group links within each segmentadd_link_to_segmentmade idempotent (duplicate links ignored)Related
Type of Change
Checklist