You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(storage): drop invalid lvcreate --kernel flag breaking LVM-thin clone/restore (BUG-043) + n-rst harness (BUG-044) (#158)
* fix(storage): drop invalid lvcreate --kernel flag from LVM-thin clone/restore (BUG-043)
Thin.RestoreVolumeFromSnapshot built an `lvcreate --snapshot ...`
command that included a `--kernel` token. That is not a valid lvcreate
option (`lvcreate: unrecognized option '--kernel'`, exit 3) on
LVM >= 2.03, so the destination backing LV was never created. As a
result DRBD never came up and clone / snapshot-restore onto LVM-thin
pools never converged to UpToDate. This is the shared seed path for
both clone and snapshot-restore on LVM-thin (LUKS cells default to
POOL=lvm-thin and hit it too); ZFS pools use a separate `zfs clone`
path and were unaffected.
Remove the `--kernel` token. The remaining args form a correct thin
snapshot/clone command — `lvcreate --snapshot --setactivationskip n
--activate y --name <tgt> <vg>/<src-snap>` — matching the normal
CreateSnapshot shape plus the activation flags needed to make the
cloned LV usable. The stale doc-comment is corrected accordingly.
Add a unit regression pinning the generated lvcreate argv for the
thin restore/clone path: it asserts the expected thin-snapshot form
and that no lvcreate invocation carries `--kernel`.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
* test(harness): read wire flags via .flags not .rsc_flags in cli-matrix (BUG-044)
n-rst-recreates-tiebreaker and several sibling cli-matrix cells read
the resource-level flags from the `linstor resource list
--machine-readable` output via a `.rsc_flags` jq key that does not
exist on the blockstor wire — the field is `.flags`
(pkg/api/v1/resource.go: `Flags []string json:"flags"`). `.rsc_flags //
[]` therefore always evaluated to an empty array, so every flag check
silently counted zero matches: n-rst saw 0 TIE_BREAKER even though the
witness is correctly recreated, and the tiebreaker-collapse / reap /
diskless-selection assertions in the sibling cells degenerated to
no-ops or wrong-row selections.
Switch every `.rsc_flags` reference to `.flags`, mirroring the working
sibling cells (r-c-over-tiebreaker-skip-sync.sh, r-l-conns-shapes.sh)
that already read `.flags` from the same machine-readable resource
list. The product is correct; this is a harness-only fix.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
---------
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments