Cg standalone impl - #1337
Open
geoffrey1330 wants to merge 17 commits into
Open
Cg standalone impl#1337geoffrey1330 wants to merge 17 commits into
geoffrey1330 wants to merge 17 commits into
Conversation
…(Phase 1) Decouple the consistency group from replication policies and add the standalone surface the design's Phase 1 calls for: - model: ConsistencyGroup gains a cluster-unique name; policy_id optional. LVol gains a denormalized group_id pointer (set at join, cleared at detach). - controller: extract group-first cores (ensure_group idempotent by name, add_member_to_group, remove_member_from_group, create_group_snapshot_for_group with an explicit health precheck naming offline/off-store members) that the policy path now calls as thin wrappers; new list_members, list_generations (expected-vs-present), delete_generation, clone_generation. - volume create: consistency_group field ensures the group, pins placement, and joins the member atomically. Volume delete closes the epoch while preserving prior-generation snapshots. - snapshot listing surfaces group_id/group_seq and a --consistency-group filter. - web v2: new /consistency-groups router (summary, members, take/list/get/delete generation, detach); volume create/read and snapshot list extended. - CLI: new consistency-group command group plus --consistency-group flags. - tests: epoch math, ensure-by-name idempotency + convergence, precheck, incomplete-generation, delete-preserves, clone-forms-group. tox lint/types green; full unit suite 2805 passed. Refs design-consistency-groups.md §4-§8, §10. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Go control-plane client's do() treats every 201 as a Location-header creation and extracts a UUID; the take-generation endpoint instead returns the generation representation as a JSON body, so it must be 200. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The group snapshot freezes I/O across every member for one bdev_lvol_snapshot_group call, so an unbounded group would freeze arbitrarily many volumes and widen the all-or-nothing rollback surface. - MAX_CONSISTENCY_GROUP_MEMBERS = 20 in constants. - add_member_to_group rejects a join past the cap (authoritative for both the label path and the legacy policy path); the cap counts open epochs, so a detached member frees its slot. - add_lvol_ha rejects the 21st member before the lvol is created, so a full group never leaves an orphan volume. - tests: 21st member rejected, detached member frees a slot. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…g standalone groups unreadable
… crashed services); pin all import orders with a test
…fault (1) as a dictated nsid and failed on shared subsystems whose slot 1 was taken
… _CloneParams and clone(), join_new_volume helper (design §7.2)
…unted forever — removed_seq=0 collides with the open-epoch sentinel; drop entries no generation contains
…lign legacy fdb stub with tests/unit
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
| rec = db.get_snapshot_by_id(snap_id) | ||
| db.unindex_snapshot(rec) | ||
| rec.remove(db.kv_store) | ||
| except Exception: |
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.
No description provided.