mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 11:07:31 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6317e3beb | ||
|
|
3404bf5e00 | ||
|
|
e58a806489 | ||
|
|
62bd08e0c0 |
No files matched your search
+4
-5
@@ -11,14 +11,14 @@ cmd/sw-block/volume_backup.go RestoreCommand.Abort
|
||||
cmd/sw-block/volume_backup.go RestoreCommand.AbortVerify
|
||||
cmd/sw-block/volume_backup.go RestoreCommand.Run
|
||||
cmd/sw-block/volume_backup.go RestoreCommand.Start
|
||||
cmd/sw-block/volume_start_release.go StopAndRestart.CrashRestart
|
||||
cmd/sw-block/volume_start_release.go StopAndRestart.IssueClean
|
||||
cmd/sw-block/volume_start_release.go StopAndRestart.ReadClean
|
||||
cmd/sw-block/volume_start_release.go StopAndRestart.SameEpochReopen
|
||||
cmd/sw-block/volume_verbs.go CutTime.CliGiveUp
|
||||
cmd/sw-block/volume_verbs.go CutTime.Poll
|
||||
cmd/sw-block/workspace_show.go MoveAdmission.ReadForMove
|
||||
core/authority/authority.go DeleteRetire.RetireLine
|
||||
core/authority/authority_store_file.go DeleteRetire.RetireLine
|
||||
core/authority/authority.go DeleteRetire.Retire
|
||||
core/authority/authority_store_file.go DeleteRetire.Retire
|
||||
core/authority/workspace.go HolderInterface.ForcedMove
|
||||
core/authority/workspace.go HolderInterface.PlannedMove
|
||||
core/authority/workspace.go MoveAdmission.Ack
|
||||
@@ -36,7 +36,7 @@ core/authority/workspace_delete_reservation.go MoveAdmission.DelCheck
|
||||
core/authority/workspace_delete_reservation.go MoveAdmission.Reserve
|
||||
core/authority/workspace_lease_view.go HolderInterface.Grant
|
||||
core/authority/workspace_lease_view.go HolderInterface.Regrant
|
||||
core/authority/workspace_retirement.go DeleteRetire.RetireLine
|
||||
core/authority/workspace_retirement.go DeleteRetire.Retire
|
||||
core/engine/apply.go ReplicationPeer.Reconcile
|
||||
core/frontend/chunkstore/catalog_b.go CleanBatch.Publish
|
||||
core/frontend/chunkstore/catalog_b.go CleanBatch.Request
|
||||
@@ -187,7 +187,6 @@ core/frontend/durable/provider_layout.go EngineAdapter.SettleDown
|
||||
core/frontend/durable/provider_layout.go StopAndRestart.SettleDown
|
||||
core/frontend/durable/provider_preempt.go CutTime.Preempt
|
||||
core/frontend/durable/provider_preempt.go CutTime.Settle
|
||||
core/frontend/durable/provider_seal_replay.go PlainSealReplay.Reply
|
||||
core/frontend/durable/storage_adapter.go EngineAdapter.GuestWrite
|
||||
core/frontend/durable/storage_adapter.go HolderInterface.Write
|
||||
core/frontend/durable/storage_adapter.go WALHold.Resubmit
|
||||
|
||||
|
@@ -1,69 +0,0 @@
|
||||
package layout
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// pausedAfterWindow is the store as a paused adopter sees it: its first HEAD
|
||||
// read returns the HEAD of that moment, and then, before the adopter acts on
|
||||
// it, the rest of the cluster moves on (pause).
|
||||
type pausedAfterWindow struct {
|
||||
*chainStore
|
||||
reads int
|
||||
pause func()
|
||||
}
|
||||
|
||||
func (s *pausedAfterWindow) ReadHead(ctx context.Context) (Head, bool, error) {
|
||||
h, found, err := s.chainStore.ReadHead(ctx)
|
||||
s.reads++
|
||||
if s.reads == 1 && s.pause != nil {
|
||||
s.pause()
|
||||
}
|
||||
return h, found, err
|
||||
}
|
||||
|
||||
// An adopter that passed its delete-intent window and then paused must not
|
||||
// re-tag the page once the window has moved on. During its pause a cleaner
|
||||
// pass moved the HEAD generation, the unlinked page was deleted, and another
|
||||
// executor of the same operation staged it again at the new base. Acting on
|
||||
// its stale window, the adopter would take over that new executor's page
|
||||
// under the old base's writer tag; it must refuse instead and leave the page
|
||||
// as the new executor staged it.
|
||||
func TestAPausedAdopterDoesNotRetagAPageStagedAgainAfterItsWindow(t *testing.T) {
|
||||
s, c, p := deleteIntentFixture(t)
|
||||
ctx := context.Background()
|
||||
base := s.h.Gen
|
||||
if _, err := StageSnapshotDeletePage(ctx, s, base, p); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
rel, err := c.Ref.Path()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
paused := &pausedAfterWindow{chainStore: s, pause: func() {
|
||||
// A cleaner pass (two HEAD generations) removes the unlinked page,
|
||||
// then another executor stages it again at the new base.
|
||||
s.h.Gen = base + 2
|
||||
delete(s.objs, s.full(rel))
|
||||
if _, err := StageSnapshotDeletePage(ctx, s, base+2, p); err != nil {
|
||||
t.Errorf("the second executor's staging: %v", err)
|
||||
}
|
||||
}}
|
||||
adoptErr := adoptDeleteIntentPage(ctx, paused, s.volume, base, c.Ref)
|
||||
|
||||
meta, found, err := s.Stat(ctx, rel)
|
||||
if err != nil || !found {
|
||||
t.Fatalf("stat the page: %v %v", found, err)
|
||||
}
|
||||
if meta.Session != p.Producer || meta.Mark != "" {
|
||||
t.Fatalf("the paused adopter re-tagged the page staged at the new base: tags %+v (adopt: %v), want the second executor's %q", meta, adoptErr, p.Producer)
|
||||
}
|
||||
if adoptErr == nil {
|
||||
t.Fatal("the paused adopter acted on a window that had moved on: want a refusal")
|
||||
}
|
||||
if !errors.Is(adoptErr, ErrPrecondition) && !errors.Is(adoptErr, ErrBusy) {
|
||||
t.Fatalf("the paused adopter was refused with %v, want ErrPrecondition or ErrBusy", adoptErr)
|
||||
}
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
package chunkstore
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/seaweedfs/seaweed-block/core/frontend/chunkstore/filerpb"
|
||||
"github.com/seaweedfs/seaweed-block/core/frontend/chunkstore/layout"
|
||||
)
|
||||
|
||||
// betweenLookupAndUpdate runs before, once, ahead of the first UpdateEntry:
|
||||
// what other writers do while a stale one is between its lookup and its
|
||||
// conditional update.
|
||||
type betweenLookupAndUpdate struct {
|
||||
Filer
|
||||
once sync.Once
|
||||
before func()
|
||||
}
|
||||
|
||||
func (f *betweenLookupAndUpdate) UpdateEntry(ctx context.Context, dir string, e *filerpb.Entry, expected map[string][]byte) error {
|
||||
f.once.Do(f.before)
|
||||
return f.Filer.UpdateEntry(ctx, dir, e, expected)
|
||||
}
|
||||
|
||||
// A stale metadata change (a delete-intent page's adoption by an executor
|
||||
// that paused between its lookup and its update) must not write the entry it
|
||||
// looked up over an object that was deleted and created again with the same
|
||||
// tags in between: the update would put the deleted object's chunk list on
|
||||
// the new entry, and the filer frees the new entry's chunks.
|
||||
func TestAStaleMetadataChangeDoesNotOverwriteARecreatedObject(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
f, b := newFakeFiler(), newFakeBlobs()
|
||||
var id layout.VolumeID
|
||||
for i := range id {
|
||||
id[i] = 0x30 + byte(i)
|
||||
}
|
||||
others, err := NewLayoutStore(f, b, "/vol", id)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
hooked := &betweenLookupAndUpdate{Filer: f}
|
||||
stale, err := NewLayoutStore(hooked, b, "/vol", id)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
data := bytes.Repeat([]byte{0x5a}, 4096)
|
||||
rel := layout.NameChunk(1, data).Path()
|
||||
dir, name, err := others.object(rel)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
fidOf := func() string {
|
||||
t.Helper()
|
||||
e, err := f.LookupEntry(ctx, dir, name)
|
||||
if err != nil || len(e.Chunks) != 1 {
|
||||
t.Fatalf("lookup %s: %+v %v", rel, e, err)
|
||||
}
|
||||
return e.Chunks[0].FileId
|
||||
}
|
||||
|
||||
if err := others.Create(ctx, rel, data, "producer-1"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
first := fidOf()
|
||||
meta, found, err := others.Stat(ctx, rel)
|
||||
if err != nil || !found {
|
||||
t.Fatalf("stat: %v %v", found, err)
|
||||
}
|
||||
var second string
|
||||
hooked.before = func() {
|
||||
// While the stale writer is between lookup and update: a cleaner
|
||||
// marks and deletes the object, and another executor of the same
|
||||
// operation creates it again with the same producer tag.
|
||||
if err := others.Mark(ctx, rel, meta, "clean-1"); err != nil {
|
||||
t.Errorf("mark: %v", err)
|
||||
}
|
||||
if err := others.DeleteMarked(ctx, rel, "clean-1"); err != nil {
|
||||
t.Errorf("delete: %v", err)
|
||||
}
|
||||
if err := others.Create(ctx, rel, data, "producer-1"); err != nil {
|
||||
t.Errorf("re-create: %v", err)
|
||||
}
|
||||
second = fidOf()
|
||||
}
|
||||
reuseErr := stale.Reuse(ctx, rel, meta, "writer-1")
|
||||
|
||||
if second == "" || second == first {
|
||||
t.Fatalf("fixture: the object was not re-created with a new chunk (first %s, second %s)", first, second)
|
||||
}
|
||||
if got := fidOf(); got != second {
|
||||
t.Fatalf("the stale update wrote the deleted object's chunk %s over the re-created object's %s (Reuse: %v)", got, second, reuseErr)
|
||||
}
|
||||
if !errors.Is(reuseErr, layout.ErrPrecondition) {
|
||||
t.Fatalf("the stale update over a re-created object answered %v, want ErrPrecondition", reuseErr)
|
||||
}
|
||||
}
|
||||
@@ -547,6 +547,8 @@ Tests: `TestMaintenanceKickRunsAPassNow`, `TestMaintenanceKickedBusyPassRetriesS
|
||||
`TestDefaultConfigCleansAfterEachSnapshotDelete`. Detach/fence/Close cancels and joins before
|
||||
catalog/storage release; only a still-current handle may re-arm after safe abort.
|
||||
A pass has no total deadline. Its one-minute no-progress window renews only on a strict advance of this pass's finite (phase, cursor) work position; a stalled pass answers `no_progress`. Each remote request has a separate 30 s deadline; request attempts never renew the window. The existing cursor resumes later; retention failure skips cleaning.
|
||||
A scoped GC pass traces the whole catalog but mutates only its target volume,
|
||||
with a separate scope/config-bound mark. Incomplete marks carry no coverage.
|
||||
|
||||
The scheduled-snapshot worker runs beside it under the same owner and join, on
|
||||
in-process monotonic time: `Armed -> Due -> Running -> Armed`. A success sets the
|
||||
@@ -1036,7 +1038,7 @@ Notes:
|
||||
| `INV-WS-HEAD-KEY-PROVENANCE-001` | RETIRED at the cut-over to the content-named store: intents are gone and a content name may be written again. Replaced by `INV-SNAPK-COMMIT-REACH-001`. | M5 Manifest → CAS | — (`PrepareManifest` and `core/frontend/chunkstore/manifest.go` were deleted) | — | — | ARCHIVED |
|
||||
| `INV-WS-REOPEN-FENCE-001` | Retired: the legacy same-holder reopen replaced HEAD generation. B fences by claim id and local-root lineage (`INV-SNAPK-START-ROOT-001`, `INV-SNAPK-START-CLAIM-001`, `INV-SNAPK-STALE-HOLDER-001`); an ordinary same-root reopen may leave HEAD unchanged. | legacy M4 | — | — | — | ARCHIVED |
|
||||
| `INV-WS-SEALED-REOPEN-001` | A same-epoch Start cannot reactivate a detached HEAD: it refuses before another HEAD update or serving, preserving its current root, position and detached state for a higher-epoch claimant. | M9 detached → higher-epoch idle | `core/frontend/chunkstore/layout/start.go` `Start`; `core/frontend/chunkstore/layout/claim.go` `Claim` | `TestCommitDetached_ProofAndLostReply`, `TestDetachedHEAD_RefusesEveryHolderTransition` (`core/frontend/chunkstore/layout/detached_test.go`); `TestRestoreEqualOwnerDetachedHEADStaysSealed` (`core/frontend/durable/provider_seed_order_test.go`) | `INV-SNAPK-DETACHED-001` | ACTIVE |
|
||||
| `INV-WS-SEAL-REPLAY-001` | A repeated plain seal, also after a same-epoch detached restart, succeeds only from a fresh B HEAD with exact epoch, holder and local claim id. It returns that HEAD/frontier without a new generation. An unreadable or mismatched proof cannot be answered from process memory. | B detached HEAD read | `core/frontend/durable/provider_seal_replay.go` `replayPlainSeal`, `readLayoutSeal`; `cmd/blockvolume/workspace_lease.go` `workspaceLayoutDetachedGeneration` | `TestLayoutPlainDetachReplayAfterRestartNeedsNoLegacyFactory` (`core/frontend/durable/provider_layout_plain_replay_test.go`); `TestWorkspaceLayoutDetachedProof` (`cmd/blockvolume/workspace_layout_proof_test.go`) | K1: detached proof belongs to the exact claim; `PlainSealReplay` `SuccessNeedsFreshExactProof`, `ValidProofDoesNotNeedProcessMemory` (mutants `PlainSealReplay_memory`, `PlainSealReplay_no_exact`, `PlainSealReplay_layer`) | ACTIVE |
|
||||
| `INV-WS-SEAL-REPLAY-001` | A repeated plain seal, also after a same-epoch detached restart, succeeds only from a fresh B HEAD with exact epoch, holder and local claim id. It returns that HEAD/frontier without a new generation. An unreadable or mismatched proof cannot be answered from process memory. | B detached HEAD read | `core/frontend/durable/provider_seal_replay.go` `replayPlainSeal`, `readLayoutSeal`; `cmd/blockvolume/workspace_lease.go` `workspaceLayoutDetachedGeneration` | `TestLayoutPlainDetachReplayAfterRestartNeedsNoLegacyFactory` (`core/frontend/durable/provider_layout_plain_replay_test.go`); `TestWorkspaceLayoutDetachedProof` (`cmd/blockvolume/workspace_layout_proof_test.go`) | K1: detached proof belongs to the exact claim | ACTIVE |
|
||||
| `INV-WS-CAS-UNKNOWN-001` | An unknown HEAD CAS outcome is settled by re-reading HEAD, never by a blind retry; until it is settled the proposal stays pending and its session stays open; settlement replays the same commit in it. | M5 CAS → Pending | `core/storage/chunk_layer.go` `captureLocked`, `resolvePending`; `core/frontend/chunkstore/layout_remote.go` | `TestChunkLayer_C6_UnknownNotAppliedNeverClaimsSuccess` (`core/storage/chunk_layer_contract_test.go`); `TestSession_UncertainCommitIsNotAbortedUntilSettled` (`core/storage/chunk_layer_session_test.go`); `TestLayoutRemote_LostReplyOfTheFirstCutIsNotAFence`, `TestLayoutRemote_LostReplyOfALaterCutWithAnInheritedChunkIsNotAFence`, `TestLayoutRemote_LostReplyOfANoOpCutIsNotAFence` (`core/frontend/chunkstore/layout_remote_same_proposal_test.go`); `TestLevelZeroCutRefusalDoesNotBecomeAnUnresolvedPublication` (`core/frontend/chunkstore/layout_format_refusal_test.go`); `TestARefusedReproposalDoesNotSettleAnEarlierUnknownWrite`, `TestARefusedConfirmationReadDoesNotUnpublishTheSuccessfulWrite` (`core/storage/chunk_head_refusal_test.go`) | — | ACTIVE |
|
||||
| `INV-WS-CLAIM-BEFORE-SERVE-001` | A new B holder claims HEAD at its issued epoch only after the local root is validated against the HEAD it updates; an older epoch or another holder at the same epoch is refused, and guest writes stay closed until assignment and claim. | M9 Start → Claim → Serving | `core/frontend/chunkstore/layout/start.go` `Start`; `core/frontend/durable/provider_layout.go` `startLayoutRoot` | `TestStart_ValidatesAgainstTheHeadItUpdates`, `TestStart_Refusals` (`core/frontend/chunkstore/layout/start_test.go`); `TestStart_TheClaimRechecksTheSeedRule` (`core/frontend/chunkstore/layout/start_seed_test.go`); `TestFreshStoreRefusesWriteBeforeAssignmentThenPublishesAfterClaim` (`core/frontend/durable/provider_restore_schedule_test.go`) | `INV-SNAPK-START-LINEAGE-001`, `INV-SNAPK-START-CLAIM-001` | ACTIVE |
|
||||
| `INV-VOL-GEOMETRY-FLAGS-RECORD-001` | A create-mode start whose `--durable-blocks`/`--durable-blocksize` disagree with the volume record exits 78 before any local store exists; an existing store is checked only at attach; an absent record keeps the create path; an unread record exits 75 (filer failed) or 78 (corrupt). | blockvolume startup (before the durable provider) | `cmd/blockvolume/main.go`; `cmd/blockvolume/chunk_remote.go` `geometryFlagsRefusal`; `core/frontend/chunkstore/layout/volume.go`, `start.go`, `create.go`; `core/frontend/chunkstore/catalog_b.go` | `TestGeometryFlagsRefusalComparesTheRecord`, `TestVolumeRequiresGeometry`, `TestVolumeGeometryChecksAndIsImmutable`, `TestStartGeometryMismatchPrecedesClaim`, `TestBCatalogRestoreCopiesVolumeGeometry`, `TestVolumeGeometryLivesOnlyInVolume` | K3: immutable required VOLUME geometry; Start checks the local persisted shape before claim; restores copy source geometry; no resize or compatibility path. | ACTIVE |
|
||||
@@ -1206,8 +1208,8 @@ Notes:
|
||||
| `INV-CUT-TIMER-SKIP-001` | A periodic cut decided from an older last cut is skipped under the capture lock: no automatic cut follows another within the interval. | M5 periodic trigger (before Admit) | `core/storage/chunk_periodic_cut.go` `CutUnlessCutSince`; `core/frontend/durable/provider_chunk.go` `chunkLoop` | `TestChunkPeriodicCut_SkipsAfterANewerCut`, `TestChunkPeriodicCut_SkipsANewerCutWithAnOlderStamp` (`core/storage/chunk_periodic_cut_test.go`); `TestWALStoreChunk_ExplicitCutOverlappingTheTimerRestartsIt` (`core/frontend/durable/provider_chunk_sched_test.go`) | — | ACTIVE |
|
||||
| `INV-CUT-TIMER-SLOT-WAIT-001` | A periodic cut refused for held host slots, pending urgent work or an earlier ticket is a wait, not a failure: no backoff or minimum spacing; it retries at the next poll in ticket order, and status reports the wait until any later cut succeeds. Other errors keep the backoff. | M5 periodic trigger (before Admit) | `core/frontend/durable/provider_chunk.go` `cutPolicy.after`, `chunkLoop`; `core/hostlimit/limiter.go` `ErrSlotsHeld` | `TestCutPolicy_HostSlotBusyIsAWaitNotAFailure`, `TestCutPolicy_SuccessDuringSlotWaitEndsTheWait`, `TestCutWaitSlot_StatusEndsTheWaitAfterALaterCut`, `TestCutPolicy_TicketOrderWaitBound` (`core/frontend/durable/cut_policy_test.go`); `TestTimerCutRunsSoonAfterHostSlotFrees`, `TestSlotWaitEndsWithASuccessfulDetachSeal` (`core/frontend/durable/host_slot_wait_test.go`); `TestAdmitClosedDuringPoolAcquisitionIsRevoked` (`core/hostlimit/limiter_test.go`) | — | ACTIVE |
|
||||
| `INV-SNAPSHOT-ANSWER-COUNT-001` | Newly produced snapshot creation and listing answers omit the uncomputed chunk count; no manifest scan is added to answer a snapshot. | M9 snapshot answer projection (no transition change) | `core/frontend/chunkstore/control_types.go`, `api.go`; `core/host/volume/chunk_control.go` | `TestSnapshotAfter200MiBWritesOmitsUncomputedChunkCount` (`core/host/volume/snapshot_chunk_count_test.go`) | NONE (pure projection of the published snapshot; no authority or persisted format change) | STUB |
|
||||
| `INV-SPEC-DELETE-RETIRE-001` | Retire spec-removed metadata only under a permanent reservation after no-live-lease and a subsequent HEAD read proves deleted or absent. Read errors, live HEAD and deleting HEAD keep the records. Retirement never removes the reservation or store data. | M4 delete retirement | `core/host/master/spec_retirement.go`; `core/authority/workspace_retirement.go`, `authority_store_file.go` | `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementDoesNotUseAbsentHeadWithoutReservation`, `TestRetirementKeepsReservationAndWaitsForLiveLease`, `TestFileAuthorityRetirementSurvivesReloadAndKeepsOtherRecords`, `TestSpecRetirementBackgroundBoundsReadsAndCachesTerminalProof`, `TestSpecRetirementLocalFailureDoesNotStopOtherVolumesOrProductTick` | DeleteRetire.ReadOK; DeleteRetire.RetireLine; DeleteRetire.RetirePlace; DeleteRetire.HostRetire | STUB |
|
||||
| `INV-SPEC-DELETE-RETRY-001` | Startup lease barriers schedule one more retirement pass after the latest observed barrier, independently of the product loop. The pass rechecks every lease and HEAD guard, logs skipped volumes, and is cancelled and joined before stores close. | M4 delete retirement scheduling | `core/host/master/host.go` `Start`, `Close`; `spec_retirement.go` `startPostFloorRetirement` | `TestStandaloneRestartRetriesSpecRetirementAfterLeaseFloor`, `TestRetirementLeaseBarrierIsOnlyASchedulingHint`, `TestPostFloorRetirementTimerJoinsOnCancellation` | DeleteRetire.ReadOK; DeleteRetire.RetireLine; DeleteRetire.RetirePlace | STUB |
|
||||
| `INV-SPEC-DELETE-RETIRE-001` | Retire spec-removed metadata only under a permanent reservation after no-live-lease and a subsequent HEAD read proves deleted or absent. Read errors, live HEAD and deleting HEAD keep the records. Retirement never removes the reservation or store data. | M4 delete retirement | `core/host/master/spec_retirement.go`; `core/authority/workspace_retirement.go`, `authority_store_file.go` | `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementDoesNotUseAbsentHeadWithoutReservation`, `TestRetirementKeepsReservationAndWaitsForLiveLease`, `TestFileAuthorityRetirementSurvivesReloadAndKeepsOtherRecords`, `TestSpecRetirementBackgroundBoundsReadsAndCachesTerminalProof`, `TestSpecRetirementLocalFailureDoesNotStopOtherVolumesOrProductTick` | DeleteRetire.ReadOK; DeleteRetire.Retire; DeleteRetire.HostRetire | STUB |
|
||||
| `INV-SPEC-DELETE-RETRY-001` | Startup lease barriers schedule one more retirement pass after the latest observed barrier, independently of the product loop. The pass rechecks every lease and HEAD guard, logs skipped volumes, and is cancelled and joined before stores close. | M4 delete retirement scheduling | `core/host/master/host.go` `Start`, `Close`; `spec_retirement.go` `startPostFloorRetirement` | `TestStandaloneRestartRetriesSpecRetirementAfterLeaseFloor`, `TestRetirementLeaseBarrierIsOnlyASchedulingHint`, `TestPostFloorRetirementTimerJoinsOnCancellation` | DeleteRetire.ReadOK; DeleteRetire.Retire | STUB |
|
||||
| `INV-SPEC-UNUSED-PLACEMENT-001` | A spec startup prunes an undesired placement only before serving and with no volume record, authority line, binding or deletion reservation, and no skipped authority recovery. The desired spec and seed are one keep set. | M4 registration input | `cmd/blockmaster/main.go`; `core/host/master/spec_retirement.go` | `TestClusterSpecImportRemovesUnusedPlacementMissingFromSpec`, `TestClusterSpecCleanupKeepsRecordsBindingsAuthorityAndSeed` | NONE (registration-only cleanup before controller activity) | STUB |
|
||||
| `INV-CHECK-DELETING-001` | A post-lease reserved volume with HEAD deleting, deleted or absent holds no serving work. Its status is informational and checks issue no lease or holder requests for it. Another volume's failures remain visible. | M9 delete observation | `core/host/master/observation_snapshot.go`, `journal_isolation.go`; `cmd/sw-block/shell_check.go` | `TestSpecRetirementRequiresDeletedOrAbsentAndReadableHead`, `TestSpecRetirementReadsHeadOnlyAfterLeaseAndKeepsTombstone`, `TestClusterCheckDoesNotProbeDeletingOrDeletedVolumes` | DeleteRetire.HostRetire | STUB |
|
||||
| `INV-CLI-DELETE-RETRY-001` | Only the final lease barrier after a committed volume-delete reservation permits retryable true/exit 75 at its horizon. A live-holder Reserve refusal requires stopping the volume first (not_admitted, non-retryable, exit 1). No lease guard is bypassed. | M9 delete admission result projection | `cmd/sw-block/chunk_volume_delete.go` `authorityErr`; `cmd/sw-block/chunk.go` `chunkResult` | `TestVolumeDeleteAdmissionRetryAnswer`; `TestOpsChunkVolumeDeleteRefusalSaysNothingWasPersisted` | MoveAdmission.DelRead; MoveAdmission.DelMark (unchanged guards) | STUB |
|
||||
|
||||
@@ -27,10 +27,6 @@ writing guest:
|
||||
5. **Under `best-effort`, a replica can fall behind while it shows `healthy`.** A `best-effort` write waits for no
|
||||
replica, so a replica whose connection dropped can keep showing `healthy` while it misses writes. Use `sync-quorum`
|
||||
when the replicas must hold the data.
|
||||
6. **An operator failover can be undone by an automatic rebalance.** With `sync-all`, or `sync-quorum` and two
|
||||
replicas, a rebalance blockmaster decided just before `sw-block ops failover` can still be applied after it and move
|
||||
the primary again. No acknowledged write is lost. After a failover, read the line with
|
||||
`sw-block ops volumes --master-api <addr> -o json` and, if the primary moved, repeat the failover against it.
|
||||
|
||||
**Planned for a later release.** Supported replicated volumes are planned for a later release; v1.1.x keeps every replicated
|
||||
configuration a preview. Replicated volumes are a preview: a primary cut off from the block master is not stopped
|
||||
|
||||
@@ -14,45 +14,6 @@ v1.1.1 is a fix release of the v1.1 line. None of its changes alters a stored fo
|
||||
- The `sw-block` commands that `mini` prints assume it is on `PATH`: in the extracted directory, run
|
||||
`export PATH="$PWD:$PATH"`. Its `weed shell` hint needs the full path of the `weed` binary given to `--weed`.
|
||||
|
||||
## Known issue: restarting blockmaster with many declared volumes
|
||||
|
||||
- **What happens:** when blockmaster restarts, it rewrites every declared volume's node and placement records to disk, one by one, before it answers again. With a few hundred declared volumes this can take longer than a running volume's lease. Running volumes then stop (`lease_expired`, exit 75), and the guest sees I/O errors on those volumes while they are stopped.
|
||||
- In our test with 999 declared volumes, blockmaster answered again after about 45 s; the 8 running volumes stopped 12–20 s after the restart.
|
||||
- With 33 declared volumes, nothing stopped.
|
||||
- No acknowledged data is lost.
|
||||
- **Recovery:** a stopped volume comes back only if it is supervised. The shipped systemd unit restarts a volume that exits 75; in our test the volumes were serving again within a minute. Otherwise, start the volume again yourself.
|
||||
- **Where it starts:** we estimate around 150 declared volumes; it depends on the disk under blockmaster's state directory.
|
||||
- **What to do:** restart blockmaster in a maintenance window if a cluster declares more than about 150 volumes. A fix is planned for v1.1.2; in our test with it, 999 volumes restarted in under 6 s including the stop, and no volume stopped.
|
||||
|
||||
## Known issue: blockmaster needs its filer to start
|
||||
|
||||
- blockmaster checks that its SeaweedFS filer answers before it starts. If the filer is unreachable, blockmaster stops with an error after about 60 s instead of starting.
|
||||
- While blockmaster cannot start, running volumes stop when their leases run out.
|
||||
- Start or fix the filer first, then start blockmaster.
|
||||
|
||||
## Known issue: `sw-block ops chunk detach --plain` waits for a scheduled periodic cut
|
||||
|
||||
- A scheduled periodic cut is not interrupted by `sw-block ops chunk detach --plain`. A detach issued while such a cut is capturing waits until the cut finishes, so on a volume with a long cut the detach takes correspondingly longer.
|
||||
- No data is lost. A fix is planned for a later v1.1.x release.
|
||||
|
||||
## Known issue: a walstore volume unit can reach its systemd start limit while blockmaster is unreachable
|
||||
|
||||
- Affects volumes on the walstore engine run by `sw-blockvolume.service`, `sw-blockvolume@.service` or `sw-blockvolume-ublk.service` (`StartLimitBurst=10` in 600 s, `RestartSec=5s`). Chunk-store volumes wait for blockmaster in process and are not affected.
|
||||
- A walstore volume that starts while blockmaster is unreachable exits with 75 after about 10 s and is restarted by systemd. After about 10 attempts (about 150 s) the unit stays failed, even once blockmaster is back.
|
||||
- No data is lost. Recover with `systemctl reset-failed <unit>`, then `systemctl start <unit>`. A fix is planned for v1.1.2.
|
||||
|
||||
## Known issue: startup retirement reads can delay blockmaster
|
||||
|
||||
- At startup blockmaster checks volumes that are reserved for deletion and hold no workspace lease, one at a time, before it serves. Each check reads the filer, so a slow filer delays the start: in our test, 100 such volumes with a 100 ms filer delay added about 20 s. Volumes in normal use are skipped without a read.
|
||||
- No data is lost. A fix is planned for v1.1.2.
|
||||
|
||||
## Known issue: replicated volumes (preview): a queued rebalance can undo an operator failover
|
||||
|
||||
- Affects replicated volumes (preview) whose acknowledgement profile allows a planned move: `sync-all`, or `sync-quorum` with two replicas.
|
||||
- blockmaster may decide an automatic rebalance, which moves the primary to a less loaded server, just before an operator's `sw-block ops failover`. If that rebalance is applied after the failover, it moves the primary again, away from the replica the operator chose.
|
||||
- No acknowledged write is lost: under these profiles every replica holds every acknowledged write.
|
||||
- What to do: after `sw-block ops failover`, read the volume's line with `sw-block ops volumes --master-api <addr> -o json`; if `primary_replica` moved again, repeat the failover with `--expect-current <primary_replica>@<epoch>`. A fix is planned for a later v1.1.x release.
|
||||
|
||||
## Upgrade notes
|
||||
|
||||
- **Order: the CLI first, then blockmaster, then each holder**, as in
|
||||
|
||||
@@ -103,7 +103,7 @@ cmd/sw-block/volume_release.go releaseLease context.WithTimeout 1 per-call NONE:
|
||||
cmd/sw-block/volume_release.go releaseLease context.WithTimeout 2 availability-contract NONE: no model row maps this file yet the wait for the recorded release: one lease validity plus slack, since the holder acknowledges at its next renewal within the lease
|
||||
cmd/sw-block/volume_release.go releaseLease time.After 1 control-timer NONE: no model row maps this file yet lease record poll during the release wait
|
||||
cmd/sw-block/volume_resolve.go runOpsVolume context.WithTimeout 1 per-call NONE: no model row maps this file yet one CLI request (operator --timeout)
|
||||
cmd/sw-block/volume_start_release.go prepareVolumeStart context.WithTimeout 1 availability-contract StopAndRestart.IssueClean; StopAndRestart.ReadClean; StopAndRestart.CrashRestart lease-query/clean-move setup (10 s), before enabling the unit; no volume data is processed
|
||||
cmd/sw-block/volume_start_release.go prepareVolumeStart context.WithTimeout 1 availability-contract StopAndRestart.IssueClean; StopAndRestart.ReadClean; StopAndRestart.SameEpochReopen lease-query/clean-move setup (10 s), before enabling the unit; no volume data is processed
|
||||
cmd/sw-block/volume_verbs.go runVolume http.Client.Timeout 1 per-call CutTime.Poll one HTTP request
|
||||
cmd/sw-block/volume_verbs.go volumeStart time.Now().Add 1 per-call CutTime.Poll volume start: the operator's --wait for it to serve
|
||||
cmd/sw-block/volume_verbs.go volumeStart time.After 1 control-timer CutTime.Poll volume start poll
|
||||
@@ -204,7 +204,7 @@ core/host/master/host.go New http.Server.IdleTimeout 1 per-call NONE: no model r
|
||||
core/host/master/probe_round.go roundEvidenceProvider.round time.NewTimer 1 per-call FencingRound.Deliver; FencingRound.Open one probe round's evidence wait
|
||||
core/host/master/services.go services.deleteHolderEvidence context.WithTimeout 1 per-call FormatGate.Report one RPC or request
|
||||
core/host/master/spec_retirement.go Host.reconcileDeletedSpecVolumes context.WithTimeout 1 per-call DeleteRetire.ReadOK one fresh HEAD read after the no-live-lease barrier
|
||||
core/host/master/spec_retirement.go Host.startPostFloorRetirement time.NewTimer 1 control-timer DeleteRetire.ReadOK; DeleteRetire.RetireLine one startup retry at the latest authority lease barrier; every guard is rechecked
|
||||
core/host/master/spec_retirement.go Host.startPostFloorRetirement time.NewTimer 1 control-timer DeleteRetire.ReadOK; DeleteRetire.Retire one startup retry at the latest authority lease barrier; every guard is rechecked
|
||||
core/host/master/spec_retirement.go Host.refreshHostDeletionProofs context.WithTimeout 1 per-call DeleteRetire.ReadOK one post-lease HEAD read for a requested host candidate; error retains work
|
||||
core/host/master/workspace_service.go services.AckWorkspaceRevoked context.WithTimeout 1 per-call FormatGate.Place; MoveAdmission.ReadForMove; StopAndRestart.ReadClean one RPC or request
|
||||
core/host/master/workspace_service.go services.MoveWorkspace context.WithTimeout 1 per-call FormatGate.Place; MoveAdmission.ReadForMove; StopAndRestart.ReadClean one RPC or request
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 49 and column 123.
|
@@ -439,9 +439,6 @@ Use this checklist when changing the feature.
|
||||
| `same-node-alpha-attach-chain.yaml` | loopback same-node accepted path |
|
||||
| `same-node-alpha-attach-negative-chain.yaml` | cross-node loopback blocked as unsupported |
|
||||
|
||||
The last three run only against the project's lab and are kept in a private test repository; the first three
|
||||
are in `testops/scenarios/`.
|
||||
|
||||
The runner must not pass a Stage 2 gate by grepping only lines it wrote itself.
|
||||
It needs independent evidence: pod UID, host sessions, multipath map, RTPG
|
||||
state, stale-I/O probe, and cleanup verifier.
|
||||
|
||||
@@ -85,6 +85,7 @@ Prefer gates that compare at least two surfaces:
|
||||
| Area | Path |
|
||||
|---|---|
|
||||
| scenario definitions | `testops/scenarios/` |
|
||||
| suites | `testops/suites/` |
|
||||
| runner contracts | `internal/docs/ref/testops-runner-binary-contract.md` |
|
||||
| control/data contract | `internal/docs/ref/testops-control-data-contract.md` |
|
||||
| QA sign-offs | `internal/docs/qa-assignments/` |
|
||||
|
||||
@@ -27,9 +27,6 @@ injection.
|
||||
| Cleanup | `cleanup-residue-chain.yaml` and cleanup verifier | zero-residue contract |
|
||||
| Protocol | `iscsi-*`, `nvme-*` | frontend-specific gates |
|
||||
|
||||
Scenarios that run against the project's lab are kept in a private test repository. This repository keeps
|
||||
the ones its own tests and scripts use; [testops/README.md](../../testops/README.md) lists them and the settings each needs.
|
||||
|
||||
## Release Evidence
|
||||
|
||||
Release claims should point to:
|
||||
|
||||
@@ -1164,11 +1164,11 @@ Approximate engineering effort if scope remains tight:
|
||||
baseline and corrects stale audit wording: ANA log/Identify/provider and CSI
|
||||
single-path NVMe stage/unstage are present. Phase 100 closed the Kubernetes
|
||||
CSI NVMe multipath attach follow-up for the supported lab path.
|
||||
- Operation milestone release readiness is blocked only on matching published
|
||||
images. Its readiness script ran against the project lab and is kept outside
|
||||
this repository with the lab scenarios; run it and the published-image Day-1
|
||||
smoke there before marking the operation milestone released. Development has
|
||||
moved ahead in parallel; this does not mark the operation milestone released.
|
||||
- Operation milestone release readiness is active and blocked only on matching
|
||||
published images. Run `scripts/run-operation-milestone-release-readiness.ps1`
|
||||
plus the published-image Day-1 smoke before marking the operation milestone
|
||||
released. Development has moved ahead in parallel; this does not mark the
|
||||
operation milestone released.
|
||||
- Phase 100 Kubernetes CSI NVMe Multipath Attach is closed. It implements and
|
||||
gates the path from dynamic PVC `protocol=nvme` and `replicationFactor=2` to
|
||||
master NVMe frontend grouping, CSI `nvmeAddrs` publish context, NodeStage
|
||||
|
||||
@@ -88,27 +88,25 @@ Default output:
|
||||
Validate a product-owned scenario:
|
||||
|
||||
```bash
|
||||
swblock validate testops/scenarios/nvme-p5-protocol-component-gate.yaml
|
||||
swblock validate testops/scenarios/csi-rf1-durable-restart-chain.yaml
|
||||
```
|
||||
|
||||
Run a product-owned scenario against a test node (every setting is required;
|
||||
testops/README.md lists them):
|
||||
Run a product-owned scenario against m02:
|
||||
|
||||
```bash
|
||||
swblock run testops/scenarios/nvme-p5-protocol-component-gate.yaml \
|
||||
--env product_root=/path/to/seaweed-block \
|
||||
--env node_host=<node address> \
|
||||
--env node_user=<ssh user> \
|
||||
--env ssh_key=/path/to/key \
|
||||
--env artifact_root=/path/to/shared/artifacts
|
||||
swblock run testops/scenarios/csi-rf1-durable-restart-chain.yaml \
|
||||
--env product_root=/tmp/seaweed_block \
|
||||
--env ssh_key=C:/work/dev_server/testdev_key
|
||||
```
|
||||
|
||||
Run the full protocol release gate (the four protocol chains in order):
|
||||
Run the full protocol release gate:
|
||||
|
||||
```bash
|
||||
SW_BLOCK_SSH_KEY=/path/to/key SW_BLOCK_NODE_HOST=<node address> \
|
||||
SW_BLOCK_NODE_USER=<ssh user> SW_BLOCK_NODE_ARTIFACT_ROOT=/path/to/shared/artifacts \
|
||||
bash scripts/testops-run-protocol-release-gate.sh
|
||||
swblock suite \
|
||||
--results-dir <evidence-store>/g15d-k8s/testops-runs/protocol-release-gate-native \
|
||||
--env product_root=/tmp/seaweed-block-nvme-p4l \
|
||||
--env ssh_key=C:/work/dev_server/testdev_key \
|
||||
C:/work/seaweed_block/testops/suites/protocol-release-gate.yaml
|
||||
```
|
||||
|
||||
Validate a finished protocol release gate bundle:
|
||||
|
||||
@@ -1,675 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# iterate-m01-replicated-write.sh — G5-5 lab hardware first-light orchestration
|
||||
#
|
||||
# Per v3-phase-15-g5-5-mini-plan.md v0.3 §2 acceptance criteria:
|
||||
# #1 verify_cluster_ready — blockmaster + 2x blockvolume, role-appropriate ready
|
||||
# #2 verify_byte_equal — kernel iSCSI write → m01verify storage-aware compare
|
||||
# #3 verify_network_catchup — iptables disconnect + /status/recovery R/H polling
|
||||
# #4 verify_restart_catchup — SIGTERM replica + restart same --durable-root
|
||||
# #5 verify_race_stress — TestG54_BinaryWiring x10 -race
|
||||
# #6 verify_full_suite — go test ./... clean
|
||||
#
|
||||
# Two-node cluster:
|
||||
# node-a (its address) — primary blockvolume + iSCSI target + blockmaster
|
||||
# node-b (its address) — replica blockvolume
|
||||
#
|
||||
# Run from local workstation (Windows / Git Bash); SSH drives both nodes.
|
||||
# Exit 0 on all-green; non-zero + diagnostic artifacts on any failure.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# --- Config (env-overridable) ---
|
||||
M01_HOST="${M01_HOST:-testdev@192.168.1.181}"
|
||||
M02_HOST="${M02_HOST:-testdev@192.168.1.184}"
|
||||
# Routable IPs for cross-host advertise (--data-addr / --ctrl-addr).
|
||||
# Extracted from M01_HOST/M02_HOST. Used as the BIND addr too in
|
||||
# Tier 2: binding to a specific local-interface IP works on Linux,
|
||||
# AND ensures the daemon ADVERTISES a routable IP to master via
|
||||
# heartbeat (peer.DataAddr in AssignmentFact). Binding 0.0.0.0
|
||||
# would advertise "0.0.0.0:port" and break primary→replica dial
|
||||
# (0.0.0.0 is not a routable destination). QA round 54 finding.
|
||||
M01_IP="${M01_HOST##*@}"
|
||||
M02_IP="${M02_HOST##*@}"
|
||||
SSH_KEY="${SSH_KEY:-/c/work/dev_server/testdev_key}"
|
||||
SRC_DIR="${SRC_DIR:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
||||
REMOTE_BUILD_DIR="${REMOTE_BUILD_DIR:-/tmp/g5_sb_build}"
|
||||
REMOTE_RUN_DIR="${REMOTE_RUN_DIR:-/tmp/g5_sb_run}"
|
||||
DURABLE_IMPL="${DURABLE_IMPL:-walstore}"
|
||||
DURABLE_BLOCKS="${DURABLE_BLOCKS:-256}" # 1 MiB at 4 KiB blocks (small for fast tests)
|
||||
DURABLE_BLOCKSIZE="${DURABLE_BLOCKSIZE:-4096}"
|
||||
ARTIFACT_DIR="${ARTIFACT_DIR:-${SRC_DIR%/*}/seaweedfs/sw-block/design/g5-artifacts}"
|
||||
|
||||
# Network ports (node-a primary side)
|
||||
M01_MASTER_PORT=9180
|
||||
M01_PRIMARY_CTRL_PORT=9210
|
||||
M01_PRIMARY_DATA_PORT=9220
|
||||
M01_PRIMARY_STATUS_PORT=9290
|
||||
M01_ISCSI_PORT=3260
|
||||
|
||||
# Network ports (node-b replica side)
|
||||
M02_REPLICA_CTRL_PORT=9211
|
||||
M02_REPLICA_DATA_PORT=9221
|
||||
M02_REPLICA_STATUS_PORT=9291
|
||||
|
||||
# iSCSI target identity (primary serves a single LUN)
|
||||
ISCSI_IQN="iqn.2026-04.io.seaweed.block:v1"
|
||||
|
||||
# Catch-up deadline (s) for #3 + #4
|
||||
CATCHUP_DEADLINE=30
|
||||
|
||||
# Two SSH option sets — DIFFERENT requirements for two patterns:
|
||||
#
|
||||
# 1. SSH_OPTS — for `ssh host "CMD"` (command-as-argument).
|
||||
# Includes `-n` to close ssh's stdin so the connection doesn't
|
||||
# wait on terminal input. Used by collect_diagnostics, status
|
||||
# polls, simple one-shot commands.
|
||||
#
|
||||
# 2. SSH_OPTS_LAUNCH — for `ssh host bash -s <<EOF ... EOF`
|
||||
# (script-via-stdin pattern, used by launch_m01/launch_m02).
|
||||
# MUST NOT include `-n` because `-n` redirects ssh stdin from
|
||||
# /dev/null, which means `bash -s` reads EOF immediately and
|
||||
# exits before running the heredoc body — the daemon never
|
||||
# starts. QA round 53 isolated this: dbg.sh on node-a confirmed
|
||||
# `bash -s` works without `-n` and silently does nothing with
|
||||
# `-n`. The PTY-hang protection comes from `-T` alone, which
|
||||
# both option sets keep.
|
||||
#
|
||||
# Both sets keep `-T` (no PTY allocation) and `BatchMode=yes`
|
||||
# (refuse to prompt for password/key passphrase).
|
||||
SSH_OPTS_BASE="-T -i ${SSH_KEY} -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o BatchMode=yes"
|
||||
SSH_OPTS="${SSH_OPTS_BASE} -n"
|
||||
SSH_OPTS_LAUNCH="${SSH_OPTS_BASE}"
|
||||
SSH_M01="ssh ${SSH_OPTS} ${M01_HOST}"
|
||||
SSH_M02="ssh ${SSH_OPTS} ${M02_HOST}"
|
||||
|
||||
# SSH_LAUNCH wraps the *_HOST ssh command with a hard timeout for
|
||||
# the launch-and-detach pattern (start_master / start_primary /
|
||||
# start_replica). Even with -T -n + setsid + nohup + disown + exit 0,
|
||||
# Windows OpenSSH occasionally fails to release the connection. The
|
||||
# 15s wall-clock cap means we move on regardless — the remote process
|
||||
# is already detached, so the only risk is a stale ssh client process
|
||||
# on the local box, which is harmless.
|
||||
#
|
||||
# Falls back to a no-op wrapper if `timeout` isn't installed (Git
|
||||
# Bash without GNU coreutils — install via `pacman -S coreutils` or
|
||||
# upgrade Git for Windows).
|
||||
if command -v timeout >/dev/null 2>&1; then
|
||||
LAUNCH_TIMEOUT_PREFIX="timeout --preserve-status 15"
|
||||
else
|
||||
LAUNCH_TIMEOUT_PREFIX=""
|
||||
fi
|
||||
|
||||
# --- Helpers ---
|
||||
|
||||
log() { printf '\033[1;36m[g5-5]\033[0m %s\n' "$*" >&2; }
|
||||
die() { printf '\033[1;31m[g5-5 FAIL]\033[0m %s\n' "$*" >&2; collect_diagnostics fail; exit 1; }
|
||||
|
||||
# launch_m01 / launch_m02 — accept a script body on stdin and execute
|
||||
# it via `bash -s` either locally (LOCAL_MODE=1) or remote ssh
|
||||
# (LOCAL_MODE=0). Used by start_master / start_primary / start_replica
|
||||
# to launch background daemons safely.
|
||||
#
|
||||
# Architect option (A) round 53: `bash -s <<EOF ... EOF` avoids the
|
||||
# `\<newline>` line-continuation hazard that plagued the prior
|
||||
# double-quoted-ssh-arg form. With `bash -s`, the heredoc body is
|
||||
# piped to remote bash's stdin and executed line-by-line with literal
|
||||
# newlines preserved — `&` and `disown` stay on separate lines no
|
||||
# matter what the local shell does to the script source.
|
||||
#
|
||||
# Hard-capped at 15s by LAUNCH_TIMEOUT_PREFIX (if `timeout` available).
|
||||
# If launch ssh hangs, we move on; remote process is already detached.
|
||||
launch_m01() {
|
||||
if [ "${LOCAL_MODE}" = "1" ]; then
|
||||
${LAUNCH_TIMEOUT_PREFIX} bash -s
|
||||
else
|
||||
# SSH_OPTS_LAUNCH (no -n) — bash -s reads from stdin; -n
|
||||
# would redirect stdin from /dev/null and bash would EOF.
|
||||
${LAUNCH_TIMEOUT_PREFIX} ssh ${SSH_OPTS_LAUNCH} ${M01_HOST} bash -s
|
||||
fi
|
||||
}
|
||||
|
||||
launch_m02() {
|
||||
if [ "${LOCAL_MODE}" = "1" ]; then
|
||||
${LAUNCH_TIMEOUT_PREFIX} bash -s
|
||||
else
|
||||
${LAUNCH_TIMEOUT_PREFIX} ssh ${SSH_OPTS_LAUNCH} ${M02_HOST} bash -s
|
||||
fi
|
||||
}
|
||||
|
||||
mkdir -p "${ARTIFACT_DIR}"
|
||||
|
||||
# Two-tier test mode (set BEFORE first SSH-or-bash command):
|
||||
# Tier 1 (LOCAL_MODE=1): single Linux host (e.g. WSL Ubuntu)
|
||||
# - both "node-a" + "node-b" processes on localhost
|
||||
# - no SSH overhead, no cross-node sync
|
||||
# - iSCSI tests skip if iscsiadm not installed
|
||||
# - use for fast iteration during dev
|
||||
# Tier 2 (default, LOCAL_MODE=0): node-a (its address) + node-b (its address)
|
||||
# - real network + real iSCSI/NVMe kernel + real cross-host wire
|
||||
# - use for deployment-realism close evidence
|
||||
LOCAL_MODE="${LOCAL_MODE:-0}"
|
||||
if [ "${LOCAL_MODE}" = "1" ]; then
|
||||
log "LOCAL_MODE=1 → Tier 1: both processes on localhost (no SSH)"
|
||||
SSH_M01="bash -c"
|
||||
SSH_M02="bash -c"
|
||||
M02_MASTER_TARGET="127.0.0.1"
|
||||
# Tier 1: bind+advertise on loopback (single host).
|
||||
M01_PRIMARY_BIND_IP="127.0.0.1"
|
||||
M02_REPLICA_BIND_IP="127.0.0.1"
|
||||
else
|
||||
log "Tier 2: m01 cross-node (override with LOCAL_MODE=1 for fast local iteration)"
|
||||
M02_MASTER_TARGET="${M01_IP}"
|
||||
# Tier 2 (architect round 54): bind+advertise on each host's
|
||||
# routable IP. The daemon advertises the literal --data-addr /
|
||||
# --ctrl-addr to master heartbeat, master mints AssignmentFact.peers
|
||||
# with the same string, primary dials it. 0.0.0.0 advertise breaks
|
||||
# cross-host (primary tries to dial 0.0.0.0:port → unroutable).
|
||||
M01_PRIMARY_BIND_IP="${M01_IP}"
|
||||
M02_REPLICA_BIND_IP="${M02_IP}"
|
||||
fi
|
||||
HAS_ISCSI=0
|
||||
if [ "${LOCAL_MODE}" = "1" ]; then
|
||||
if command -v iscsiadm >/dev/null 2>&1; then HAS_ISCSI=1; fi
|
||||
else
|
||||
HAS_ISCSI=1 # assume node-a/node-b have iscsiadm; verified at first iSCSI test
|
||||
fi
|
||||
[ "${HAS_ISCSI}" = "0" ] && log " (iscsiadm not present locally → criteria #2/#3/#4 will skip with explicit message)"
|
||||
|
||||
collect_diagnostics() {
|
||||
local label="$1"
|
||||
log "collecting diagnostics [${label}]..."
|
||||
$SSH_M01 "cat ${REMOTE_RUN_DIR}/logs/master.log 2>/dev/null" > "${ARTIFACT_DIR}/master-${label}.log" || true
|
||||
$SSH_M01 "cat ${REMOTE_RUN_DIR}/logs/primary.log 2>/dev/null" > "${ARTIFACT_DIR}/primary-${label}.log" || true
|
||||
$SSH_M02 "cat ${REMOTE_RUN_DIR}/logs/replica.log 2>/dev/null" > "${ARTIFACT_DIR}/replica-${label}.log" || true
|
||||
}
|
||||
|
||||
# poll_status — fetch /status/recovery from a given node + status port,
|
||||
# extract a JSON field via a tiny python one-liner. Returns the field
|
||||
# value on stdout or empty on failure.
|
||||
poll_status_field() {
|
||||
local ssh_cmd="$1" status_port="$2" field="$3"
|
||||
$ssh_cmd "curl -s --max-time 2 'http://127.0.0.1:${status_port}/status/recovery?volume=v1' | python3 -c 'import json,sys; d=json.load(sys.stdin); print(d.get(\"${field}\",\"\"))' 2>/dev/null" || true
|
||||
}
|
||||
|
||||
# wait_until — polls a check command until it returns 0 or deadline.
|
||||
wait_until() {
|
||||
local desc="$1" deadline_s="$2" check_cmd="$3"
|
||||
local end=$(( $(date +%s) + deadline_s ))
|
||||
while [ "$(date +%s)" -lt "${end}" ]; do
|
||||
if eval "${check_cmd}" >/dev/null 2>&1; then
|
||||
return 0
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
log "wait_until(${desc}) TIMEOUT after ${deadline_s}s"
|
||||
return 1
|
||||
}
|
||||
|
||||
# wait_until_byte_equal — poll-cycles m01verify against the replica's
|
||||
# walstore until the LBA's bytes match the expected pattern, or the
|
||||
# deadline expires. Each cycle: stop replica daemon (so OpenReadOnly
|
||||
# is honest about the no-concurrent-writer assumption), invoke
|
||||
# m01verify, restart replica. The "replica running" gap between
|
||||
# cycles is what gives the catch-up ship traffic time to land.
|
||||
#
|
||||
# Caller must ensure the replica daemon is RUNNING at entry (we kill
|
||||
# + restart). Caller is also responsible for the post-call replica
|
||||
# state (we leave it RUNNING on both success and timeout, so the
|
||||
# next test step can use the cluster).
|
||||
#
|
||||
# Usage: wait_until_byte_equal <lba> <hex-byte-pattern> <deadline_s> <desc>
|
||||
# Pattern is a single hex byte (e.g. "ab"), per m01verify --expected-pattern.
|
||||
wait_until_byte_equal() {
|
||||
local lba="$1" pattern="$2" deadline_s="$3" desc="$4"
|
||||
local end=$(( $(date +%s) + deadline_s ))
|
||||
local last_out=""
|
||||
while [ "$(date +%s)" -lt "${end}" ]; do
|
||||
# Stop replica so m01verify's OpenReadOnly assumption holds.
|
||||
$SSH_M02 "sudo killall -TERM g5-blockvolume 2>/dev/null; sleep 1" >/dev/null 2>&1 || true
|
||||
local out
|
||||
out=$($SSH_M02 "/tmp/g5-m01verify --walstore ${REMOTE_RUN_DIR}/replica-store/v1.bin --lba-start ${lba} --lba-count 1 --block-size 4096 --expected-pattern ${pattern} 2>&1" || true)
|
||||
last_out="${out}"
|
||||
# Restart replica so ship traffic can resume + cluster stays up.
|
||||
start_replica >/dev/null 2>&1 || true
|
||||
if echo "${out}" | grep -q '^OK '; then
|
||||
log " byte-equal ${desc} lba=${lba} pattern=${pattern} ✓ ($(($(date +%s) - (end - deadline_s)))s)"
|
||||
return 0
|
||||
fi
|
||||
sleep 3 # let new ships arrive between attempts
|
||||
done
|
||||
log "wait_until_byte_equal(${desc}) TIMEOUT lba=${lba} pattern=${pattern} after ${deadline_s}s; last=${last_out}"
|
||||
return 1
|
||||
}
|
||||
|
||||
# iscsi_write_pattern — drive a kernel iSCSI write at the given LBA
|
||||
# with N blocks of the supplied 0xHH hex pattern. Login + write +
|
||||
# logout under set -euo pipefail with explicit failure modes.
|
||||
# Usage: iscsi_write_pattern <lba> <count> <hex-pattern>
|
||||
# Total bytes written = count * 4096.
|
||||
iscsi_write_pattern() {
|
||||
local lba="$1" count="$2" pattern="$3"
|
||||
local bytes=$(( count * 4096 ))
|
||||
$SSH_M01 'set -euo pipefail
|
||||
sudo iscsiadm -m discovery -t st -p 127.0.0.1:'"${M01_ISCSI_PORT}"' >/dev/null
|
||||
sudo iscsiadm -m node -T '"${ISCSI_IQN}"' -p 127.0.0.1:'"${M01_ISCSI_PORT}"' --login >/dev/null
|
||||
sleep 2
|
||||
DEV=$(ls -t /dev/disk/by-path/*'"${ISCSI_IQN}"'*-lun-0 2>/dev/null | head -1)
|
||||
[ -n "$DEV" ] || { echo "ERROR: iSCSI device not visible after login"; exit 2; }
|
||||
python3 -c "import sys; sys.stdout.buffer.write(b\"\x'"${pattern}"'\" * '"${bytes}"')" | sudo dd of="$DEV" bs=4096 count='"${count}"' seek='"${lba}"' conv=fsync,nocreat
|
||||
sync
|
||||
sudo iscsiadm -m node -T '"${ISCSI_IQN}"' -p 127.0.0.1:'"${M01_ISCSI_PORT}"' --logout >/dev/null
|
||||
echo "WROTE-LBA-'"${lba}"'-COUNT-'"${count}"'-PATTERN-'"${pattern}"'"
|
||||
'
|
||||
}
|
||||
|
||||
# --- Phase 1: sync + build ---
|
||||
|
||||
sync_and_build() {
|
||||
if [ "${LOCAL_MODE}" = "1" ]; then
|
||||
if [ -n "${PREBUILT_BIN_DIR:-}" ] && [ -x "${PREBUILT_BIN_DIR}/g5-blockmaster" ]; then
|
||||
log "phase 1: use pre-built binaries from PREBUILT_BIN_DIR=${PREBUILT_BIN_DIR}"
|
||||
cp "${PREBUILT_BIN_DIR}/g5-blockmaster" /tmp/g5-blockmaster
|
||||
cp "${PREBUILT_BIN_DIR}/g5-blockvolume" /tmp/g5-blockvolume
|
||||
cp "${PREBUILT_BIN_DIR}/g5-m01verify" /tmp/g5-m01verify
|
||||
chmod +x /tmp/g5-blockmaster /tmp/g5-blockvolume /tmp/g5-m01verify
|
||||
return
|
||||
fi
|
||||
log "phase 1: build binaries locally (LOCAL_MODE — no sync, no scp)"
|
||||
log " hint: cross-compile on Windows + set PREBUILT_BIN_DIR if WSL Go is too old (project needs go 1.21+)"
|
||||
cd "${SRC_DIR}" && \
|
||||
go build -o /tmp/g5-blockmaster ./cmd/blockmaster/ && \
|
||||
go build -o /tmp/g5-blockvolume ./cmd/blockvolume/ && \
|
||||
go build -tags m01verify -o /tmp/g5-m01verify ./cmd/m01verify/ \
|
||||
|| die "local build failed (try PREBUILT_BIN_DIR=/path/to/cross-compiled-bins)"
|
||||
return
|
||||
fi
|
||||
# Tier 2 PREBUILT_BIN_DIR fast-path (architect option (a) round 53):
|
||||
# If the operator has pre-built the 3 binaries (e.g. on a Windows
|
||||
# workstation cross-compiled GOOS=linux, or fetched from a CI
|
||||
# artifact), skip the source-tar + remote-build cycle entirely.
|
||||
# Just scp the binaries to node-a:/tmp/ and onward to node-b.
|
||||
if [ -n "${PREBUILT_BIN_DIR:-}" ]; then
|
||||
log "phase 1: use pre-built binaries from PREBUILT_BIN_DIR=${PREBUILT_BIN_DIR}"
|
||||
for bin in g5-blockmaster g5-blockvolume g5-m01verify; do
|
||||
[ -x "${PREBUILT_BIN_DIR}/${bin}" ] || \
|
||||
die "PREBUILT_BIN_DIR set but ${PREBUILT_BIN_DIR}/${bin} is missing or not executable"
|
||||
done
|
||||
scp -i "${SSH_KEY}" -o StrictHostKeyChecking=no \
|
||||
"${PREBUILT_BIN_DIR}/g5-blockmaster" \
|
||||
"${PREBUILT_BIN_DIR}/g5-blockvolume" \
|
||||
"${PREBUILT_BIN_DIR}/g5-m01verify" \
|
||||
"${M01_HOST}:/tmp/" >/dev/null \
|
||||
|| die "scp pre-built binaries → m01 failed"
|
||||
log " scp blockvolume + m01verify to M02..."
|
||||
$SSH_M01 "scp -o StrictHostKeyChecking=no /tmp/g5-blockvolume /tmp/g5-m01verify ${M02_HOST}:/tmp/" >/dev/null \
|
||||
|| die "scp m01→M02 failed"
|
||||
return
|
||||
fi
|
||||
|
||||
log "phase 1: sync source + build binaries on m01"
|
||||
# Safety guard (architect option (a) round 53 binding): refuse to tar
|
||||
# if SRC_DIR is empty / "/" / missing repo markers. Catches the case
|
||||
# where the script was copied away from the repo (e.g. SMB-driven
|
||||
# `bash /tmp/iterate.sh`) and SRC_DIR resolves to / — without this
|
||||
# guard, the next line would tar the entire root filesystem.
|
||||
case "${SRC_DIR}" in
|
||||
""|"/")
|
||||
die "SRC_DIR refuses to be empty or '/' (would tar root filesystem); set PREBUILT_BIN_DIR or run from a real seaweed_block checkout"
|
||||
;;
|
||||
esac
|
||||
[ -f "${SRC_DIR}/go.mod" ] && [ -d "${SRC_DIR}/cmd/blockvolume" ] || \
|
||||
die "SRC_DIR=${SRC_DIR} doesn't look like a seaweed_block checkout (missing go.mod or cmd/blockvolume/); set PREBUILT_BIN_DIR or fix SRC_DIR"
|
||||
|
||||
cd "${SRC_DIR}"
|
||||
tar --exclude='.git' --exclude='*.exe' --exclude='*.test' -czf /tmp/g5-src.tgz .
|
||||
scp -i "${SSH_KEY}" -o StrictHostKeyChecking=no /tmp/g5-src.tgz "${M01_HOST}:/tmp/" >/dev/null
|
||||
$SSH_M01 "rm -rf ${REMOTE_BUILD_DIR} && mkdir -p ${REMOTE_BUILD_DIR} && cd ${REMOTE_BUILD_DIR} && tar xzf /tmp/g5-src.tgz"
|
||||
|
||||
$SSH_M01 "
|
||||
cd ${REMOTE_BUILD_DIR} && \
|
||||
go build -o /tmp/g5-blockmaster ./cmd/blockmaster/ && \
|
||||
go build -o /tmp/g5-blockvolume ./cmd/blockvolume/ && \
|
||||
go build -tags m01verify -o /tmp/g5-m01verify ./cmd/m01verify/
|
||||
" || die "build failed on m01"
|
||||
|
||||
log " scp blockvolume + m01verify to M02..."
|
||||
$SSH_M01 "scp -o StrictHostKeyChecking=no /tmp/g5-blockvolume /tmp/g5-m01verify ${M02_HOST}:/tmp/" >/dev/null \
|
||||
|| die "scp m01→M02 failed"
|
||||
}
|
||||
|
||||
# --- Phase 2: cluster lifecycle ---
|
||||
|
||||
write_topology() {
|
||||
$SSH_M01 "cat > ${REMOTE_RUN_DIR}/topology.yaml <<EOF
|
||||
volumes:
|
||||
- volume_id: v1
|
||||
slots:
|
||||
- replica_id: r1
|
||||
server_id: m01-primary
|
||||
- replica_id: r2
|
||||
server_id: m02-replica
|
||||
EOF"
|
||||
}
|
||||
|
||||
start_master() {
|
||||
log " start blockmaster on m01..."
|
||||
# Architect option (A) round 53: pipe command via `bash -s`
|
||||
# heredoc instead of double-quoted ssh argument. Single-line
|
||||
# `setsid nohup ... &` (no `\<newline>` continuations) avoids
|
||||
# the local-shell line-collapse hazard that joined `&` into the
|
||||
# following `disown` statement, making remote bash wait on the
|
||||
# bg job and hang the SSH session.
|
||||
launch_m01 <<EOF
|
||||
setsid nohup /tmp/g5-blockmaster --authority-store ${REMOTE_RUN_DIR}/master-store --listen 0.0.0.0:${M01_MASTER_PORT} --topology ${REMOTE_RUN_DIR}/topology.yaml --expected-slots-per-volume 2 --t0-print-ready > ${REMOTE_RUN_DIR}/logs/master.log 2>&1 </dev/null &
|
||||
disown \$! 2>/dev/null || true
|
||||
sleep 1
|
||||
exit 0
|
||||
EOF
|
||||
}
|
||||
|
||||
start_primary() {
|
||||
log " start primary blockvolume on m01..."
|
||||
launch_m01 <<EOF
|
||||
setsid nohup /tmp/g5-blockvolume --master 127.0.0.1:${M01_MASTER_PORT} --server-id m01-primary --volume-id v1 --replica-id r1 --ctrl-addr ${M01_PRIMARY_BIND_IP}:${M01_PRIMARY_CTRL_PORT} --data-addr ${M01_PRIMARY_BIND_IP}:${M01_PRIMARY_DATA_PORT} --status-addr 127.0.0.1:${M01_PRIMARY_STATUS_PORT} --status-recovery --durable-root ${REMOTE_RUN_DIR}/primary-store --durable-impl ${DURABLE_IMPL} --durable-blocks ${DURABLE_BLOCKS} --durable-blocksize ${DURABLE_BLOCKSIZE} --iscsi-listen 127.0.0.1:${M01_ISCSI_PORT} --iscsi-iqn ${ISCSI_IQN} --t1-readiness --degraded-probe-interval=5s > ${REMOTE_RUN_DIR}/logs/primary.log 2>&1 </dev/null &
|
||||
disown \$! 2>/dev/null || true
|
||||
sleep 1
|
||||
exit 0
|
||||
EOF
|
||||
}
|
||||
|
||||
start_replica() {
|
||||
log " start replica blockvolume on M02..."
|
||||
launch_m02 <<EOF
|
||||
mkdir -p ${REMOTE_RUN_DIR}/{logs,replica-store}
|
||||
setsid nohup /tmp/g5-blockvolume --master ${M02_MASTER_TARGET}:${M01_MASTER_PORT} --server-id m02-replica --volume-id v1 --replica-id r2 --ctrl-addr ${M02_REPLICA_BIND_IP}:${M02_REPLICA_CTRL_PORT} --data-addr ${M02_REPLICA_BIND_IP}:${M02_REPLICA_DATA_PORT} --status-addr 127.0.0.1:${M02_REPLICA_STATUS_PORT} --status-recovery --durable-root ${REMOTE_RUN_DIR}/replica-store --durable-impl ${DURABLE_IMPL} --durable-blocks ${DURABLE_BLOCKS} --durable-blocksize ${DURABLE_BLOCKSIZE} --t1-readiness > ${REMOTE_RUN_DIR}/logs/replica.log 2>&1 </dev/null &
|
||||
disown \$! 2>/dev/null || true
|
||||
sleep 1
|
||||
exit 0
|
||||
EOF
|
||||
}
|
||||
|
||||
start_cluster() {
|
||||
log "phase 2: start cluster"
|
||||
# Pre-flight: drop any stale iptables rules from prior aborted runs.
|
||||
# Both possible patterns (old INPUT-on-node-b and new OUTPUT-on-node-a) are
|
||||
# cleared so repeated test runs don't poison each other. Use `|| true`
|
||||
# so missing rules don't fail set -e.
|
||||
$SSH_M01 "sudo iptables -D OUTPUT -d ${M02_IP} -p tcp --dport ${M02_REPLICA_DATA_PORT} -j DROP 2>/dev/null || true"
|
||||
$SSH_M02 "sudo iptables -D INPUT -p tcp --dport ${M02_REPLICA_DATA_PORT} -j DROP 2>/dev/null || true"
|
||||
$SSH_M01 "sudo pkill -9 -f '[g]5-blockvolume' 2>/dev/null || true; sudo pkill -9 -f '[g]5-blockmaster' 2>/dev/null || true; rm -rf ${REMOTE_RUN_DIR} && mkdir -p ${REMOTE_RUN_DIR}/{logs,master-store,primary-store}"
|
||||
$SSH_M02 "sudo pkill -9 -f '[g]5-blockvolume' 2>/dev/null || true; rm -rf ${REMOTE_RUN_DIR} && mkdir -p ${REMOTE_RUN_DIR}/{logs,replica-store}"
|
||||
write_topology
|
||||
start_master
|
||||
start_primary
|
||||
start_replica
|
||||
}
|
||||
|
||||
stop_cluster() {
|
||||
log "stop cluster"
|
||||
$SSH_M01 "sudo pkill -9 -f '[g]5-blockvolume' 2>/dev/null || true; sudo pkill -9 -f '[g]5-blockmaster' 2>/dev/null || true" || true
|
||||
$SSH_M02 "sudo pkill -9 -f '[g]5-blockvolume' 2>/dev/null || true" || true
|
||||
}
|
||||
|
||||
# --- Phase 3: verify steps (per mini-plan v0.3 §2) ---
|
||||
|
||||
# §2 #1 — cluster reaches role-appropriate ready state
|
||||
verify_cluster_ready() {
|
||||
log "verify_cluster_ready: primary should reach Healthy=true; replica Healthy=false"
|
||||
wait_until "primary Healthy=true" 15 \
|
||||
"[ \"\$($SSH_M01 \"curl -s --max-time 2 'http://127.0.0.1:${M01_PRIMARY_STATUS_PORT}/status?volume=v1' | grep -o '\\\"Healthy\\\":true'\")\" = '\"Healthy\":true' ]" \
|
||||
|| die "primary did not reach Healthy=true within 15s"
|
||||
# Replica must respond to /status with Healthy=false (NOT Healthy=true; role split).
|
||||
local rh
|
||||
rh=$($SSH_M02 "curl -s --max-time 2 'http://127.0.0.1:${M02_REPLICA_STATUS_PORT}/status?volume=v1' | grep -o '\"Healthy\":[a-z]*'")
|
||||
[ "${rh}" = '"Healthy":false' ] || die "replica reported ${rh}; expected Healthy=false (architect role-split binding)"
|
||||
log " ✓ cluster ready"
|
||||
}
|
||||
|
||||
# §2 #2 — kernel iSCSI write + m01verify storage-aware compare
|
||||
# Architect findings round 52: remote SSH bash blocks use
|
||||
# `set -euo pipefail`; DEV must be non-empty; primary.H must advance
|
||||
# after the write (catches silent-write-failure masking).
|
||||
verify_byte_equal() {
|
||||
if [ "${HAS_ISCSI}" = "0" ]; then
|
||||
log "verify_byte_equal: SKIP (no iscsiadm; install open-iscsi for Tier 1 iSCSI coverage, OR use Tier 2 m01)"
|
||||
return 0
|
||||
fi
|
||||
log "verify_byte_equal: iSCSI write 1 LBA + m01verify SHA-256"
|
||||
$SSH_M01 "command -v iscsiadm >/dev/null" || die "iscsiadm not installed on m01 (apt install open-iscsi)"
|
||||
local prim_h_before prim_h_after
|
||||
prim_h_before=$(poll_status_field "$SSH_M01" "${M01_PRIMARY_STATUS_PORT}" H)
|
||||
[ -n "${prim_h_before}" ] || die "could not read primary.H before write"
|
||||
# Discover + login + write + assert + logout — all under set -euo pipefail
|
||||
$SSH_M01 'set -euo pipefail
|
||||
sudo iscsiadm -m discovery -t st -p 127.0.0.1:'"${M01_ISCSI_PORT}"' >/dev/null
|
||||
sudo iscsiadm -m node -T '"${ISCSI_IQN}"' -p 127.0.0.1:'"${M01_ISCSI_PORT}"' --login >/dev/null
|
||||
sleep 2
|
||||
DEV=$(ls -t /dev/disk/by-path/*'"${ISCSI_IQN}"'*-lun-0 2>/dev/null | head -1)
|
||||
[ -n "$DEV" ] || { echo "ERROR: iSCSI device not visible after login"; exit 2; }
|
||||
echo "DEV=$DEV"
|
||||
# Fill 1 block with 0xab and write to LBA 0.
|
||||
# NOTE: do NOT use `tr "\0" "\xab"` — tr does not interpret \xHH
|
||||
# escapes; it would substitute with the literal char "x" (0x78).
|
||||
# Use python3 binary write for byte-exact 0xab.
|
||||
python3 -c "import sys; sys.stdout.buffer.write(b\"\xab\" * 4096)" | sudo dd of="$DEV" bs=4096 count=1 conv=fsync,nocreat
|
||||
sync
|
||||
sudo iscsiadm -m node -T '"${ISCSI_IQN}"' -p 127.0.0.1:'"${M01_ISCSI_PORT}"' --logout >/dev/null
|
||||
echo "WROTE-LBA-0-PATTERN-AB"
|
||||
' || die "iscsi write failed"
|
||||
# NOTE (round-12): H-advance preflight removed. Engine's
|
||||
# Recovery.H is updated by probe events (RecoveryFactsObserved),
|
||||
# not by local writes. At adoption time engine sets H=walHead
|
||||
# (nextLSN, already=1 for empty walstore); after a local write
|
||||
# at LSN=1 the next-allocated LSN becomes 2 but Recovery.H stays
|
||||
# 1 until a probe re-reads boundaries. Using H-advance here is a
|
||||
# false-positive trap. The actual proof of write+ship is the
|
||||
# m01verify byte-equal compare below; failures upstream of that
|
||||
# surface via the primary's log (set -euo pipefail in the dd
|
||||
# block + non-zero exit on iscsi failure).
|
||||
prim_h_after=$(poll_status_field "$SSH_M01" "${M01_PRIMARY_STATUS_PORT}" H)
|
||||
log " primary.H pre/post: ${prim_h_before} → ${prim_h_after} (informational)"
|
||||
sleep 1 # let replication fan-out complete
|
||||
# Logout iscsi (release the device handle so we can stop replica cleanly later)
|
||||
$SSH_M01 "sudo iscsiadm -m node -T ${ISCSI_IQN} -p 127.0.0.1:${M01_ISCSI_PORT} --logout >/dev/null" || true
|
||||
# Stop replica daemon so m01verify can OpenReadOnly
|
||||
$SSH_M02 "sudo pkill -TERM -f '[g]5-blockvolume.*server-id m02-replica' && sleep 2"
|
||||
# m01verify reads replica's walstore
|
||||
local out
|
||||
out=$($SSH_M02 "/tmp/g5-m01verify --walstore ${REMOTE_RUN_DIR}/replica-store/v1.bin --lba-start 0 --lba-count 1 --block-size 4096 --expected-pattern ab 2>&1")
|
||||
log " m01verify output: ${out}"
|
||||
echo "${out}" | grep -q '^OK ' || die "byte-equal verify failed: ${out}"
|
||||
# Restart replica for subsequent steps
|
||||
start_replica
|
||||
sleep 3
|
||||
log " ✓ byte-equal"
|
||||
}
|
||||
|
||||
# §2 #3 — network disconnect catch-up
|
||||
#
|
||||
# Pattern (architect round 13 ratification per QA's planning input):
|
||||
# direct byte-equal as the pass condition, replacing the H/R polling
|
||||
# proxy. /status/recovery snapshots stay as supporting diagnostic
|
||||
# only.
|
||||
#
|
||||
# 1. baseline write LBA[0]=0xab; byte-equal verify (already done in
|
||||
# verify_byte_equal — primary now contains LBA0=0xab)
|
||||
# 2. iptables OUTPUT DROP on node-a toward node-b:M02_REPLICA_DATA_PORT
|
||||
# (architect ruling: node-a OUTPUT drop preferred over node-b INPUT
|
||||
# drop; least-broad rule that proves the scenario)
|
||||
# 3. primary write LBA[1]=0xcd (new pattern, BestEffort: primary
|
||||
# WAL accepts; ship to r2 fails until heal)
|
||||
# 4. heal: iptables -D
|
||||
# 5. wait_until_byte_equal LBA[1]=0xcd CATCHUP_DEADLINE
|
||||
# 6. (informational) snapshot /status/recovery for diagnostic
|
||||
#
|
||||
# trap ensures iptables -D runs even on script abort so a failed run
|
||||
# does not poison the box.
|
||||
verify_network_catchup() {
|
||||
if [ "${HAS_ISCSI}" = "0" ]; then
|
||||
log "verify_network_catchup: SKIP (needs iscsiadm to drive write; use Tier 2 m01)"
|
||||
return 0
|
||||
fi
|
||||
log "verify_network_catchup: m01 OUTPUT drop to ${M02_IP}:${M02_REPLICA_DATA_PORT} + write + heal + byte-equal"
|
||||
|
||||
# Cleanup trap: best-effort iptables -D, runs on any function exit
|
||||
# path (success, die, set -e abort upstream).
|
||||
local cleanup_done=0
|
||||
_verify_network_catchup_cleanup() {
|
||||
[ "${cleanup_done}" = "1" ] && return
|
||||
cleanup_done=1
|
||||
$SSH_M01 "sudo iptables -D OUTPUT -d ${M02_IP} -p tcp --dport ${M02_REPLICA_DATA_PORT} -j DROP" >/dev/null 2>&1 || true
|
||||
}
|
||||
trap _verify_network_catchup_cleanup RETURN
|
||||
|
||||
# Step 2: iptables OUTPUT drop on node-a.
|
||||
$SSH_M01 "sudo iptables -A OUTPUT -d ${M02_IP} -p tcp --dport ${M02_REPLICA_DATA_PORT} -j DROP" \
|
||||
|| die "iptables -A failed"
|
||||
log " network partitioned (m01 OUTPUT → ${M02_IP}:${M02_REPLICA_DATA_PORT} DROP)"
|
||||
|
||||
# Step 3: primary write LBA[1]=0xcd (different pattern from #2's
|
||||
# LBA[0]=0xab so we can't false-positive on stale data).
|
||||
iscsi_write_pattern 1 1 cd >/dev/null || die "iscsi write LBA[1]=0xcd during disconnect failed"
|
||||
log " primary wrote LBA[1]=0xcd (replica still partitioned)"
|
||||
|
||||
# Step 4: heal.
|
||||
_verify_network_catchup_cleanup
|
||||
log " network healed (iptables -D applied)"
|
||||
|
||||
# Step 5: poll until byte-equal at replica.
|
||||
wait_until_byte_equal 1 cd "${CATCHUP_DEADLINE}" "verify_network_catchup-LBA1" \
|
||||
|| die "replica did not converge LBA[1]=0xcd within ${CATCHUP_DEADLINE}s after heal"
|
||||
|
||||
# Step 6: diagnostic snapshot (not pass/fail oracle).
|
||||
local prim_h rep_r decision
|
||||
prim_h=$(poll_status_field "$SSH_M01" "${M01_PRIMARY_STATUS_PORT}" H)
|
||||
rep_r=$(poll_status_field "$SSH_M02" "${M02_REPLICA_STATUS_PORT}" R)
|
||||
decision=$(poll_status_field "$SSH_M02" "${M02_REPLICA_STATUS_PORT}" RecoveryDecision)
|
||||
log " diagnostic /status/recovery: primary.H=${prim_h} replica.R=${rep_r} replica.RecoveryDecision=${decision:-<empty>}"
|
||||
log " ✓ network catch-up byte-equal converged"
|
||||
|
||||
trap - RETURN
|
||||
}
|
||||
|
||||
# §2 #4 — replica process stop/restart catch-up
|
||||
#
|
||||
# Pattern (architect round 13 ratification):
|
||||
# 1. baseline: replica running, byte-equal at LBA[0]=0xab from #2
|
||||
# 2. kill replica: pkill -TERM g5-blockvolume on node-b
|
||||
# 3. primary write LBA[2]=0xef while replica is down (BestEffort:
|
||||
# primary's WAL accepts the write; ship attempts to r2 fail
|
||||
# since r2 is offline)
|
||||
# 4. restart replica with same --durable-root
|
||||
# 5. wait_until_byte_equal LBA[2]=0xef CATCHUP_DEADLINE
|
||||
#
|
||||
# Run #4 NAIVELY first (architect ruling 2 round 13). If catch-up
|
||||
# does not converge — primary's WAL did not retain writes during the
|
||||
# disconnect — that is a real recovery-path finding to surface, NOT
|
||||
# a test flaw. Do not change durability mode; do not paper over.
|
||||
#
|
||||
# Note: m01verify must read replica's walstore only while the
|
||||
# replica daemon is stopped or quiesced (architect caution round 13).
|
||||
# wait_until_byte_equal handles this internally (kill→verify→restart
|
||||
# per cycle).
|
||||
verify_restart_catchup() {
|
||||
if [ "${HAS_ISCSI}" = "0" ]; then
|
||||
log "verify_restart_catchup: SKIP (needs iscsiadm to drive write; use Tier 2 m01)"
|
||||
return 0
|
||||
fi
|
||||
log "verify_restart_catchup: kill replica + write while down + restart + byte-equal"
|
||||
|
||||
# Step 2: stop replica daemon. TERM first for graceful shutdown,
|
||||
# then KILL fallback after a brief grace window. Wait for the
|
||||
# replica's status port to actually release before continuing —
|
||||
# prior runs hit "address already in use" on restart because TERM
|
||||
# alone left a lingering process holding the bind.
|
||||
$SSH_M02 "sudo killall -TERM g5-blockvolume 2>/dev/null; sleep 1; sudo killall -KILL g5-blockvolume 2>/dev/null; for i in 1 2 3 4 5 6 7 8 9 10; do ss -ltn 2>/dev/null | grep -q ':${M02_REPLICA_STATUS_PORT}\b' || break; sleep 1; done" >/dev/null 2>&1 || true
|
||||
log " replica stopped"
|
||||
|
||||
# Step 3: primary write LBA[2]=0xef while replica is down.
|
||||
iscsi_write_pattern 2 1 ef >/dev/null || die "iscsi write LBA[2]=0xef during replica-down failed"
|
||||
log " primary wrote LBA[2]=0xef (replica down)"
|
||||
|
||||
# Step 4: restart replica.
|
||||
start_replica >/dev/null 2>&1 || true
|
||||
log " replica restarted"
|
||||
|
||||
# Step 5: wait_until_byte_equal at LBA[2]=0xef.
|
||||
wait_until_byte_equal 2 ef "${CATCHUP_DEADLINE}" "verify_restart_catchup-LBA2" \
|
||||
|| die "replica did not converge LBA[2]=0xef within ${CATCHUP_DEADLINE}s after restart (CHECK: primary WAL retention during replica-down — real recovery-path finding if writes were dropped)"
|
||||
|
||||
# Diagnostic snapshot (not pass/fail oracle).
|
||||
local prim_h rep_r decision
|
||||
prim_h=$(poll_status_field "$SSH_M01" "${M01_PRIMARY_STATUS_PORT}" H)
|
||||
rep_r=$(poll_status_field "$SSH_M02" "${M02_REPLICA_STATUS_PORT}" R)
|
||||
decision=$(poll_status_field "$SSH_M02" "${M02_REPLICA_STATUS_PORT}" RecoveryDecision)
|
||||
log " diagnostic /status/recovery: primary.H=${prim_h} replica.R=${rep_r} replica.RecoveryDecision=${decision:-<empty>}"
|
||||
log " ✓ restart catch-up byte-equal converged"
|
||||
}
|
||||
|
||||
# §2 #5 — race ×10 stress on G5-4 integration test
|
||||
verify_race_stress() {
|
||||
if [ "${LOCAL_MODE}" = "1" ]; then
|
||||
# WSL Ubuntu 22 ships Go 1.18; project needs 1.21+. Skip in LOCAL_MODE
|
||||
# unless WSL has been upgraded.
|
||||
local go_minor; go_minor=$(go version 2>/dev/null | grep -oP 'go1\.\K[0-9]+' || echo 0)
|
||||
if [ "${go_minor}" -lt 21 ]; then
|
||||
log "verify_race_stress: SKIP (LOCAL_MODE Go ${go_minor} < 1.21; use Tier 2 m01 for -race)"
|
||||
return 0
|
||||
fi
|
||||
log "verify_race_stress: TestG54_BinaryWiring x10 -race in SRC_DIR=${SRC_DIR}"
|
||||
( cd "${SRC_DIR}" && CGO_ENABLED=1 go test -race -count=10 -run TestG54_BinaryWiring ./cmd/blockvolume/ ) > "${ARTIFACT_DIR}/race-stress.log" 2>&1 \
|
||||
|| die "race stress failed; see ${ARTIFACT_DIR}/race-stress.log"
|
||||
log " ✓ race ×10"
|
||||
return
|
||||
fi
|
||||
log "verify_race_stress: TestG54_BinaryWiring x10 -race on m01"
|
||||
$SSH_M01 "command -v gcc >/dev/null" || die "gcc not installed on m01 (needed for CGO -race)"
|
||||
$SSH_M01 "cd ${REMOTE_BUILD_DIR} && CGO_ENABLED=1 go test -race -count=10 -run TestG54_BinaryWiring ./cmd/blockvolume/ 2>&1" > "${ARTIFACT_DIR}/race-stress.log" \
|
||||
|| die "race stress failed; see ${ARTIFACT_DIR}/race-stress.log"
|
||||
log " ✓ race ×10"
|
||||
}
|
||||
|
||||
# §2 #6 — full V3 suite green from node-a
|
||||
verify_full_suite() {
|
||||
if [ "${LOCAL_MODE}" = "1" ]; then
|
||||
local go_minor; go_minor=$(go version 2>/dev/null | grep -oP 'go1\.\K[0-9]+' || echo 0)
|
||||
if [ "${go_minor}" -lt 21 ]; then
|
||||
log "verify_full_suite: SKIP (LOCAL_MODE Go ${go_minor} < 1.21; use Tier 2 m01 for full suite)"
|
||||
return 0
|
||||
fi
|
||||
log "verify_full_suite: go test ./... in SRC_DIR=${SRC_DIR}"
|
||||
( cd "${SRC_DIR}" && go test ./... -count=1 -timeout 600s ) > "${ARTIFACT_DIR}/full-suite.log" 2>&1 \
|
||||
|| die "full suite failed; see ${ARTIFACT_DIR}/full-suite.log"
|
||||
log " ✓ full suite green"
|
||||
return
|
||||
fi
|
||||
log "verify_full_suite: go test ./... clean from m01"
|
||||
$SSH_M01 "cd ${REMOTE_BUILD_DIR} && go test ./... -count=1 -timeout 600s 2>&1" > "${ARTIFACT_DIR}/full-suite.log" \
|
||||
|| die "full suite has failures; see ${ARTIFACT_DIR}/full-suite.log"
|
||||
log " ✓ full suite green"
|
||||
}
|
||||
|
||||
# --- Main ---
|
||||
|
||||
main() {
|
||||
log "=== G5-5 m01 hardware first-light ==="
|
||||
log "primary: ${M01_HOST} ; replica: ${M02_HOST}"
|
||||
log "substrate: ${DURABLE_IMPL} ; ${DURABLE_BLOCKS} blocks × ${DURABLE_BLOCKSIZE} B"
|
||||
log "artifacts: ${ARTIFACT_DIR}"
|
||||
|
||||
sync_and_build
|
||||
start_cluster
|
||||
sleep 3
|
||||
|
||||
verify_cluster_ready
|
||||
verify_byte_equal
|
||||
verify_network_catchup
|
||||
verify_restart_catchup
|
||||
verify_race_stress
|
||||
verify_full_suite
|
||||
|
||||
stop_cluster
|
||||
log "=== G5-5 ALL VERIFY STEPS PASS ==="
|
||||
}
|
||||
|
||||
main "$@"
|
||||
@@ -32,7 +32,6 @@ This directory contains developer and QA helper scripts.
|
||||
| `run-g15b-k8s-static.sh` | Historical static PV Kubernetes harness. |
|
||||
| `run-g15d-k8s-dynamic.sh` | Historical dynamic PVC harness used by compatibility scenarios. |
|
||||
| `iterate-m01-nvme.sh` | Lab iteration helper for NVMe work. |
|
||||
| `iterate-m01-replicated-write.sh` | Lab iteration helper for replicated write tests. |
|
||||
| `genproto.sh` | Protocol/code generation helper. |
|
||||
|
||||
## Design Rules
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
package scripts_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestReleaseGateRefusesArtifactRootOutsideAllowlist(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
t.Skip("bash script")
|
||||
}
|
||||
bash, err := exec.LookPath("bash")
|
||||
if err != nil {
|
||||
t.Skip("bash not available")
|
||||
}
|
||||
script := filepath.Join(repoRoot(t), "scripts", "testops-run-protocol-release-gate.sh")
|
||||
run := func(root string) (string, string, error) {
|
||||
artifacts := filepath.Join(t.TempDir(), "gate")
|
||||
cmd := exec.Command(bash, script, t.TempDir())
|
||||
cmd.Env = append(os.Environ(),
|
||||
"SW_BLOCK_SSH_KEY=/k",
|
||||
"SW_BLOCK_NODE_HOST=192.0.2.10",
|
||||
"SW_BLOCK_NODE_USER=tester",
|
||||
"SW_BLOCK_NODE_ARTIFACT_ROOT="+root,
|
||||
"SW_BLOCK_ARTIFACT_DIR="+artifacts,
|
||||
"SWBLOCK_CMD=/nonexistent-swblock",
|
||||
)
|
||||
out, err := cmd.CombinedOutput()
|
||||
return string(out), artifacts, err
|
||||
}
|
||||
const refusal = "must be an absolute path other than /"
|
||||
marker := filepath.Join(t.TempDir(), "substituted")
|
||||
for _, root := range []string{
|
||||
"/srv/test artifacts",
|
||||
"/srv/test\tartifacts",
|
||||
"/",
|
||||
"relative/dir",
|
||||
"/srv/*",
|
||||
"/srv/'$(touch " + marker + ")'",
|
||||
"/srv/x\n",
|
||||
} {
|
||||
out, artifacts, err := run(root)
|
||||
if err == nil {
|
||||
t.Fatalf("artifact root %q accepted; output:\n%s", root, out)
|
||||
}
|
||||
if !strings.Contains(out, refusal) {
|
||||
t.Fatalf("artifact root %q: unexpected output:\n%s", root, out)
|
||||
}
|
||||
if _, err := os.Stat(artifacts); !os.IsNotExist(err) {
|
||||
t.Fatalf("artifact root %q: %s created before the check (stat err %v)", root, artifacts, err)
|
||||
}
|
||||
}
|
||||
if _, err := os.Stat(marker); !os.IsNotExist(err) {
|
||||
t.Fatalf("a command substitution in the artifact root ran (stat err %v)", err)
|
||||
}
|
||||
if out, _, _ := run("/srv/evidence-2/block_v1.1"); strings.Contains(out, refusal) {
|
||||
t.Fatalf("plain absolute artifact root refused:\n%s", out)
|
||||
}
|
||||
|
||||
ps, err := os.ReadFile(filepath.Join(repoRoot(t), "scripts", "testops-run-protocol-release-gate.ps1"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
check := strings.Index(string(ps), `$NodeArtifactRoot -cnotmatch '^/[A-Za-z0-9._/-]+\z'`)
|
||||
mkdir := strings.Index(string(ps), "New-Item -ItemType Directory")
|
||||
if check < 0 || mkdir < 0 || check > mkdir {
|
||||
t.Fatalf(".ps1 must refuse a NodeArtifactRoot outside the allowlist before it creates directories (check at %d, New-Item at %d)", check, mkdir)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/usr/bin/env bash
|
||||
# Tests node_ip_for_name and run_on_node from run-multi-volume-mounted-failover.sh with stub kubectl, ssh and
|
||||
# hostname: local nodes run locally, remote nodes use the cluster's InternalIP and the configured ssh user/key,
|
||||
# and a missing user or address fails instead of falling back to a fixed host.
|
||||
# Usage: bash scripts/run-multi-volume-mounted-failover-nodes-test.sh [script]
|
||||
set -euo pipefail
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
script=${1:-$here/run-multi-volume-mounted-failover.sh}
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
mkdir -p "$work/bin"
|
||||
|
||||
cat >"$work/bin/kubectl" <<'EOF'
|
||||
#!/usr/bin/env bash
|
||||
# get node <name> -o jsonpath=...: worker-1 has an InternalIP, others none.
|
||||
[ "$1 $2" = "get node" ] || exit 2
|
||||
[ "$3" = worker-1 ] && printf '192.0.2.10'
|
||||
exit 0
|
||||
EOF
|
||||
cat >"$work/bin/ssh" <<'EOF'
|
||||
#!/usr/bin/env bash
|
||||
printf '%s\n' "$*" >"$SSH_LOG"
|
||||
cat >/dev/null
|
||||
EOF
|
||||
cat >"$work/bin/hostname" <<'EOF'
|
||||
#!/usr/bin/env bash
|
||||
echo ctl
|
||||
EOF
|
||||
chmod +x "$work/bin/"*
|
||||
|
||||
# Only the two helpers, not the script body.
|
||||
awk '/^node_ip_for_name\(\) \{/,/^}/' "$script" >"$work/helpers.sh"
|
||||
awk '/^run_on_node\(\) \{/,/^}/' "$script" >>"$work/helpers.sh"
|
||||
|
||||
fail() { echo "FAIL: $*" >&2; exit 1; }
|
||||
run() { PATH="$work/bin:$PATH" SSH_LOG="$work/ssh.log" bash -c 'source "$1"; shift; "$@"' _ "$work/helpers.sh" "$@"; }
|
||||
|
||||
[ "$(echo 'echo local-ok' | run run_on_node '')" = local-ok ] || fail "empty node did not run locally"
|
||||
[ "$(echo 'echo local-ok' | run run_on_node ctl)" = local-ok ] || fail "this host did not run locally"
|
||||
|
||||
rm -f "$work/ssh.log"
|
||||
echo 'true' | SW_BLOCK_NODE_SSH_USER=tester SW_BLOCK_NODE_SSH_KEY=/keys/id run run_on_node worker-1 || fail "remote node with user and key failed"
|
||||
[ "$(cat "$work/ssh.log")" = "-i /keys/id -o StrictHostKeyChecking=no tester@192.0.2.10 bash -s" ] || fail "ssh args with key: $(cat "$work/ssh.log")"
|
||||
|
||||
rm -f "$work/ssh.log"
|
||||
echo 'true' | SW_BLOCK_NODE_SSH_USER=tester run run_on_node worker-1 || fail "remote node without key failed"
|
||||
[ "$(cat "$work/ssh.log")" = "-o StrictHostKeyChecking=no tester@192.0.2.10 bash -s" ] || fail "ssh args without key: $(cat "$work/ssh.log")"
|
||||
|
||||
if echo 'true' | run run_on_node worker-1 2>/dev/null; then fail "remote node without SW_BLOCK_NODE_SSH_USER ran"; fi
|
||||
if echo 'true' | SW_BLOCK_NODE_SSH_USER=tester run run_on_node worker-2 2>/dev/null; then fail "node without InternalIP ran"; fi
|
||||
echo "run-multi-volume-mounted-failover-nodes-test: ok"
|
||||
@@ -36,26 +36,32 @@ safe_capture() {
|
||||
"$@" >"$out" 2>&1 || true
|
||||
}
|
||||
|
||||
# A node's InternalIP, read from the cluster.
|
||||
node_ip_for_name() {
|
||||
case "$1" in
|
||||
m01) echo "192.168.1.181" ;;
|
||||
m02|"") echo "192.168.1.184" ;;
|
||||
tp01) echo "192.168.1.188" ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
local ip
|
||||
ip="$(kubectl get node "$1" -o jsonpath='{.status.addresses[?(@.type=="InternalIP")].address}' 2>/dev/null)" || return 1
|
||||
[[ -n "$ip" ]] || return 1
|
||||
echo "$ip"
|
||||
}
|
||||
|
||||
# Runs stdin on a node: locally for this host, otherwise over ssh as
|
||||
# SW_BLOCK_NODE_SSH_USER, with SW_BLOCK_NODE_SSH_KEY when it is set.
|
||||
run_on_node() {
|
||||
local node="${1:-}"
|
||||
local local_node
|
||||
local_node="$(hostname -s 2>/dev/null || hostname)"
|
||||
if [[ -z "$node" || "$node" == "$local_node" || "$node" == "m02" ]]; then
|
||||
if [[ -z "$node" || "$node" == "$local_node" ]]; then
|
||||
bash -s
|
||||
return
|
||||
fi
|
||||
local ip
|
||||
ip="$(node_ip_for_name "$node")"
|
||||
ssh -i /opt/work/testdev_key -o StrictHostKeyChecking=no "testdev@${ip}" bash -s
|
||||
ip="$(node_ip_for_name "$node")" || { echo "no InternalIP for node $node" >&2; return 1; }
|
||||
local user="${SW_BLOCK_NODE_SSH_USER:?set SW_BLOCK_NODE_SSH_USER to reach node $node over ssh}"
|
||||
local key_args=()
|
||||
if [[ -n "${SW_BLOCK_NODE_SSH_KEY:-}" ]]; then
|
||||
key_args=(-i "$SW_BLOCK_NODE_SSH_KEY")
|
||||
fi
|
||||
ssh "${key_args[@]}" -o StrictHostKeyChecking=no "${user}@${ip}" bash -s
|
||||
}
|
||||
|
||||
sw_block_cmd() {
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
param(
|
||||
[string]$ProductRoot = (Get-Location).Path,
|
||||
[string]$ArtifactDir = "",
|
||||
[string]$ReleaseImage = $env:SW_BLOCK_RELEASE_IMAGE,
|
||||
[string]$ReleaseCSIImage = $env:SW_BLOCK_CSI_RELEASE_IMAGE
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($ArtifactDir)) {
|
||||
$stamp = (Get-Date).ToUniversalTime().ToString("yyyyMMddTHHmmssZ")
|
||||
$ArtifactDir = Join-Path $ProductRoot "results\operation-milestone-release-readiness-$stamp"
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $ArtifactDir | Out-Null
|
||||
|
||||
$summary = Join-Path $ArtifactDir "operation-milestone-release-readiness-summary.txt"
|
||||
$result = Join-Path $ArtifactDir "result.json"
|
||||
Set-Content -Path $summary -Value "operation_milestone_release_readiness_status=running"
|
||||
|
||||
function Add-Summary {
|
||||
param([string]$Line)
|
||||
Add-Content -Path $summary -Value $Line
|
||||
}
|
||||
|
||||
function Parse-ImageRef {
|
||||
param([string]$Image)
|
||||
if ($Image -match '^(?<repo>.+)@(?<digest>sha256:[0-9a-fA-F]+)$') {
|
||||
return [ordered]@{
|
||||
repository = $Matches.repo
|
||||
tag = ""
|
||||
digest = $Matches.digest
|
||||
}
|
||||
}
|
||||
$lastColon = $Image.LastIndexOf(':')
|
||||
$lastSlash = $Image.LastIndexOf('/')
|
||||
if ($lastColon -le $lastSlash) {
|
||||
throw "image must include an explicit tag or digest: $Image"
|
||||
}
|
||||
return [ordered]@{
|
||||
repository = $Image.Substring(0, $lastColon)
|
||||
tag = $Image.Substring($lastColon + 1)
|
||||
digest = ""
|
||||
}
|
||||
}
|
||||
|
||||
function Invoke-Step {
|
||||
param(
|
||||
[string]$Name,
|
||||
[string]$FilePath,
|
||||
[string[]]$Arguments
|
||||
)
|
||||
$stdout = Join-Path $ArtifactDir "$Name.stdout.txt"
|
||||
$stderr = Join-Path $ArtifactDir "$Name.stderr.txt"
|
||||
$process = Start-Process -FilePath $FilePath -ArgumentList $Arguments -WorkingDirectory $ProductRoot -NoNewWindow -Wait -PassThru -RedirectStandardOutput $stdout -RedirectStandardError $stderr
|
||||
if ($process.ExitCode -eq 0) {
|
||||
Add-Summary "$Name=ok"
|
||||
return $true
|
||||
}
|
||||
Add-Summary "$Name=failed"
|
||||
return $false
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($ReleaseImage) -or [string]::IsNullOrWhiteSpace($ReleaseCSIImage)) {
|
||||
Add-Summary "operation_milestone_release_readiness_status=blocked_missing_release_images"
|
||||
Add-Summary "required_env=SW_BLOCK_RELEASE_IMAGE,SW_BLOCK_CSI_RELEASE_IMAGE"
|
||||
Add-Summary "example_SW_BLOCK_RELEASE_IMAGE=ghcr.io/seaweedfs/seaweed-block:sha-<commit>"
|
||||
Add-Summary "example_SW_BLOCK_CSI_RELEASE_IMAGE=ghcr.io/seaweedfs/seaweed-block-csi:sha-<same-commit>"
|
||||
[ordered]@{
|
||||
schema_version = "1.0"
|
||||
scenario = "operation-milestone-release-readiness"
|
||||
status = "blocked"
|
||||
reason = "missing_release_images"
|
||||
artifact_dir = $ArtifactDir
|
||||
} | ConvertTo-Json -Depth 4 | Set-Content -Path $result
|
||||
exit 2
|
||||
}
|
||||
|
||||
$status = "ok"
|
||||
$image = Parse-ImageRef $ReleaseImage
|
||||
$csiImage = Parse-ImageRef $ReleaseCSIImage
|
||||
|
||||
Add-Summary "release_image=$ReleaseImage"
|
||||
Add-Summary "release_csi_image=$ReleaseCSIImage"
|
||||
|
||||
if (-not (Invoke-Step -Name "docker_manifest_release_image" -FilePath "docker" -Arguments @("manifest", "inspect", $ReleaseImage))) {
|
||||
$status = "failed"
|
||||
}
|
||||
if (-not (Invoke-Step -Name "docker_manifest_release_csi_image" -FilePath "docker" -Arguments @("manifest", "inspect", $ReleaseCSIImage))) {
|
||||
$status = "failed"
|
||||
}
|
||||
if (-not (Invoke-Step -Name "go_test_release_scope" -FilePath "go" -Arguments @("test", "./core/ops", "./cmd/sw-block", "./cmd/blockcsi", "./cmd/blockmaster", "./cmd/blockvolume", "./scripts", "-count=1"))) {
|
||||
$status = "failed"
|
||||
}
|
||||
if (-not (Invoke-Step -Name "helm_lint" -FilePath "helm" -Arguments @("lint", "charts/seaweed-block"))) {
|
||||
$status = "failed"
|
||||
}
|
||||
|
||||
$templateArgs = @(
|
||||
"template", "sw-block", "charts/seaweed-block",
|
||||
"--namespace", "kube-system",
|
||||
"--include-crds",
|
||||
"--set", "image.repository=$($image.repository)",
|
||||
"--set", "csiImage.repository=$($csiImage.repository)",
|
||||
"--set", "image.pullPolicy=Always",
|
||||
"--set", "csiImage.pullPolicy=Always",
|
||||
"--set", "operatorStatus.create=true",
|
||||
"--set", "operatorStatus.dryRun=false",
|
||||
"--set", "lifecycleOwner.create=true",
|
||||
"--set", "lifecycleOwner.dryRun=false",
|
||||
"--set", "lifecycleOwner.admission.create=true"
|
||||
)
|
||||
if ($image.digest) {
|
||||
$templateArgs += @("--set", "image.digest=$($image.digest)")
|
||||
} else {
|
||||
$templateArgs += @("--set", "image.tag=$($image.tag)")
|
||||
}
|
||||
if ($csiImage.digest) {
|
||||
$templateArgs += @("--set", "csiImage.digest=$($csiImage.digest)")
|
||||
} else {
|
||||
$templateArgs += @("--set", "csiImage.tag=$($csiImage.tag)")
|
||||
}
|
||||
|
||||
if (-not (Invoke-Step -Name "helm_template_operation_components" -FilePath "helm" -Arguments $templateArgs)) {
|
||||
$status = "failed"
|
||||
}
|
||||
if (-not (Invoke-Step -Name "validate_day1_published_image_scenario" -FilePath "C:\work\swblock.exe" -Arguments @("validate", "testops\scenarios\helm-first-volume-via-sw-block-cli-chain.yaml"))) {
|
||||
$status = "failed"
|
||||
}
|
||||
if (-not (Invoke-Step -Name "validate_phase98_operation_close_scenario" -FilePath "C:\work\swblock.exe" -Arguments @("validate", "testops\scenarios\failback-frontend-workload-close-chain.yaml"))) {
|
||||
$status = "failed"
|
||||
}
|
||||
if (-not (Invoke-Step -Name "git_diff_check" -FilePath "git" -Arguments @("diff", "--check"))) {
|
||||
$status = "failed"
|
||||
}
|
||||
|
||||
Add-Summary "published_image_day1_lab_required=true"
|
||||
Add-Summary "published_image_operator_lifecycle_lab_required=true"
|
||||
Add-Summary "source_gated_phase98_regression_required=true"
|
||||
Add-Summary "nvme_not_in_release_claim=true"
|
||||
Add-Summary "operation_milestone_release_readiness_status=$status"
|
||||
|
||||
[ordered]@{
|
||||
schema_version = "1.0"
|
||||
scenario = "operation-milestone-release-readiness"
|
||||
status = $status
|
||||
release_image = $ReleaseImage
|
||||
release_csi_image = $ReleaseCSIImage
|
||||
artifact_dir = $ArtifactDir
|
||||
lab_qa_required = $true
|
||||
} | ConvertTo-Json -Depth 4 | Set-Content -Path $result
|
||||
|
||||
if ($status -ne "ok") {
|
||||
exit 1
|
||||
}
|
||||
@@ -1,279 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="${1:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)}"
|
||||
M01_HOST="${SW_BLOCK_PHASE174_M01_HOST:-testdev@192.168.1.181}"
|
||||
M02_HOST="${SW_BLOCK_PHASE174_M02_HOST:-testdev@192.168.1.184}"
|
||||
TP01_HOST="${SW_BLOCK_PHASE174_TP01_HOST:-testdev@192.168.1.188}"
|
||||
M01_DATA_IP="${SW_BLOCK_PHASE174_M01_DATA_IP:-192.168.1.181}"
|
||||
TP01_DATA_IP="${SW_BLOCK_PHASE174_TP01_DATA_IP:-192.168.1.188}"
|
||||
SSH_KEY="${SW_BLOCK_PHASE174_SSH_KEY:-/c/work/dev_server/testdev_key}"
|
||||
PUBLISH_ROOT="${SW_BLOCK_PHASE174_PUBLISH_ROOT:-/mnt/smb/work/share/g15d-k8s}"
|
||||
RUN_ID="${SW_BLOCK_PHASE174_RUN_ID:-$(date -u +%Y%m%dT%H%M%SZ)-phase174-d2-rf3-distinct}"
|
||||
ARTIFACT_DIR="${SW_BLOCK_ARTIFACT_DIR:-/tmp/${RUN_ID}}"
|
||||
LOCAL_BINARY="/tmp/${RUN_ID}-replication.test"
|
||||
PREBUILT_BINARY="${SW_BLOCK_PHASE174_PREBUILT_BINARY:-}"
|
||||
REMOTE_ROOT="/tmp/${RUN_ID}"
|
||||
REMOTE_BINARY="${REMOTE_ROOT}/replication.test"
|
||||
M02_STORE_ROOT="/data/nvme/block/${RUN_ID}-stores"
|
||||
RESULTS="${ARTIFACT_DIR}/phase174-distinct-node-rf3-results.jsonl"
|
||||
SUMMARY="${ARTIFACT_DIR}/phase174-distinct-node-rf3-summary.txt"
|
||||
M01_ADDR="${M01_DATA_IP}:17411"
|
||||
TP01_ADDR="${TP01_DATA_IP}:17412"
|
||||
RUNS=5
|
||||
WRITERS=(1 4 8)
|
||||
GATE_COMPLETE=false
|
||||
|
||||
SSH=(ssh -T -i "${SSH_KEY}" -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o BatchMode=yes)
|
||||
SCP=(scp -q -i "${SSH_KEY}" -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o BatchMode=yes)
|
||||
|
||||
remote() {
|
||||
local host="$1"
|
||||
shift
|
||||
"${SSH[@]}" "${host}" "$@"
|
||||
}
|
||||
|
||||
write_summary() {
|
||||
echo "$*" | tee -a "${SUMMARY}" >/dev/null
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
local exit_status=$?
|
||||
if [[ "${GATE_COMPLETE}" != "true" ]]; then
|
||||
mkdir -p "${ARTIFACT_DIR}/remote"
|
||||
for spec in "${M01_HOST}:m01" "${TP01_HOST}:tp01"; do
|
||||
local host="${spec%:*}" node="${spec##*:}"
|
||||
remote "${host}" "for pidfile in '${REMOTE_ROOT}'/w*-'${node}'/pid; do
|
||||
test -f \"\${pidfile}\" || continue
|
||||
touch \"\$(dirname \"\${pidfile}\")/stop\"
|
||||
done
|
||||
for pidfile in '${REMOTE_ROOT}'/w*-'${node}'/pid; do
|
||||
test -f \"\${pidfile}\" || continue
|
||||
pid=\$(cat \"\${pidfile}\")
|
||||
for _ in \$(seq 1 50); do kill -0 \"\${pid}\" 2>/dev/null || break; sleep 0.1; done
|
||||
if kill -0 \"\${pid}\" 2>/dev/null && tr '\\0' ' ' <\"/proc/\${pid}/cmdline\" | grep -Fq '${REMOTE_BINARY}'; then
|
||||
kill \"\${pid}\"
|
||||
fi
|
||||
done" >/dev/null 2>&1 || true
|
||||
for writers in "${WRITERS[@]}"; do
|
||||
local dir="${REMOTE_ROOT}/w${writers}-${node}"
|
||||
"${SCP[@]}" "${host}:${dir}/replica.log" "${ARTIFACT_DIR}/remote/w${writers}-${node}-failure.log" >/dev/null 2>&1 || true
|
||||
"${SCP[@]}" "${host}:${dir}/result.json" "${ARTIFACT_DIR}/remote/w${writers}-${node}-failure-result.json" >/dev/null 2>&1 || true
|
||||
done
|
||||
done
|
||||
write_summary "phase174_distinct_node_rf3_status=failed"
|
||||
write_summary "failure_artifact=${PUBLISH_ROOT}/${RUN_ID}.tar.gz"
|
||||
tar -C "$(dirname "${ARTIFACT_DIR}")" -czf "${ARTIFACT_DIR}.tar.gz" "$(basename "${ARTIFACT_DIR}")" >/dev/null 2>&1 || true
|
||||
sha256sum "${ARTIFACT_DIR}.tar.gz" >"${ARTIFACT_DIR}.tar.gz.sha256" 2>/dev/null || true
|
||||
"${SCP[@]}" "${ARTIFACT_DIR}.tar.gz" "${M02_HOST}:${PUBLISH_ROOT}/${RUN_ID}.tar.gz" >/dev/null 2>&1 || true
|
||||
fi
|
||||
rm -f "${LOCAL_BINARY}"
|
||||
for host in "${M01_HOST}" "${TP01_HOST}"; do
|
||||
remote "${host}" "test '${REMOTE_ROOT}' = '/tmp/${RUN_ID}'; rm -rf -- '${REMOTE_ROOT}'" >/dev/null 2>&1 || true
|
||||
done
|
||||
remote "${M02_HOST}" "test '${REMOTE_ROOT}' = '/tmp/${RUN_ID}'; test '${M02_STORE_ROOT}' = '/data/nvme/block/${RUN_ID}-stores'; rm -rf -- '${REMOTE_ROOT}' '${M02_STORE_ROOT}'" >/dev/null 2>&1 || true
|
||||
return "${exit_status}"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
wait_remote_file() {
|
||||
local host="$1" path="$2" label="$3"
|
||||
for _ in $(seq 1 150); do
|
||||
if remote "${host}" "test -s '${path}'"; then
|
||||
return 0
|
||||
fi
|
||||
sleep 0.2
|
||||
done
|
||||
echo "timed out waiting for ${label}: ${host}:${path}" >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
start_replica() {
|
||||
local host="$1" address="$2" writers="$3" node="$4"
|
||||
local dir="${REMOTE_ROOT}/w${writers}-${node}"
|
||||
remote "${host}" "set -e; mkdir -p '${dir}'; setsid nohup env \
|
||||
SW_BLOCK_PHASE174_REPLICA_STORE='${dir}/replica.store' \
|
||||
SW_BLOCK_PHASE174_REPLICA_LISTEN='${address}' \
|
||||
SW_BLOCK_PHASE174_REPLICA_READY_FILE='${dir}/ready' \
|
||||
SW_BLOCK_PHASE174_REPLICA_STOP_FILE='${dir}/stop' \
|
||||
SW_BLOCK_PHASE174_REPLICA_RESULT_FILE='${dir}/result.json' \
|
||||
SW_BLOCK_PHASE174_REPLICA_FINAL_SET=1 \
|
||||
SW_BLOCK_PHASE174_REPLICA_FINAL_RUN=${RUNS} \
|
||||
'${REMOTE_BINARY}' -test.run '^TestPhase174RemoteReplicaProcess$' -test.v -test.timeout=20m \
|
||||
>'${dir}/replica.log' 2>&1 </dev/null & echo \$! >'${dir}/pid'"
|
||||
wait_remote_file "${host}" "${dir}/ready" "${node} replica readiness"
|
||||
}
|
||||
|
||||
stop_replica() {
|
||||
local host="$1" writers="$2" node="$3"
|
||||
local dir="${REMOTE_ROOT}/w${writers}-${node}"
|
||||
remote "${host}" "touch '${dir}/stop'"
|
||||
wait_remote_file "${host}" "${dir}/result.json" "${node} replica result"
|
||||
"${SCP[@]}" "${host}:${dir}/result.json" "${ARTIFACT_DIR}/remote/w${writers}-${node}-result.json"
|
||||
"${SCP[@]}" "${host}:${dir}/replica.log" "${ARTIFACT_DIR}/remote/w${writers}-${node}.log"
|
||||
}
|
||||
|
||||
mkdir -p "${ARTIFACT_DIR}/environment" "${ARTIFACT_DIR}/logs" "${ARTIFACT_DIR}/remote"
|
||||
: >"${SUMMARY}"
|
||||
: >"${RESULTS}"
|
||||
|
||||
required_commands=(ssh scp python3 tar)
|
||||
if [[ -z "${PREBUILT_BINARY}" ]]; then
|
||||
required_commands+=(go)
|
||||
fi
|
||||
for command in "${required_commands[@]}"; do
|
||||
command -v "${command}" >/dev/null 2>&1 || {
|
||||
echo "missing required command: ${command}" >&2
|
||||
exit 2
|
||||
}
|
||||
done
|
||||
|
||||
write_summary "phase174_distinct_node_rf3_status=running"
|
||||
write_summary "contract=phase174-distinct-node-rf3-v1"
|
||||
write_summary "source_commit=$(git -C "${ROOT}" rev-parse HEAD)"
|
||||
write_summary "foreground_ack_profile=sync_quorum_rf3"
|
||||
write_summary "post_measurement_drain=probe_catchup_then_sync_all"
|
||||
write_summary "transport=tcp"
|
||||
write_summary "network_class=management_lan"
|
||||
write_summary "primary_node=m02"
|
||||
write_summary "replica_nodes=m01,tp01"
|
||||
write_summary "primary_management_ip=192.168.1.184"
|
||||
write_summary "replica_addresses=${M01_ADDR},${TP01_ADDR}"
|
||||
write_summary "tp01_roce_capable=false"
|
||||
write_summary "cross_ack_profile_throughput_ratio_allowed=false"
|
||||
|
||||
for spec in "m01:${M01_HOST}" "m02:${M02_HOST}" "tp01:${TP01_HOST}"; do
|
||||
name="${spec%%:*}"
|
||||
host="${spec#*:}"
|
||||
remote "${host}" 'hostname; uname -a; uptime; lsblk -o NAME,TYPE,SIZE,ROTA,MODEL,FSTYPE,MOUNTPOINTS; ip -brief address' \
|
||||
>"${ARTIFACT_DIR}/environment/${name}.txt"
|
||||
done
|
||||
remote "${M02_HOST}" "test \"\$(findmnt -n -T /data/nvme/block -o SOURCE)\" = /dev/nvme0n1p1"
|
||||
remote "${M01_HOST}" "findmnt -n -T /tmp -o SOURCE,FSTYPE" >"${ARTIFACT_DIR}/environment/m01-store.txt"
|
||||
remote "${TP01_HOST}" "findmnt -n -T /tmp -o SOURCE,FSTYPE" >"${ARTIFACT_DIR}/environment/tp01-store.txt"
|
||||
remote "${M01_HOST}" "! ss -ltnH | grep -q ':17411 '"
|
||||
remote "${TP01_HOST}" "! ss -ltnH | grep -q ':17412 '"
|
||||
|
||||
cd "${ROOT}"
|
||||
if [[ -n "${PREBUILT_BINARY}" ]]; then
|
||||
cp "${PREBUILT_BINARY}" "${LOCAL_BINARY}"
|
||||
else
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -tags swblock_testtools -c \
|
||||
-o "${LOCAL_BINARY}" ./core/replication
|
||||
fi
|
||||
for host in "${M01_HOST}" "${M02_HOST}" "${TP01_HOST}"; do
|
||||
remote "${host}" "test '${REMOTE_ROOT}' = '/tmp/${RUN_ID}'; rm -rf -- '${REMOTE_ROOT}'; mkdir -p '${REMOTE_ROOT}'"
|
||||
"${SCP[@]}" "${LOCAL_BINARY}" "${host}:${REMOTE_BINARY}"
|
||||
remote "${host}" "chmod 0755 '${REMOTE_BINARY}'"
|
||||
done
|
||||
remote "${M02_HOST}" "test '${M02_STORE_ROOT}' = '/data/nvme/block/${RUN_ID}-stores'; rm -rf -- '${M02_STORE_ROOT}'; mkdir -p '${M02_STORE_ROOT}'"
|
||||
|
||||
for writers in "${WRITERS[@]}"; do
|
||||
start_replica "${M01_HOST}" "${M01_ADDR}" "${writers}" m01
|
||||
start_replica "${TP01_HOST}" "${TP01_ADDR}" "${writers}" tp01
|
||||
|
||||
for run in $(seq 0 "${RUNS}"); do
|
||||
log="${ARTIFACT_DIR}/logs/w${writers}-run${run}.log"
|
||||
remote "${M02_HOST}" "env \
|
||||
SW_BLOCK_PHASE174_STORE_DIR='${M02_STORE_ROOT}/w${writers}' \
|
||||
SW_BLOCK_PHASE174_LAYER=rf3_tcp \
|
||||
SW_BLOCK_PHASE174_WRITERS=${writers} \
|
||||
SW_BLOCK_PHASE174_SET=1 \
|
||||
SW_BLOCK_PHASE174_RUN=${run} \
|
||||
SW_BLOCK_PHASE174_REMOTE_REPLICAS='${M01_ADDR},${TP01_ADDR}' \
|
||||
GOMAXPROCS=4 taskset -c 0,2,4,6 \
|
||||
'${REMOTE_BINARY}' -test.run '^TestPhase174FixedWorkPipeline$' -test.v -test.count=1 -test.timeout=10m" \
|
||||
>"${log}" 2>&1
|
||||
if [[ "${run}" != "0" ]]; then
|
||||
sed -n 's/^phase174_fixed_work_result=//p' "${log}" >>"${RESULTS}"
|
||||
fi
|
||||
done
|
||||
|
||||
stop_replica "${M01_HOST}" "${writers}" m01
|
||||
stop_replica "${TP01_HOST}" "${writers}" tp01
|
||||
done
|
||||
|
||||
python3 - "${RESULTS}" "${ARTIFACT_DIR}/remote" "${SUMMARY}" "${RUNS}" <<'PY'
|
||||
import glob
|
||||
import json
|
||||
import statistics
|
||||
import sys
|
||||
|
||||
results_path, remote_dir, summary_path, runs_text = sys.argv[1:]
|
||||
runs = int(runs_text)
|
||||
rows = [json.loads(line) for line in open(results_path, encoding="utf-8") if line.strip()]
|
||||
if len(rows) != 3 * runs:
|
||||
raise SystemExit(f"primary rows={len(rows)} want {3 * runs}")
|
||||
|
||||
queue_saturation_rows = 0
|
||||
replica_probe_count = 0
|
||||
replica_catchup_count = 0
|
||||
replica_rebuild_count = 0
|
||||
max_replica_lag_lsn = 0
|
||||
for row in rows:
|
||||
if row["contract"] != "phase174-fixed-work-v1" or row["ack_profile"] != "sync_quorum_rf3":
|
||||
raise SystemExit(f"bad primary contract: {row}")
|
||||
if row["replica_count"] != 2 or not row["remote_replica_evidence_required"]:
|
||||
raise SystemExit(f"bad external replica contract: {row}")
|
||||
if not row["post_measurement_sync_all"] or row["post_measurement_sync_all_ns"] <= 0:
|
||||
raise SystemExit(f"missing post-measurement drain: {row}")
|
||||
if not row["post_measurement_recovery"] or row.get("replica_probe_count") != 2:
|
||||
raise SystemExit(f"missing post-measurement recovery evidence: {row}")
|
||||
if row["api_operations"] != 16384 or row["logical_bytes"] != 67108864:
|
||||
raise SystemExit(f"bad fixed work: {row}")
|
||||
if row["primary_wal_write_ops"] != 16384 or row["replication_write_ops"] != 16384:
|
||||
raise SystemExit(f"write counter mismatch: {row}")
|
||||
if not row["close_recover_complete"] or row["primary_stable_lsn"] != row["primary_head_lsn"]:
|
||||
raise SystemExit(f"primary recovery mismatch: {row}")
|
||||
if row.get("peer_queue_saturated", 0) > 0:
|
||||
queue_saturation_rows += 1
|
||||
replica_probe_count += row["replica_probe_count"]
|
||||
replica_catchup_count += row.get("replica_catchup_count", 0)
|
||||
replica_rebuild_count += row.get("replica_rebuild_count", 0)
|
||||
max_replica_lag_lsn = max(max_replica_lag_lsn, row.get("max_replica_lag_lsn", 0))
|
||||
|
||||
remote_paths = sorted(glob.glob(f"{remote_dir}/w*-*-result.json"))
|
||||
if len(remote_paths) != 6:
|
||||
raise SystemExit(f"remote results={len(remote_paths)} want 6")
|
||||
for path in remote_paths:
|
||||
row = json.load(open(path, encoding="utf-8"))
|
||||
if row["status"] != "ok" or row["stable_lsn"] != row["head_lsn"]:
|
||||
raise SystemExit(f"bad remote recovery {path}: {row}")
|
||||
if row["head_lsn"] != row["expected_head_lsn"] or row["correctness_samples"] < 5:
|
||||
raise SystemExit(f"bad remote frontier/data {path}: {row}")
|
||||
|
||||
with open(summary_path, "a", encoding="utf-8") as out:
|
||||
for writers in (1, 4, 8):
|
||||
rates = [row["mib_per_second"] for row in rows if int(row["writers"]) == writers]
|
||||
out.write(f"writers_{writers}_median_mibps={statistics.median(rates):.3f}\n")
|
||||
out.write(f"writers_{writers}_max_min_ratio={max(rates) / min(rates):.3f}\n")
|
||||
out.write(f"primary_result_count={len(rows)}\n")
|
||||
out.write(f"remote_recovered_replica_count={len(remote_paths)}\n")
|
||||
out.write(f"peer_queue_saturation_row_count={queue_saturation_rows}\n")
|
||||
out.write(f"replica_probe_count={replica_probe_count}\n")
|
||||
out.write(f"replica_catchup_count={replica_catchup_count}\n")
|
||||
out.write(f"replica_rebuild_count={replica_rebuild_count}\n")
|
||||
out.write(f"max_replica_lag_lsn={max_replica_lag_lsn}\n")
|
||||
out.write("remote_replica_frontiers_and_bytes_equal=true\n")
|
||||
out.write("foreground_sync_quorum_preserved=true\n")
|
||||
out.write("post_measurement_recovery_verified=true\n")
|
||||
out.write("post_measurement_sync_all_verified=true\n")
|
||||
out.write("rf3_distinct_node_healthy=true\n")
|
||||
out.write("architecture_candidate_selected=false\n")
|
||||
out.write("product_mutation_present=false\n")
|
||||
out.write("phase174_distinct_node_rf3_status=ok\n")
|
||||
PY
|
||||
|
||||
GATE_COMPLETE=true
|
||||
cleanup
|
||||
trap - EXIT
|
||||
for host in "${M01_HOST}" "${M02_HOST}" "${TP01_HOST}"; do
|
||||
remote "${host}" "test ! -e '${REMOTE_ROOT}'"
|
||||
done
|
||||
remote "${M02_HOST}" "test ! -e '${M02_STORE_ROOT}'"
|
||||
write_summary "remote_process_and_store_residue_count=0"
|
||||
write_summary "published_artifact=${PUBLISH_ROOT}/${RUN_ID}.tar.gz"
|
||||
tar -C "$(dirname "${ARTIFACT_DIR}")" -czf "${ARTIFACT_DIR}.tar.gz" "$(basename "${ARTIFACT_DIR}")"
|
||||
"${SCP[@]}" "${ARTIFACT_DIR}.tar.gz" "${M02_HOST}:${PUBLISH_ROOT}/${RUN_ID}.tar.gz"
|
||||
sha256sum "${ARTIFACT_DIR}.tar.gz" | tee "${ARTIFACT_DIR}.tar.gz.sha256"
|
||||
cat "${SUMMARY}"
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Parse commands AND env parameters, then execute every complete guarded action
|
||||
# with cleanup stubs. Requires Go and a POSIX shell; never contacts a cluster.
|
||||
# Usage: bash scripts/testops-artifact-root-guard-test.sh [scenario dir]
|
||||
set -euo pipefail
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
dir=$(cd "${1:-$here/../testops/scenarios}" && pwd)
|
||||
go_cmd=${GO:-go}
|
||||
if [ "$("$go_cmd" env GOOS)" = windows ]; then
|
||||
echo 'artifact-root controls require a POSIX Go runtime (for example, in WSL)' >&2
|
||||
exit 2
|
||||
fi
|
||||
cd "$here/.."
|
||||
TESTOPS_SCENARIO_DIR="$dir" "$go_cmd" test ./scripts -run '^TestTestopsArtifactRootGuards$' -count=1
|
||||
@@ -1,22 +1,14 @@
|
||||
param(
|
||||
[string]$ProductRepoRoot = (Get-Location).Path,
|
||||
[string]$RunnerRoot = "",
|
||||
[string]$RunnerRoot = "C:\work\seaweedfs\learn\sw-test-runner-standalone",
|
||||
[string]$RemoteProductRoot = "/tmp/seaweed-block-nvme-p4l",
|
||||
[Parameter(Mandatory = $true)][string]$SshKey,
|
||||
[Parameter(Mandatory = $true)][string]$NodeHost,
|
||||
[Parameter(Mandatory = $true)][string]$NodeUser,
|
||||
[Parameter(Mandatory = $true)][string]$NodeArtifactRoot,
|
||||
[string]$SshKey = "C:\work\dev_server\testdev_key",
|
||||
[string]$ArtifactRoot = "",
|
||||
[string]$RunId = ""
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# The scenarios put artifact_root into shell commands as raw text.
|
||||
if ($NodeArtifactRoot -cnotmatch '^/[A-Za-z0-9._/-]+\z') {
|
||||
throw "NodeArtifactRoot must be an absolute path other than / using only A-Za-z0-9._/-: $NodeArtifactRoot"
|
||||
}
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($RunId)) {
|
||||
$RunId = "protocol-release-gate-" + (Get-Date).ToUniversalTime().ToString("yyyyMMddTHHmmssZ")
|
||||
}
|
||||
@@ -31,7 +23,7 @@ $ProductCommit = "unknown"
|
||||
$RunnerCommit = "unknown"
|
||||
try { $ProductCommit = (& git -C $ProductRepoRoot rev-parse HEAD).Trim() } catch {}
|
||||
try {
|
||||
if ($RunnerRoot -and (Test-Path $RunnerRoot)) {
|
||||
if (Test-Path $RunnerRoot) {
|
||||
$RunnerCommit = (& git -C $RunnerRoot rev-parse HEAD).Trim()
|
||||
}
|
||||
} catch {}
|
||||
@@ -208,16 +200,13 @@ function Invoke-Chain {
|
||||
"run",
|
||||
"--env", "product_root=$RemoteProductRoot",
|
||||
"--env", "ssh_key=$SshKey",
|
||||
"--env", "node_host=$NodeHost",
|
||||
"--env", "node_user=$NodeUser",
|
||||
"--env", "artifact_root=$NodeArtifactRoot",
|
||||
"--results-dir", $stepResults,
|
||||
$scenarioPath
|
||||
)
|
||||
Set-Content -Path (Join-Path $stepDir "swblock.command.txt") -Value ("swblock " + ($swblockArgs -join " "))
|
||||
$rc = 0
|
||||
try {
|
||||
if ($RunnerRoot -and (Test-Path $RunnerRoot)) {
|
||||
if (Test-Path $RunnerRoot) {
|
||||
$rc = Invoke-NativeRedirect -FilePath "go" -Arguments (@("run", "./cmd/swblock") + $swblockArgs) -WorkingDirectory $RunnerRoot -StdoutPath $stdout -StderrPath $stderr
|
||||
} else {
|
||||
$rc = Invoke-NativeRedirect -FilePath "swblock" -Arguments $swblockArgs -WorkingDirectory $ProductRepoRoot -StdoutPath $stdout -StderrPath $stderr
|
||||
|
||||
@@ -6,16 +6,7 @@ RUN_ID="${SW_BLOCK_RUN_ID:-protocol-release-gate-$(date -u +%Y%m%dT%H%M%SZ)}"
|
||||
ARTIFACT_ROOT="${SW_BLOCK_ARTIFACT_DIR:-$ROOT/results/$RUN_ID}"
|
||||
RESULTS_ROOT="${SW_BLOCK_RESULTS_DIR:-$ARTIFACT_ROOT/runs}"
|
||||
REMOTE_PRODUCT_ROOT="${SW_BLOCK_REMOTE_PRODUCT_ROOT:-/tmp/seaweed-block-nvme-p4l}"
|
||||
# The test node and its access: required, with no default host, user, key or share.
|
||||
SSH_KEY="${SW_BLOCK_SSH_KEY:?set SW_BLOCK_SSH_KEY to the private key for the test node}"
|
||||
NODE_HOST="${SW_BLOCK_NODE_HOST:?set SW_BLOCK_NODE_HOST to the test node address}"
|
||||
NODE_USER="${SW_BLOCK_NODE_USER:?set SW_BLOCK_NODE_USER to the ssh user on the test node}"
|
||||
NODE_ARTIFACT_ROOT="${SW_BLOCK_NODE_ARTIFACT_ROOT:?set SW_BLOCK_NODE_ARTIFACT_ROOT to the shared artifact directory on the test node}"
|
||||
# The scenarios put artifact_root into shell commands as raw text.
|
||||
if [[ ! "$NODE_ARTIFACT_ROOT" =~ ^/[A-Za-z0-9._/-]+$ ]]; then
|
||||
echo "SW_BLOCK_NODE_ARTIFACT_ROOT must be an absolute path other than / using only A-Za-z0-9._/-: $NODE_ARTIFACT_ROOT" >&2
|
||||
exit 2
|
||||
fi
|
||||
SSH_KEY="${SW_BLOCK_SSH_KEY:-C:\\work\\dev_server\\testdev_key}"
|
||||
SWBLOCK_CMD="${SWBLOCK_CMD:-swblock}"
|
||||
SWBLOCK_RUNNER_ROOT="${SWBLOCK_RUNNER_ROOT:-}"
|
||||
SUITE_STARTED_EPOCH="$(date -u +%s)"
|
||||
@@ -176,9 +167,6 @@ run_chain() {
|
||||
run_swblock run \
|
||||
--env "product_root=$REMOTE_PRODUCT_ROOT" \
|
||||
--env "ssh_key=$SSH_KEY" \
|
||||
--env "node_host=$NODE_HOST" \
|
||||
--env "node_user=$NODE_USER" \
|
||||
--env "artifact_root=$NODE_ARTIFACT_ROOT" \
|
||||
--results-dir "$step_results" \
|
||||
"$ROOT/$scenario" \
|
||||
>"$step_dir/swblock.stdout.log" \
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
package scripts_test
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gopkg.in/yaml.v3"
|
||||
)
|
||||
|
||||
type artifactRootScenario struct {
|
||||
Env map[string]string
|
||||
Phases []struct {
|
||||
Name string
|
||||
Always bool
|
||||
Actions []map[string]string
|
||||
}
|
||||
}
|
||||
|
||||
// Exercise whole action copies, including the runner's quoted environment
|
||||
// prefix. No real cleanup executable is reachable in the test's stub PATH.
|
||||
func TestTestopsArtifactRootGuards(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
t.Skip("POSIX shell controls")
|
||||
}
|
||||
dir := os.Getenv("TESTOPS_SCENARIO_DIR")
|
||||
if dir == "" {
|
||||
dir = filepath.Join(repoRoot(t), "testops", "scenarios")
|
||||
}
|
||||
files, err := filepath.Glob(filepath.Join(dir, "*.yaml"))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
guarded, uninstalls := 0, 0
|
||||
for _, path := range files {
|
||||
raw, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
var scenario artifactRootScenario
|
||||
if err := yaml.Unmarshal(raw, &scenario); err != nil {
|
||||
t.Fatalf("%s: %v", path, err)
|
||||
}
|
||||
if _, exists := scenario.Env["artifact_root"]; !exists {
|
||||
continue
|
||||
}
|
||||
for _, phase := range scenario.Phases {
|
||||
for index, action := range phase.Actions {
|
||||
cmd := action["cmd"]
|
||||
if action["action"] != "exec" {
|
||||
continue
|
||||
}
|
||||
usesRoot := strings.Contains(cmd, "{{ artifact_root }}")
|
||||
for key, value := range action {
|
||||
if strings.HasPrefix(key, "env.") && strings.Contains(value, "{{ artifact_root }}") {
|
||||
usesRoot = true
|
||||
}
|
||||
}
|
||||
needsGuard := usesRoot && (phase.Always || strings.Contains(cmd, "rm -") || strings.Contains(cmd, "case "))
|
||||
if !needsGuard {
|
||||
continue
|
||||
}
|
||||
guarded++
|
||||
if phase.Always && strings.Contains(cmd, "uninstall-k8s-alpha.sh") {
|
||||
uninstalls++
|
||||
}
|
||||
name := fmt.Sprintf("%s/%s/%d", filepath.Base(path), phase.Name, index)
|
||||
t.Run(name, func(t *testing.T) { checkArtifactRootAction(t, action) })
|
||||
}
|
||||
}
|
||||
}
|
||||
if guarded < 24 || uninstalls != 6 {
|
||||
t.Fatalf("coverage: guarded actions=%d, always uninstalls=%d; want >=24 and 6", guarded, uninstalls)
|
||||
}
|
||||
}
|
||||
|
||||
func checkArtifactRootAction(t *testing.T, action map[string]string) {
|
||||
t.Helper()
|
||||
work := t.TempDir()
|
||||
bin := filepath.Join(work, "bin")
|
||||
if err := os.Mkdir(bin, 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, overridesPath := action["env.PATH"]; overridesPath {
|
||||
t.Fatal("cleanup controls must retain their stub-only PATH")
|
||||
}
|
||||
if err := os.Symlink("/bin/sh", filepath.Join(bin, "sh")); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.Symlink("/bin/cat", filepath.Join(bin, "cat")); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// Make the uncordon branch real in the supported-root control.
|
||||
nodeFile := filepath.Join(work, "g15d-k8s", "guard-test-node-loss-survival", "demo", "cordoned-primary-node.txt")
|
||||
if err := os.MkdirAll(filepath.Dir(nodeFile), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := os.WriteFile(nodeFile, []byte("node-test\n"), 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
trace := filepath.Join(work, "cleanup-started")
|
||||
for _, name := range []string{"rm", "mkdir", "kubectl", "helm", "sudo", "nvme", "iscsiadm", "bash", "touch", "go"} {
|
||||
stub := "#!/bin/sh\nprintf '%s %s\\n' '" + name + "' \"$*\" >> \"$GUARD_TRACE\"\nexit 0\n"
|
||||
if err := os.WriteFile(filepath.Join(bin, name), []byte(stub), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
bad := []string{"", "/", "relative/dir", "/srv/with space", "/srv/*", "/srv/x\n", "/srv/'$(touch injected)'", "/srv/x'; touch injected; '"}
|
||||
for index, root := range bad {
|
||||
t.Run(fmt.Sprintf("invalid-%d", index), func(t *testing.T) {
|
||||
_ = os.Remove(trace)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
cmd := exec.CommandContext(ctx, "bash", "-c", renderArtifactRootAction(action, root, work))
|
||||
cmd.Dir = work
|
||||
cmd.Env = append(os.Environ(), "PATH="+bin, "GUARD_TRACE="+trace)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if ctx.Err() != nil {
|
||||
t.Fatalf("invalid-root control expired: %v; %s", ctx.Err(), out)
|
||||
}
|
||||
var exit *exec.ExitError
|
||||
if !errors.As(err, &exit) {
|
||||
t.Fatalf("invalid-root command did not complete with a refusal: %v; %s", err, out)
|
||||
}
|
||||
if exit.ExitCode() != 2 {
|
||||
t.Errorf("invalid root %q: exit=%d want2; %s", root, exit.ExitCode(), out)
|
||||
}
|
||||
if raw, readErr := os.ReadFile(trace); readErr == nil || !os.IsNotExist(readErr) {
|
||||
t.Fatalf("invalid root %q started cleanup: %q (read=%v)", root, raw, readErr)
|
||||
}
|
||||
})
|
||||
}
|
||||
// A real supported path must reach the original action, not a blanket
|
||||
// refusal. Every complete body must finish and leave a command witness.
|
||||
_ = os.Remove(trace)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
cmd := exec.CommandContext(ctx, "bash", "-c", renderArtifactRootAction(action, work, work))
|
||||
cmd.Dir = work
|
||||
cmd.Env = append(os.Environ(), "PATH="+bin, "GUARD_TRACE="+trace)
|
||||
out, err := cmd.CombinedOutput()
|
||||
if ctx.Err() != nil || err != nil {
|
||||
t.Fatalf("supported root command did not complete: %v (context=%v); %s", err, ctx.Err(), out)
|
||||
}
|
||||
witness, err := os.ReadFile(trace)
|
||||
if err != nil || len(witness) == 0 {
|
||||
t.Fatalf("supported root did not reach its action: %v; %s", err, out)
|
||||
}
|
||||
for _, target := range []string{"scripts/run-phase129-nvme-k8s-mounted-restage-gate.sh", "scripts/uninstall-k8s-alpha.sh"} {
|
||||
if strings.Contains(action["cmd"], target) && !strings.Contains(string(witness), "bash "+target+" ") {
|
||||
t.Fatalf("missing script witness %s: %s", target, witness)
|
||||
}
|
||||
}
|
||||
if strings.Contains(action["cmd"], "kubectl uncordon") {
|
||||
for _, target := range []string{"kubectl uncordon node-test", "kubectl get node node-test"} {
|
||||
if !strings.Contains(string(witness), target) {
|
||||
t.Fatalf("missing node-file witness %s: %s", target, witness)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func renderArtifactRootAction(action map[string]string, root, product string) string {
|
||||
render := strings.NewReplacer("{{ artifact_root }}", root, "{{ product_root }}", product, "{{ run_id }}", "guard-test")
|
||||
var keys []string
|
||||
for key := range action {
|
||||
if strings.HasPrefix(key, "env.") {
|
||||
keys = append(keys, key)
|
||||
}
|
||||
}
|
||||
sort.Strings(keys)
|
||||
var prefix strings.Builder
|
||||
for _, key := range keys {
|
||||
fmt.Fprintf(&prefix, "%s=%s ", strings.TrimPrefix(key, "env."), artifactShellQuote(render.Replace(action[key])))
|
||||
}
|
||||
// The runner applies env.* to the complete command through sh -c.
|
||||
return prefix.String() + "sh -c " + artifactShellQuote(render.Replace(action["cmd"]))
|
||||
}
|
||||
|
||||
func artifactShellQuote(value string) string {
|
||||
return "'" + strings.ReplaceAll(value, "'", "'\\''") + "'"
|
||||
}
|
||||
@@ -8,10 +8,7 @@ DELETE_ALL_BLOCKVOLUMES="${SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES:-0}"
|
||||
CHAP_SECRET_NAME="${SW_BLOCK_ISCSI_CHAP_SECRET_NAME:-sw-block-iscsi-chap}"
|
||||
STORAGECLASS_NAME="${SW_BLOCK_STORAGECLASS_NAME:-sw-block-dynamic}"
|
||||
|
||||
if ! mkdir -p "$ARTIFACT_DIR" 2>/dev/null; then
|
||||
printf '[alpha-uninstall] cannot create %s; refusing cleanup\n' "$ARTIFACT_DIR" >&2
|
||||
exit 2
|
||||
fi
|
||||
mkdir -p "$ARTIFACT_DIR"
|
||||
|
||||
if [[ -z "${KUBECONFIG:-}" && -f /etc/rancher/k3s/k3s.yaml ]]; then
|
||||
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
|
||||
|
||||
@@ -2,9 +2,7 @@ package scripts_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -30,52 +28,6 @@ func TestUninstallK8sAlphaDeletesSeaweedISCSINodeRecords(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestUninstallK8sAlphaRefusesBeforeCleanupWhenArtifactDirCannotBeCreated(t *testing.T) {
|
||||
if runtime.GOOS == "windows" {
|
||||
t.Skip("bash script")
|
||||
}
|
||||
bash, err := exec.LookPath("bash")
|
||||
if err != nil {
|
||||
t.Skip("bash not available")
|
||||
}
|
||||
work := t.TempDir()
|
||||
bin := filepath.Join(work, "bin")
|
||||
if err := os.Mkdir(bin, 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
calls := filepath.Join(work, "calls.log")
|
||||
for _, name := range []string{"kubectl", "iscsiadm", "helm", "sudo", "nvme"} {
|
||||
stub := "#!/bin/sh\necho \"" + name + " $*\" >> \"" + calls + "\"\nexit 0\n"
|
||||
if err := os.WriteFile(filepath.Join(bin, name), []byte(stub), 0o755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
blocker := filepath.Join(work, "not-a-dir")
|
||||
if err := os.WriteFile(blocker, nil, 0o644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
cmd := exec.Command(bash, filepath.Join(repoRoot(t), "scripts", "uninstall-k8s-alpha.sh"), repoRoot(t))
|
||||
cmd.Env = append(os.Environ(),
|
||||
"PATH="+bin+string(os.PathListSeparator)+os.Getenv("PATH"),
|
||||
"SW_BLOCK_ARTIFACT_DIR="+filepath.Join(blocker, "cleanup"),
|
||||
"TMPDIR="+work,
|
||||
)
|
||||
if out, err := cmd.CombinedOutput(); err == nil {
|
||||
t.Fatalf("uninstall continued without its artifact directory:\n%s", out)
|
||||
}
|
||||
if log, err := os.ReadFile(calls); !os.IsNotExist(err) {
|
||||
t.Fatalf("uninstall started cleanup without its artifact directory: %q (read=%v)", log, err)
|
||||
}
|
||||
good := exec.Command(bash, filepath.Join(repoRoot(t), "scripts", "uninstall-k8s-alpha.sh"), repoRoot(t))
|
||||
good.Env = append(os.Environ(), "PATH="+bin+string(os.PathListSeparator)+os.Getenv("PATH"), "SW_BLOCK_ARTIFACT_DIR="+filepath.Join(work, "artifacts"), "TMPDIR="+work)
|
||||
if out, err := good.CombinedOutput(); err != nil {
|
||||
t.Fatalf("valid artifact directory refused: %v\n%s", err, out)
|
||||
}
|
||||
if log, err := os.ReadFile(calls); err != nil || !strings.Contains(string(log), "kubectl delete") {
|
||||
t.Fatalf("valid artifact directory did not reach cleanup: %q (%v)", log, err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestFailureSnapshotScriptCapturesRequiredEvidenceLayers(t *testing.T) {
|
||||
root := repoRoot(t)
|
||||
raw, err := os.ReadFile(filepath.Join(root, "scripts", "collect-k8s-failure-snapshot.sh"))
|
||||
|
||||
+272
-48
@@ -1,65 +1,78 @@
|
||||
# TestOps scenarios
|
||||
# V3 TestOps Scenarios
|
||||
|
||||
This directory holds runner scenarios for the `swblock` binary of `sw-test-runner`.
|
||||
The product owns the test intent: which scripts represent a gate, what each
|
||||
artifact proves, and what cleanup must hold. The runner owns orchestration:
|
||||
target cleanup, command execution, run-bundle layout and artifact collection.
|
||||
This directory holds product-owned scenario content for the standalone
|
||||
`sw-test-runner` stack.
|
||||
|
||||
The scenarios kept here are the ones this repository's tests or scripts use:
|
||||
`cmd/blockcsi/g15d_manifest_test.go` checks the contents of some of them, and
|
||||
scripts under `scripts/` run others.
|
||||
The intended boundary is:
|
||||
|
||||
## Running a scenario
|
||||
- Product repo owns the test intent: which scripts or checks represent the
|
||||
product gate, what artifacts prove each hop, and what cleanup must be true.
|
||||
- Standalone runner owns orchestration: target cleanup, command execution,
|
||||
build/import coordination, progress checks, run-bundle layout, and artifact
|
||||
collection.
|
||||
- QA can run the same YAML locally or from CI; developers can run it before
|
||||
pushing to avoid stale-image / stale-process / scattered-artifact loops.
|
||||
|
||||
`swblock` is built from the runner's source (`go build -o swblock ./cmd/swblock`),
|
||||
not from this repository. Check a scenario before running it:
|
||||
## Runner Binary
|
||||
|
||||
```bash
|
||||
swblock validate testops/scenarios/nvme-p5-protocol-component-gate.yaml
|
||||
`swblock` is the `sw-test-runner` binary used for Seaweed Block / V3 tests.
|
||||
|
||||
- Source repo: `pingqiu/sw-test-runner`
|
||||
- Source path: `cmd/swblock/main.go`
|
||||
- Build command from the runner repo:
|
||||
|
||||
```bash
|
||||
go build -o swblock ./cmd/swblock
|
||||
```
|
||||
|
||||
- Windows QA convention: `C:\work\swblock.exe`
|
||||
- Linux controller convention: put `swblock` on `PATH`, or set a shell alias to
|
||||
the built binary.
|
||||
|
||||
`swblock` is not built from this product repo. If a developer only has
|
||||
`seaweed_block` checked out, runner-native scenarios can still be authored and
|
||||
statically reviewed here, but `swblock validate`, `swblock run`, and
|
||||
`swblock suite` require the external runner binary.
|
||||
|
||||
Convenience build helpers are available when the runner source is accessible:
|
||||
|
||||
```powershell
|
||||
.\internal\tools\build-swblock.ps1
|
||||
```
|
||||
|
||||
Apart from `helm-multi-volume-rf3-app-spread-failover-chain.yaml`, which still targets
|
||||
the project's lab, no scenario names a host, user, key or share. Each one reads them
|
||||
from its `env` block, where they are empty, so set every one on the command line:
|
||||
|
||||
| Setting | Meaning |
|
||||
| --- | --- |
|
||||
| `product_root` | this repository's checkout on the test node |
|
||||
| `node_host` | address of the test node |
|
||||
| `node_user` | ssh user on the test node |
|
||||
| `ssh_key` | private key for `node_user`, on the controller |
|
||||
| `artifact_root` | shared directory for run artifacts, as the test node sees it; an absolute path other than `/` using only `A-Za-z0-9._/-` |
|
||||
| `import_nodes` | every other k3s node, for the image import (`nvme-tcp-status-surface-evidence-chain`, `nvme-tcp-cross-node-multivolume-lifecycle-soak-chain`); without it only the test node gets the images |
|
||||
| `node_ssh_key` | key path on the test node for the image import (those two chains and `node-loss-survival-rf3-reattach-chain`) |
|
||||
|
||||
```bash
|
||||
swblock run \
|
||||
-env product_root=/path/to/seaweed-block \
|
||||
-env node_host=192.0.2.10 \
|
||||
-env node_user=tester \
|
||||
-env ssh_key=/path/to/key \
|
||||
-env artifact_root=/path/to/shared/artifacts \
|
||||
testops/scenarios/nvme-p5-protocol-component-gate.yaml
|
||||
bash internal/tools/build-swblock.sh
|
||||
```
|
||||
|
||||
Destructive and artifact-dependent always actions validate the root independently,
|
||||
before cleanup starts. The value reaches the guard through the runner's quoted
|
||||
`env.SW_BLOCK_ARTIFACT_ROOT` parameter, rather than being rendered into shell
|
||||
syntax. This also protects a direct `swblock run` when an earlier phase fails.
|
||||
Uninstall refuses cleanup if its artifact directory cannot be created.
|
||||
They build into `.tools/swblock(.exe)`, write `.tools/swblock.path`, and print
|
||||
the final binary path.
|
||||
|
||||
Check every complete guard/action copy locally, with cleanup stubs and no cluster:
|
||||
`bash scripts/testops-artifact-root-guard-test.sh` (requires Go on a POSIX system).
|
||||
Related runner binaries share the same engine but link different product/action
|
||||
sets:
|
||||
|
||||
## Which gate to run
|
||||
- `swblock`: V3 / Seaweed Block product pack.
|
||||
- `weedblock`: V2 product pack.
|
||||
- `cmd/sw-test-runner`: kitchen-sink/dev binary.
|
||||
|
||||
Use the smallest gate that proves the contract you changed.
|
||||
Recommended local check before running scenarios:
|
||||
|
||||
| Change type | Gate |
|
||||
| --- | --- |
|
||||
| Package-local logic, parser, renderer, state-machine helper | `go test -count=1 ./<touched-package>` |
|
||||
| CSI protocol propagation, lifecycle persistence, launcher render shape | `nvme-p5-protocol-component-gate` |
|
||||
| Kernel initiator, k3s, mounted filesystem, failover or stale-session behaviour | the matching chain, for example `nvme-p5-csi-protocol-chain`, `nvme-p4-multipath-failover-chain` or `iscsi-p6-alua-failover-chain` |
|
||||
```bash
|
||||
swblock list
|
||||
swblock validate testops/scenarios/csi-rf1-durable-restart-chain.yaml
|
||||
```
|
||||
|
||||
## Which Gate To Run
|
||||
|
||||
Use the smallest gate that can prove the contract you changed.
|
||||
|
||||
| Change type | Default gate | Why |
|
||||
| --- | --- | --- |
|
||||
| Package-local logic, parser, renderer, state-machine helper | `go test -count=1 ./<touched-package>` | Fastest feedback; no m02 or runner dependency. |
|
||||
| CSI protocol propagation, lifecycle persistence, launcher render shape | `swblock run testops/scenarios/nvme-p5-protocol-component-gate.yaml` | Proves the known NVMe/iSCSI protocol-shape contracts with a runner bundle in seconds. |
|
||||
| RF=1 restart contract, durable-root/status manifest shape | `swblock run testops/scenarios/csi-rf1-durable-restart-component-gate.yaml` | Proves restart/recovery contract shape without a full K8s restart. |
|
||||
| Operations read-only volume status report shape | `swblock run testops/scenarios/operations-volume-status-report-component-gate.yaml` | Proves schema, frontend identity, unavailable fields, and residue copy behavior without starting product processes. |
|
||||
| Kernel initiator, k3s, mounted filesystem, failover, or stale-session behavior | The matching child chain, for example `nvme-p5-csi-protocol-chain` or `csi-rf1-durable-restart-chain` | These require real Linux/K8s/initiator behavior. |
|
||||
| Milestone readiness or cross-protocol release confidence | `swblock suite testops/suites/beta-hardening-gate.yaml` plus `swblock validate-bundle --profile beta-hardening` | Slow, evidence-heavy gate. Use for release/milestone claims, not first debugging. |
|
||||
|
||||
**Node loss (`node-loss-survival-rf3-reattach-chain`).** This release claims no automatic promotion on node loss:
|
||||
the gate cordons the primary's node and stops it, requires that no other replica is promoted during the hold
|
||||
@@ -70,3 +83,214 @@ data. Manual failover (a `SwBlockReplicaFailback` handled by the failback execut
|
||||
(`core/host/master/failback_runtime_test.go`), `TestFailbackAuthorityRuntimeAdapterRejectsStaleExpectedCurrent`
|
||||
(`core/ops/failback_authority_runtime_adapter_test.go`) and `TestFailbackExecutorInvokesRuntimeWhenExplicitlyEnabled`
|
||||
(`core/ops/failback_executor_controller_test.go`).
|
||||
|
||||
Default ownership:
|
||||
|
||||
- Developers run unit/component tests, fast runner-native component gates, and
|
||||
single-child chains while iterating.
|
||||
- QA runs full-suite repeatability, long soak, ambiguous lab failures, and
|
||||
independent milestone validation.
|
||||
- If QA would only execute a single known command and return stdout, run it
|
||||
yourself and reserve QA for scenario design or trust-critical validation.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
swblock run \
|
||||
-env product_root=/path/to/seaweed_block/on/m02 \
|
||||
-env ssh_key=/path/to/testdev_key/on/controller \
|
||||
testops/scenarios/nvme-p5-csi-protocol-chain.yaml
|
||||
```
|
||||
|
||||
Fast component gates are available for developer loops before running the
|
||||
heavier K8s or initiator paths. For example, the NVMe-P5 protocol component
|
||||
gate pins CSI protocol extraction, lifecycle protocol planning, and launcher
|
||||
protocol persistence/planning, plus launcher NVMe/iSCSI manifest shape without
|
||||
launching k3s:
|
||||
|
||||
```bash
|
||||
swblock run \
|
||||
-env product_root=/path/to/seaweed_block/on/m02 \
|
||||
-env ssh_key=/path/to/testdev_key/on/controller \
|
||||
testops/scenarios/nvme-p5-protocol-component-gate.yaml
|
||||
```
|
||||
|
||||
The RF=1 durable restart path also has a component gate that checks restart
|
||||
wrapper shape, generated hostPath/status manifest behavior, master frontend
|
||||
projection, and durable status lineage without doing the full K8s restart:
|
||||
|
||||
```bash
|
||||
swblock run \
|
||||
-env product_root=/path/to/seaweed_block/on/m02 \
|
||||
-env ssh_key=/path/to/testdev_key/on/controller \
|
||||
testops/scenarios/csi-rf1-durable-restart-component-gate.yaml
|
||||
```
|
||||
|
||||
The first operations-layer status report contract has its own component gate.
|
||||
It is read-only, does not start product processes, and is not a block/data
|
||||
snapshot:
|
||||
|
||||
```bash
|
||||
swblock run \
|
||||
-env product_root=/path/to/seaweed_block/on/m02 \
|
||||
-env ssh_key=/path/to/testdev_key/on/controller \
|
||||
testops/scenarios/operations-volume-status-report-component-gate.yaml
|
||||
```
|
||||
|
||||
The same runner-native shape is used for the longer iSCSI P8 soak:
|
||||
|
||||
```bash
|
||||
swblock run \
|
||||
-env product_root=/path/to/seaweed_block/on/m02 \
|
||||
-env ssh_key=/path/to/testdev_key/on/controller \
|
||||
testops/scenarios/iscsi-p8-compat-soak-chain.yaml
|
||||
```
|
||||
|
||||
The scenario still shells out to existing bash payloads. That is deliberate:
|
||||
the first migration step is to move orchestration and evidence collection into
|
||||
the runner without rewriting the product smoke tests.
|
||||
|
||||
## Protocol Release Gate
|
||||
|
||||
The product-owned release gate composes the current protocol chains:
|
||||
|
||||
- `iscsi-p6-alua-failover-chain`
|
||||
- `nvme-p4-multipath-failover-chain`
|
||||
- `nvme-p5-csi-protocol-chain`
|
||||
- `iscsi-p8-compat-soak-chain`
|
||||
|
||||
The primary operator path is the runner-native suite command. Run it from the
|
||||
controller, pointing it at the remote product checkout on m02:
|
||||
|
||||
```powershell
|
||||
swblock suite `
|
||||
--results-dir <evidence-store>/g15d-k8s/testops-runs/protocol-release-gate-native `
|
||||
--env product_root=/tmp/seaweed-block-nvme-p4l `
|
||||
--env ssh_key=C:/work/dev_server/testdev_key `
|
||||
C:/work/seaweed_block/testops/suites/protocol-release-gate.yaml
|
||||
```
|
||||
|
||||
Validate the bundle before manual artifact review:
|
||||
|
||||
```powershell
|
||||
swblock validate-bundle --profile protocol-release-gate `
|
||||
<evidence-store>/g15d-k8s/testops-runs/protocol-release-gate-native/<run-id>
|
||||
```
|
||||
|
||||
QA close evidence:
|
||||
|
||||
- product commit: `033028e74c1ac3bc06f19c0563bc2e6a0495af59`,
|
||||
- runner commit: `3c1b6603aefcf4c1bf0b22f9a9c081a67e786d8d`,
|
||||
- suite run: `20260509-151531-9c6c`,
|
||||
- result: PASS, validated by `swblock validate-bundle --profile
|
||||
protocol-release-gate`.
|
||||
|
||||
The older wrappers remain available for compatibility and local debugging. The
|
||||
PowerShell wrapper supports both Windows PowerShell 5.1 and PowerShell 7+;
|
||||
native runner stderr is captured into the child artifact directory instead of
|
||||
being treated as a PowerShell exception.
|
||||
|
||||
```powershell
|
||||
.\scripts\testops-run-protocol-release-gate.ps1 `
|
||||
-RunnerRoot C:\work\seaweedfs\learn\sw-test-runner-standalone `
|
||||
-RemoteProductRoot /tmp/seaweed-block-nvme-p4l `
|
||||
-SshKey C:\work\dev_server\testdev_key `
|
||||
-ArtifactRoot C:\work\tmp\protocol-release-gate-$(Get-Date -Format yyyyMMddTHHmmssZ)
|
||||
```
|
||||
|
||||
Linux / Git Bash controllers can use the bash wrapper:
|
||||
|
||||
```bash
|
||||
SWBLOCK_RUNNER_ROOT=/c/work/seaweedfs/learn/sw-test-runner-standalone \
|
||||
SW_BLOCK_REMOTE_PRODUCT_ROOT=/tmp/seaweed-block-nvme-p4l \
|
||||
SW_BLOCK_SSH_KEY='C:\work\dev_server\testdev_key' \
|
||||
SW_BLOCK_ARTIFACT_DIR=/c/work/tmp/protocol-release-gate-$(date -u +%Y%m%dT%H%M%SZ) \
|
||||
bash scripts/testops-run-protocol-release-gate.sh "$PWD"
|
||||
```
|
||||
|
||||
The suite writes a top-level `result.json` and `status.json` with
|
||||
`started_at`, `ended_at`, `wall_clock_s`, child run IDs, per-child PASS/FAIL,
|
||||
and artifact pointers. Each child bundle still owns its own `status.json`,
|
||||
`result.json`, `scenario.yaml`, and collected remote artifacts under
|
||||
`<suite-artifact>/<step>/runs/<child-run-id>/`.
|
||||
|
||||
After a run, validate the suite bundle offline before manual artifact review:
|
||||
|
||||
```powershell
|
||||
.\scripts\testops-validate-latest-protocol-release-gate.ps1 `
|
||||
-RunnerRoot C:\work\seaweedfs\learn\sw-test-runner-standalone `
|
||||
-ArtifactRoot C:\work\tmp\protocol-release-gate-20260509T000000Z `
|
||||
-ExpectCommit 033028e74c1ac3bc06f19c0563bc2e6a0495af59
|
||||
```
|
||||
|
||||
Linux / Git Bash:
|
||||
|
||||
```bash
|
||||
SWBLOCK_RUNNER_ROOT=/c/work/seaweedfs/learn/sw-test-runner-standalone \
|
||||
SW_BLOCK_ARTIFACT_DIR=/c/work/tmp/protocol-release-gate-20260509T000000Z \
|
||||
SW_BLOCK_EXPECT_COMMIT=033028e74c1ac3bc06f19c0563bc2e6a0495af59 \
|
||||
bash scripts/testops-validate-latest-protocol-release-gate.sh "$PWD"
|
||||
```
|
||||
|
||||
The wrapper calls the platform validator profile:
|
||||
|
||||
```bash
|
||||
swblock validate-bundle --profile protocol-release-gate \
|
||||
--expect-commit 033028e74c1ac3bc06f19c0563bc2e6a0495af59 \
|
||||
/path/to/protocol-release-gate-artifact
|
||||
```
|
||||
|
||||
The older product-specific Python checker remains available for local
|
||||
debugging but is no longer the primary operator path:
|
||||
|
||||
```bash
|
||||
python3 scripts/testops-validate-protocol-release-gate.py \
|
||||
/path/to/protocol-release-gate-artifact \
|
||||
--expect-product-commit 033028e74c1ac3bc06f19c0563bc2e6a0495af59
|
||||
```
|
||||
|
||||
Use `--allow-fail` when validating the schema of an intentionally failed or
|
||||
cancelled run; without it the checker requires all four child chains to be
|
||||
`pass` with complete phase counts.
|
||||
|
||||
## Beta Hardening Gate
|
||||
|
||||
`testops/suites/beta-hardening-gate.yaml` is the seed suite for the current
|
||||
beta-hardening plan. It composes the protocol release children plus the new
|
||||
component/restart/reintegration gates:
|
||||
|
||||
- `iscsi-p6-alua-failover-chain`
|
||||
- `nvme-p4-multipath-failover-chain`
|
||||
- `nvme-p5-csi-protocol-chain`
|
||||
- `iscsi-p8-compat-soak-chain`
|
||||
- `csi-lifecycle-component-gate`
|
||||
- `csi-rf1-durable-restart-chain`
|
||||
- `operations-status-diagnostics-chain`
|
||||
- `returned-replica-component-gate`
|
||||
- `iscsi-returned-replica-chain`
|
||||
- `cleanup-residue-chain`
|
||||
|
||||
Run shape:
|
||||
|
||||
```powershell
|
||||
swblock suite `
|
||||
--results-dir <evidence-store>/g15d-k8s/testops-runs/beta-hardening-gate `
|
||||
--env product_root=/tmp/seaweed-block-plan-roadmap-refresh-devrun `
|
||||
--env ssh_key=C:/work/dev_server/testdev_key `
|
||||
C:/work/seaweed_block/testops/suites/beta-hardening-gate.yaml
|
||||
```
|
||||
|
||||
Repeatability evidence:
|
||||
|
||||
- product commit:
|
||||
`8822f20e91c2b88727ead9e49f9bf75eec28c791`
|
||||
- runner commit:
|
||||
`cf65daaf2ce5cf500e1efa48b411f7cb66dbac0b`
|
||||
- run 1: `20260511-031605-8258`, PASS, `21m46s`,
|
||||
`validate-bundle --profile beta-hardening` VALID.
|
||||
- run 2: `20260511-040412-ac38`, PASS, `22m55s`,
|
||||
`validate-bundle --profile beta-hardening` VALID.
|
||||
- no manual cleanup between runs; final residue audit clean.
|
||||
|
||||
Use this suite for milestone readiness or release-candidate confidence. Do not
|
||||
use it as the first debug loop for a package-level change.
|
||||
@@ -0,0 +1,80 @@
|
||||
# Runner-native Phase 67 gate: caught-up rebuild to ACK eligibility publication.
|
||||
|
||||
name: ack-eligibility-publication-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: ack_eligibility_publication_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication bash scripts/run-phase67-ack-eligibility-publication-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication/phase67-ack-eligibility-publication-summary.txt"
|
||||
pattern: "^phase67_ack_eligibility_publication_status=ok$"
|
||||
save_as: phase67_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase67_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication/phase67-ack-eligibility-publication-summary.txt"
|
||||
pattern: "^ack_publication_after_caught_up=true$"
|
||||
save_as: ack_after_caught_up
|
||||
- action: assert_greater
|
||||
actual: "{{ ack_after_caught_up }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication/phase67-ack-eligibility-publication-summary.txt"
|
||||
pattern: "^ack_publication_requires_rebuild_caught_up=true$"
|
||||
save_as: requires_caught_up
|
||||
- action: assert_greater
|
||||
actual: "{{ requires_caught_up }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication/phase67-ack-eligibility-publication-summary.txt"
|
||||
pattern: "^ack_publication_rejects_running_rebuild=true$"
|
||||
save_as: rejects_running
|
||||
- action: assert_greater
|
||||
actual: "{{ rejects_running }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication/phase67-ack-eligibility-publication-summary.txt"
|
||||
pattern: "^ack_publication_rejects_unexpected_publication_allowed=true$"
|
||||
save_as: rejects_unexpected_policy
|
||||
- action: assert_greater
|
||||
actual: "{{ rejects_unexpected_policy }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication/phase67-ack-eligibility-publication-summary.txt"
|
||||
pattern: "^frontend_publication_attempts=0$"
|
||||
save_as: no_frontend
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase67-ack-eligibility-publication"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -10,46 +10,42 @@ timeout: 24m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "" # private key for node_user; set with -env ssh_key=<path>
|
||||
node_host: "" # address of the test node; set with -env node_host=<address>
|
||||
node_user: "" # ssh user on the test node; set with -env node_user=<user>
|
||||
artifact_root: "" # shared artifact directory; set with -env artifact_root=<path>
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
sw_block_image: "ghcr.io/seaweedfs/seaweed-block:sha-28a99ce4f644"
|
||||
sw_block_csi_image: "ghcr.io/seaweedfs/seaweed-block-csi:sha-28a99ce4f644"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
node-a:
|
||||
host: "{{ node_host }}"
|
||||
user: "{{ node_user }}"
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: node-a
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: node-a
|
||||
cmd: "case \"$SW_BLOCK_ARTIFACT_ROOT\" in /?*) ;; *) echo 'artifact_root must be an absolute path other than /' >&2; exit 2;; esac; case \"$SW_BLOCK_ARTIFACT_ROOT\" in *[!A-Za-z0-9._/-]*) echo 'artifact_root may use only A-Za-z0-9._/-' >&2; exit 2;; esac; rm -rf $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-activation-first-volume && mkdir -p $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-activation-first-volume/activation $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-activation-first-volume/cleanup"
|
||||
env.SW_BLOCK_ARTIFACT_ROOT: "{{ artifact_root }}"
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/activation /mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app /mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/cleanup"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: activate_alpha_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 12m
|
||||
cmd: "cd {{ product_root }} && bash scripts/activate-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/activation"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/activation"
|
||||
env.SW_BLOCK_ACTIVATION_IMAGE_MODE: "published"
|
||||
env.SW_BLOCK_IMAGE: "{{ sw_block_image }}"
|
||||
env.SW_BLOCK_CSI_IMAGE: "{{ sw_block_csi_image }}"
|
||||
@@ -57,81 +53,81 @@ phases:
|
||||
- name: first_volume_user_loop
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-basic-app-example.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app"
|
||||
env.SW_BLOCK_BASIC_APP_CLEANUP: "1"
|
||||
|
||||
- name: first_volume_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^first_volume_status=ok$"
|
||||
save_as: first_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^pvc=sw-block-example-pvc$"
|
||||
save_as: pvc_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pvc_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^writer_verified=true$"
|
||||
save_as: writer_verified_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_verified_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^reader_verified=true$"
|
||||
save_as: reader_verified_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_verified_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/writer.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/writer.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: writer_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/reader.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/reader.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: reader_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: basic_cleanup_count
|
||||
- action: assert_greater
|
||||
actual: "{{ basic_cleanup_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/status/cluster-evidence.json"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/status/cluster-evidence.json"
|
||||
pattern: "\"volumes\""
|
||||
save_as: cluster_volumes_count
|
||||
- action: assert_greater
|
||||
actual: "{{ cluster_volumes_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/status/inventory/volume-inventory-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/basic-app/status/inventory/volume-inventory-summary.txt"
|
||||
pattern: "pvc=sw-block-example-pvc"
|
||||
save_as: inventory_pvc_count
|
||||
- action: assert_greater
|
||||
@@ -142,15 +138,14 @@ phases:
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "case \"$SW_BLOCK_ARTIFACT_ROOT\" in /?*) ;; *) echo 'artifact_root must be an absolute path other than /' >&2; exit 2;; esac; case \"$SW_BLOCK_ARTIFACT_ROOT\" in *[!A-Za-z0-9._/-]*) echo 'artifact_root may use only A-Za-z0-9._/-' >&2; exit 2;; esac; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_ROOT: "{{ artifact_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-first-volume/cleanup"
|
||||
cmd: "kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-first-volume/cleanup"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
@@ -7,11 +7,8 @@
|
||||
#
|
||||
# Expected invocation:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/node-a \
|
||||
# -env ssh_key=/path/to/ssh/key/on/controller \
|
||||
# -env node_host=192.0.2.10 \
|
||||
# -env node_user=tester \
|
||||
# -env artifact_root=/path/to/shared/artifacts \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/activation-day1-install-chain.yaml
|
||||
|
||||
name: activation-day1-install-chain
|
||||
@@ -19,131 +16,127 @@ timeout: 18m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "" # private key for node_user; set with -env ssh_key=<path>
|
||||
node_host: "" # address of the test node; set with -env node_host=<address>
|
||||
node_user: "" # ssh user on the test node; set with -env node_user=<user>
|
||||
artifact_root: "" # shared artifact directory; set with -env artifact_root=<path>
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
node-a:
|
||||
host: "{{ node_host }}"
|
||||
user: "{{ node_user }}"
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: node-a
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: node-a
|
||||
cmd: "case \"$SW_BLOCK_ARTIFACT_ROOT\" in /?*) ;; *) echo 'artifact_root must be an absolute path other than /' >&2; exit 2;; esac; case \"$SW_BLOCK_ARTIFACT_ROOT\" in *[!A-Za-z0-9._/-]*) echo 'artifact_root may use only A-Za-z0-9._/-' >&2; exit 2;; esac; rm -rf $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-activation-day1 && mkdir -p $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-activation-day1/activation $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-activation-day1/cleanup"
|
||||
env.SW_BLOCK_ARTIFACT_ROOT: "{{ artifact_root }}"
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1 && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation /mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/cleanup"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: activate_alpha_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 12m
|
||||
cmd: "cd {{ product_root }} && bash scripts/activate-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation"
|
||||
env.SW_BLOCK_ACTIVATION_IMPORT_K3S: "1"
|
||||
|
||||
- name: activation_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "^activation_status=ok$"
|
||||
save_as: activation_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ activation_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "^master_ready_replicas=1$"
|
||||
save_as: master_ready_count
|
||||
- action: assert_greater
|
||||
actual: "{{ master_ready_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "^csi_controller_ready_replicas=1$"
|
||||
save_as: csi_controller_ready_count
|
||||
- action: assert_greater
|
||||
actual: "{{ csi_controller_ready_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "^csi_node_ready=[1-9][0-9]*/[1-9][0-9]*$"
|
||||
save_as: csi_node_ready_count
|
||||
- action: assert_greater
|
||||
actual: "{{ csi_node_ready_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "^storageclass=sw-block-dynamic$"
|
||||
save_as: storageclass_count
|
||||
- action: assert_greater
|
||||
actual: "{{ storageclass_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "^storageclass_provider=block.csi.seaweedfs.com$"
|
||||
save_as: storageclass_provider_count
|
||||
- action: assert_greater
|
||||
actual: "{{ storageclass_provider_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "^protocol=iscsi$"
|
||||
save_as: protocol_count
|
||||
- action: assert_greater
|
||||
actual: "{{ protocol_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "^ack_profile=best-effort$"
|
||||
save_as: ack_profile_count
|
||||
- action: assert_greater
|
||||
actual: "{{ ack_profile_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "next_create_volume=kubectl apply -f examples/kubernetes/basic-app/storageclass-pvc.yaml"
|
||||
save_as: next_create_volume_count
|
||||
- action: assert_greater
|
||||
actual: "{{ next_create_volume_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/activation-summary.txt"
|
||||
pattern: "non_claims=alpha_only,no_backup_restore,no_upgrade_safety,no_mutating_dashboard_actions,no_broad_performance_slo"
|
||||
save_as: non_claims_count
|
||||
- action: assert_greater
|
||||
actual: "{{ non_claims_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/activation/readiness.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/activation/readiness.txt"
|
||||
pattern: "sw-block-csi-node"
|
||||
save_as: readiness_csi_node_count
|
||||
- action: assert_greater
|
||||
@@ -154,21 +147,20 @@ phases:
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "case \"$SW_BLOCK_ARTIFACT_ROOT\" in /?*) ;; *) echo 'artifact_root must be an absolute path other than /' >&2; exit 2;; esac; case \"$SW_BLOCK_ARTIFACT_ROOT\" in *[!A-Za-z0-9._/-]*) echo 'artifact_root may use only A-Za-z0-9._/-' >&2; exit 2;; esac; cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_ROOT: "{{ artifact_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/cleanup"
|
||||
cmd: "cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/cleanup"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-activation-day1/cleanup/delete-storageclass.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-activation-day1/cleanup/delete-storageclass.log"
|
||||
pattern: "sw-block-dynamic"
|
||||
save_as: storageclass_cleanup_count
|
||||
- action: assert_greater
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
# Runner-native Phase 54 D4 gate: authority-executor ACK eligibility call-site.
|
||||
|
||||
name: authority-executor-callsite-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: authority_executor_callsite_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite bash scripts/run-phase54-authority-executor-callsite-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^phase54_authority_executor_callsite_status=ok$"
|
||||
save_as: phase54_callsite_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase54_callsite_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^target_missing_mutation_attempts=0$"
|
||||
save_as: target_missing_no_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ target_missing_no_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^target_missing_created_targets=0$"
|
||||
save_as: target_missing_no_create
|
||||
- action: assert_greater
|
||||
actual: "{{ target_missing_no_create }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^terminal_missing_mutation_attempts=0$"
|
||||
save_as: terminal_missing_no_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ terminal_missing_no_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^terminal_missing_target_reason_absent=$"
|
||||
save_as: terminal_missing_no_status
|
||||
- action: assert_greater
|
||||
actual: "{{ terminal_missing_no_status }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_mutation_attempts=1$"
|
||||
save_as: complete_one_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_one_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_ack_eligibility_mutation_attempts=1$"
|
||||
save_as: complete_one_ack_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_one_ack_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_target_reason=ack_eligibility_recorded$"
|
||||
save_as: complete_reason
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_reason }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_target_ack_eligible=true$"
|
||||
save_as: complete_ack_eligible
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_ack_eligible }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_target_frontend_fenced=true$"
|
||||
save_as: complete_frontend_fenced
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_frontend_fenced }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_target_primary_unchanged=true$"
|
||||
save_as: complete_primary_unchanged
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_primary_unchanged }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_target_frontier_covered=true$"
|
||||
save_as: complete_frontier_covered
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_frontier_covered }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_target_no_cross_volume=true$"
|
||||
save_as: complete_no_cross_volume
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_no_cross_volume }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_swblockvolume_ack_still_false=false$"
|
||||
save_as: complete_source_unchanged
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_source_unchanged }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^complete_target_nonclaims_ok=true$"
|
||||
save_as: complete_nonclaims
|
||||
- action: assert_greater
|
||||
actual: "{{ complete_nonclaims }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^exec_patch_swblockvolumes_status_denied=no$"
|
||||
save_as: boundary_volume_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ boundary_volume_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite/phase54-authority-executor-callsite-summary.txt"
|
||||
pattern: "^exec_create_events_denied=no$"
|
||||
save_as: boundary_events_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ boundary_events_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-callsite"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,128 @@
|
||||
# Runner-native Phase 62 gate: authority-executor HTTP rebuild runtime transport.
|
||||
|
||||
name: authority-executor-http-runtime-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: authority_executor_http_runtime_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime bash scripts/run-phase62-authority-executor-http-runtime-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^phase62_authority_executor_http_runtime_status=ok$"
|
||||
save_as: phase62_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase62_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^http_runtime_posts_request=true$"
|
||||
save_as: posts_request
|
||||
- action: assert_greater
|
||||
actual: "{{ posts_request }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^http_runtime_decodes_terminal_frontier=true$"
|
||||
save_as: decodes_frontier
|
||||
- action: assert_greater
|
||||
actual: "{{ decodes_frontier }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^cli_rebuild_runtime_url_enabled=true$"
|
||||
save_as: cli_enabled
|
||||
- action: assert_greater
|
||||
actual: "{{ cli_enabled }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^cli_rebuild_runtime_url_requires_rebuild_traffic=true$"
|
||||
save_as: cli_guard
|
||||
- action: assert_greater
|
||||
actual: "{{ cli_guard }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^rebuild_status_running_written=true$"
|
||||
save_as: running_written
|
||||
- action: assert_greater
|
||||
actual: "{{ running_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^rebuild_status_caught_up_written=true$"
|
||||
save_as: caught_up_written
|
||||
- action: assert_greater
|
||||
actual: "{{ caught_up_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^rebuild_status_blocked_on_runtime_failure=true$"
|
||||
save_as: blocked_written
|
||||
- action: assert_greater
|
||||
actual: "{{ blocked_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^planned_status_preserved_without_runtime=true$"
|
||||
save_as: planned_preserved
|
||||
- action: assert_greater
|
||||
actual: "{{ planned_preserved }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^blockvolume_runtime_endpoint_wired=false$"
|
||||
save_as: endpoint_not_wired
|
||||
- action: assert_greater
|
||||
actual: "{{ endpoint_not_wired }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime/phase62-authority-executor-http-runtime-summary.txt"
|
||||
pattern: "^failback_allowed=false$"
|
||||
save_as: no_failback
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase62-authority-executor-http-runtime"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,166 @@
|
||||
# Runner-native Phase 54 D7 gate: live returned-replica close with bounded ACK eligibility execution.
|
||||
|
||||
name: authority-executor-live-close-chain
|
||||
timeout: 22m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
unmount: "/tmp/sw-block-phase54-live-close/mnt"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: authority_executor_live_close_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 18m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close bash scripts/run-phase54-authority-executor-live-close-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^phase54_authority_executor_live_close_status=ok$"
|
||||
save_as: phase54_live_close_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase54_live_close_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^previous_primary_frontend_fenced=true$"
|
||||
save_as: previous_primary_fenced
|
||||
- action: assert_greater
|
||||
actual: "{{ previous_primary_fenced }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^current_primary_unchanged=true$"
|
||||
save_as: current_primary_unchanged
|
||||
- action: assert_greater
|
||||
actual: "{{ current_primary_unchanged }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^durable_frontier_covered=true$"
|
||||
save_as: durable_frontier_covered
|
||||
- action: assert_greater
|
||||
actual: "{{ durable_frontier_covered }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^executor_ack_mutation_attempts=1$"
|
||||
save_as: one_ack_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ one_ack_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^target_reason=ack_eligibility_recorded$"
|
||||
save_as: target_ack_recorded
|
||||
- action: assert_greater
|
||||
actual: "{{ target_ack_recorded }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^target_ack_eligible=true$"
|
||||
save_as: target_ack_eligible
|
||||
- action: assert_greater
|
||||
actual: "{{ target_ack_eligible }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^target_frontend_fenced=true$"
|
||||
save_as: target_frontend_fenced
|
||||
- action: assert_greater
|
||||
actual: "{{ target_frontend_fenced }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^target_primary_unchanged=true$"
|
||||
save_as: target_primary_unchanged
|
||||
- action: assert_greater
|
||||
actual: "{{ target_primary_unchanged }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^target_frontier_covered=true$"
|
||||
save_as: target_frontier_covered
|
||||
- action: assert_greater
|
||||
actual: "{{ target_frontier_covered }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^target_no_cross_volume=true$"
|
||||
save_as: target_no_cross_volume
|
||||
- action: assert_greater
|
||||
actual: "{{ target_no_cross_volume }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^source_ack_still_false=false$"
|
||||
save_as: source_ack_unchanged
|
||||
- action: assert_greater
|
||||
actual: "{{ source_ack_unchanged }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close/phase54-authority-executor-live-close-summary.txt"
|
||||
pattern: "^target_nonclaims_ok=true$"
|
||||
save_as: target_nonclaims_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ target_nonclaims_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: final_asserts
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
unmount: "/tmp/sw-block-phase54-live-close/mnt"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-live-close"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,152 @@
|
||||
# Runner-native Phase 54 D6 gate: authority-executor multi-volume isolation.
|
||||
|
||||
name: authority-executor-multivolume-chain
|
||||
timeout: 10m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: authority_executor_multivolume_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 9m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume bash scripts/run-phase54-authority-executor-multivolume-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^phase54_authority_executor_multivolume_status=ok$"
|
||||
save_as: phase54_multivolume_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase54_multivolume_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^multivolume_contracts=4$"
|
||||
save_as: multivolume_contracts
|
||||
- action: assert_greater
|
||||
actual: "{{ multivolume_contracts }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^multivolume_mutation_attempts=2$"
|
||||
save_as: multivolume_two_mutations
|
||||
- action: assert_greater
|
||||
actual: "{{ multivolume_two_mutations }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^multivolume_ack_mutation_attempts=2$"
|
||||
save_as: multivolume_two_ack_mutations
|
||||
- action: assert_greater
|
||||
actual: "{{ multivolume_two_ack_mutations }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^multivolume_terminal_missing=1$"
|
||||
save_as: multivolume_one_terminal_missing
|
||||
- action: assert_greater
|
||||
actual: "{{ multivolume_one_terminal_missing }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^multivolume_target_missing=1$"
|
||||
save_as: multivolume_one_target_missing
|
||||
- action: assert_greater
|
||||
actual: "{{ multivolume_one_target_missing }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^eligible_a_reason=ack_eligibility_recorded$"
|
||||
save_as: eligible_a_written
|
||||
- action: assert_greater
|
||||
actual: "{{ eligible_a_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^eligible_b_reason=ack_eligibility_recorded$"
|
||||
save_as: eligible_b_written
|
||||
- action: assert_greater
|
||||
actual: "{{ eligible_b_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^blocked_c_reason_absent=$"
|
||||
save_as: blocked_c_held
|
||||
- action: assert_greater
|
||||
actual: "{{ blocked_c_held }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^mismatch_e_reason_absent=$"
|
||||
save_as: mismatch_e_held
|
||||
- action: assert_greater
|
||||
actual: "{{ mismatch_e_held }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^no_contract_d_target_count=0$"
|
||||
save_as: no_contract_d_no_target
|
||||
- action: assert_greater
|
||||
actual: "{{ no_contract_d_no_target }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^eligible_written_count=2$"
|
||||
save_as: exactly_two_written
|
||||
- action: assert_greater
|
||||
actual: "{{ exactly_two_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^cross_contamination_count=0$"
|
||||
save_as: no_cross_contamination
|
||||
- action: assert_greater
|
||||
actual: "{{ no_cross_contamination }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^exec_patch_swblockvolumes_status_denied=no$"
|
||||
save_as: boundary_volume_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ boundary_volume_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume/phase54-authority-executor-multivolume-summary.txt"
|
||||
pattern: "^exec_create_events_denied=no$"
|
||||
save_as: boundary_events_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ boundary_events_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-multivolume"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,128 @@
|
||||
# Runner-native Phase 54 D5 gate: authority-executor negative/hold matrix.
|
||||
|
||||
name: authority-executor-negative-chain
|
||||
timeout: 10m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: authority_executor_negative_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 9m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative bash scripts/run-phase54-authority-executor-negative-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^phase54_authority_executor_negative_status=ok$"
|
||||
save_as: phase54_negative_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase54_negative_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^blocked-preflight_mutation_attempts=0$"
|
||||
save_as: blocked_preflight_no_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ blocked_preflight_no_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^stale-frontier_mutation_attempts=0$"
|
||||
save_as: stale_frontier_no_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ stale_frontier_no_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^unsafe-frontend_mutation_attempts=0$"
|
||||
save_as: unsafe_frontend_no_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ unsafe_frontend_no_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^ambiguous_target_mutation_attempts=0$"
|
||||
save_as: ambiguous_no_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ ambiguous_no_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^identity_mismatch_mutation_attempts=0$"
|
||||
save_as: identity_mismatch_no_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ identity_mismatch_no_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^partial_mutation_attempts=1$"
|
||||
save_as: partial_one_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ partial_one_mutation }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^partial_terminal_missing=1$"
|
||||
save_as: partial_one_hold
|
||||
- action: assert_greater
|
||||
actual: "{{ partial_one_hold }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^partial_a_reason=ack_eligibility_recorded$"
|
||||
save_as: partial_a_written
|
||||
- action: assert_greater
|
||||
actual: "{{ partial_a_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^partial_b_reason_absent=$"
|
||||
save_as: partial_b_held
|
||||
- action: assert_greater
|
||||
actual: "{{ partial_b_held }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^exec_patch_swblockvolumes_status_denied=no$"
|
||||
save_as: boundary_volume_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ boundary_volume_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative/phase54-authority-executor-negative-summary.txt"
|
||||
pattern: "^exec_create_events_denied=no$"
|
||||
save_as: boundary_events_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ boundary_events_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-negative"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,72 @@
|
||||
# Runner-native Phase 53 gate: authority-executor RBAC boundary.
|
||||
|
||||
name: authority-executor-rbac-chain
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: authority_executor_rbac_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac bash scripts/run-phase53-authority-executor-rbac-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac/phase53-authority-executor-rbac-summary.txt"
|
||||
pattern: "^phase53_authority_executor_rbac_status=ok$"
|
||||
save_as: phase53_rbac_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase53_rbac_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac/phase53-authority-executor-rbac-summary.txt"
|
||||
pattern: "^authority_executor_get_swblockvolumes_allowed=yes$"
|
||||
save_as: phase53_get_allowed
|
||||
- action: assert_greater
|
||||
actual: "{{ phase53_get_allowed }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac/phase53-authority-executor-rbac-summary.txt"
|
||||
pattern: "^authority_executor_patch_swblockvolumes_denied=no$"
|
||||
save_as: phase53_patch_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ phase53_patch_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac/phase53-authority-executor-rbac-summary.txt"
|
||||
pattern: "^authority_executor_patch_status_denied=no$"
|
||||
save_as: phase53_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ phase53_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac/phase53-authority-executor-rbac-summary.txt"
|
||||
pattern: "^authority_executor_create_events_denied=no$"
|
||||
save_as: phase53_events_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ phase53_events_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase53-authority-executor-rbac"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,128 @@
|
||||
# Runner-native Phase 57 gate: authority-executor rebuild target RBAC boundary.
|
||||
|
||||
name: authority-executor-rebuild-target-rbac-chain
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: authority_executor_rebuild_target_rbac_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac bash scripts/run-phase57-authority-executor-rebuild-target-rbac-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^phase57_authority_executor_rebuild_target_rbac_status=ok$"
|
||||
save_as: phase57_rbac_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase57_rbac_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^default_patch_swblockreplicarebuilds_status_denied=no$"
|
||||
save_as: default_rebuild_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ default_rebuild_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^exec_patch_swblockreplicarebuilds_status_allowed=yes$"
|
||||
save_as: exec_rebuild_status_allowed
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_rebuild_status_allowed }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^exec_patch_swblockreplicarebuilds_main_denied=no$"
|
||||
save_as: exec_rebuild_main_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_rebuild_main_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^exec_patch_swblockvolumes_status_denied=no$"
|
||||
save_as: exec_swblockvolume_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_swblockvolume_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^exec_patch_swblockreplicaeligibilities_status_denied=no$"
|
||||
save_as: exec_eligibility_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_eligibility_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^exec_create_events_denied=no$"
|
||||
save_as: exec_events_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_events_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^default_rebuild_status_patch_runtime_denied=true$"
|
||||
save_as: default_runtime_patch_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ default_runtime_patch_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^runtime_rebuild_status_state=planned$"
|
||||
save_as: runtime_state_planned
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_state_planned }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^runtime_rebuild_status_reason=rebuild_progress_planned$"
|
||||
save_as: runtime_reason_planned
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_reason_planned }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^runtime_rebuild_traffic_started=false$"
|
||||
save_as: runtime_no_traffic
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_no_traffic }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac/phase57-authority-executor-rebuild-target-rbac-summary.txt"
|
||||
pattern: "^runtime_no_frontend_publication=true$"
|
||||
save_as: runtime_no_frontend_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_no_frontend_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase57-authority-executor-rebuild-target-rbac"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,136 @@
|
||||
# Runner-native Phase 61 gate: authority-executor rebuild runtime call-site.
|
||||
|
||||
name: authority-executor-runtime-callsite-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: authority_executor_runtime_callsite_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite bash scripts/run-phase61-authority-executor-runtime-callsite-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^phase61_authority_executor_runtime_callsite_status=ok$"
|
||||
save_as: phase61_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase61_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^planned_without_runtime_test=true$"
|
||||
save_as: planned_preserved
|
||||
- action: assert_greater
|
||||
actual: "{{ planned_preserved }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^runtime_callsite_caught_up_test=true$"
|
||||
save_as: runtime_caught_up
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_caught_up }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^runtime_failure_blocked_test=true$"
|
||||
save_as: runtime_blocked
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_blocked }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^runtime_callsite_invoked=true$"
|
||||
save_as: callsite_invoked
|
||||
- action: assert_greater
|
||||
actual: "{{ callsite_invoked }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^rebuild_status_running_written=true$"
|
||||
save_as: running_written
|
||||
- action: assert_greater
|
||||
actual: "{{ running_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^rebuild_status_caught_up_written=true$"
|
||||
save_as: caught_up_written
|
||||
- action: assert_greater
|
||||
actual: "{{ caught_up_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^rebuild_status_blocked_on_runtime_failure=true$"
|
||||
save_as: blocked_written
|
||||
- action: assert_greater
|
||||
actual: "{{ blocked_written }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^rebuild_traffic_started_when_runtime_invoked=true$"
|
||||
save_as: traffic_started
|
||||
- action: assert_greater
|
||||
actual: "{{ traffic_started }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^durable_frontier_caught_up_after_runtime=true$"
|
||||
save_as: frontier_caught_up
|
||||
- action: assert_greater
|
||||
actual: "{{ frontier_caught_up }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^blockvolume_rpc_wired=false$"
|
||||
save_as: rpc_not_wired
|
||||
- action: assert_greater
|
||||
actual: "{{ rpc_not_wired }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite/phase61-authority-executor-runtime-callsite-summary.txt"
|
||||
pattern: "^failback_allowed=false$"
|
||||
save_as: no_failback
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase61-authority-executor-runtime-callsite"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,80 @@
|
||||
# Runner-native Phase 54 D3 gate: authority-executor ACK target RBAC boundary.
|
||||
|
||||
name: authority-executor-target-rbac-chain
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: authority_executor_target_rbac_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac bash scripts/run-phase54-authority-executor-target-rbac-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac/phase54-authority-executor-target-rbac-summary.txt"
|
||||
pattern: "^phase54_authority_executor_target_rbac_status=ok$"
|
||||
save_as: phase54_rbac_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase54_rbac_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac/phase54-authority-executor-target-rbac-summary.txt"
|
||||
pattern: "^default_patch_swblockreplicaeligibilities_status_denied=no$"
|
||||
save_as: default_target_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ default_target_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac/phase54-authority-executor-target-rbac-summary.txt"
|
||||
pattern: "^exec_patch_swblockreplicaeligibilities_status_allowed=yes$"
|
||||
save_as: exec_target_status_allowed
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_target_status_allowed }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac/phase54-authority-executor-target-rbac-summary.txt"
|
||||
pattern: "^exec_patch_swblockreplicaeligibilities_main_denied=no$"
|
||||
save_as: exec_target_main_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_target_main_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac/phase54-authority-executor-target-rbac-summary.txt"
|
||||
pattern: "^exec_patch_swblockvolumes_status_denied=no$"
|
||||
save_as: exec_swblockvolume_status_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_swblockvolume_status_denied }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac/phase54-authority-executor-target-rbac-summary.txt"
|
||||
pattern: "^exec_create_events_denied=no$"
|
||||
save_as: exec_events_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ exec_events_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase54-authority-executor-target-rbac"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,96 @@
|
||||
# Runner-native Phase 64 gate: blockvolume runtime rebuild start endpoint.
|
||||
|
||||
name: blockvolume-runtime-endpoint-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: blockvolume_runtime_endpoint_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint bash scripts/run-phase64-blockvolume-runtime-endpoint-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint/phase64-blockvolume-runtime-endpoint-summary.txt"
|
||||
pattern: "^phase64_blockvolume_runtime_endpoint_status=ok$"
|
||||
save_as: phase64_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase64_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint/phase64-blockvolume-runtime-endpoint-summary.txt"
|
||||
pattern: "^runtime_state_started_supported=true$"
|
||||
save_as: started_supported
|
||||
- action: assert_greater
|
||||
actual: "{{ started_supported }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint/phase64-blockvolume-runtime-endpoint-summary.txt"
|
||||
pattern: "^authority_executor_started_result_not_blocked=true$"
|
||||
save_as: started_not_blocked
|
||||
- action: assert_greater
|
||||
actual: "{{ started_not_blocked }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint/phase64-blockvolume-runtime-endpoint-summary.txt"
|
||||
pattern: "^blockvolume_runtime_endpoint_opt_in=true$"
|
||||
save_as: opt_in
|
||||
- action: assert_greater
|
||||
actual: "{{ opt_in }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint/phase64-blockvolume-runtime-endpoint-summary.txt"
|
||||
pattern: "^blockvolume_runtime_endpoint_posts_started=true$"
|
||||
save_as: posts_started
|
||||
- action: assert_greater
|
||||
actual: "{{ posts_started }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint/phase64-blockvolume-runtime-endpoint-summary.txt"
|
||||
pattern: "^blockvolume_runtime_endpoint_requires_primary=true$"
|
||||
save_as: requires_primary
|
||||
- action: assert_greater
|
||||
actual: "{{ requires_primary }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint/phase64-blockvolume-runtime-endpoint-summary.txt"
|
||||
pattern: "^replication_runtime_rejects_lineage_drift=true$"
|
||||
save_as: rejects_drift
|
||||
- action: assert_greater
|
||||
actual: "{{ rejects_drift }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint/phase64-blockvolume-runtime-endpoint-summary.txt"
|
||||
pattern: "^runtime_endpoint_terminal_frontier_claimed=false$"
|
||||
save_as: no_terminal_claim
|
||||
- action: assert_greater
|
||||
actual: "{{ no_terminal_claim }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase64-blockvolume-runtime-endpoint"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,72 @@
|
||||
# Runner-native Phase 66 gate: caught-up publication preflight surface.
|
||||
|
||||
name: caught-up-publication-preflight-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: publication_preflight_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight bash scripts/run-phase66-caught-up-publication-preflight-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight/phase66-caught-up-publication-preflight-summary.txt"
|
||||
pattern: "^phase66_caught_up_publication_preflight_status=ok$"
|
||||
save_as: phase66_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase66_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight/phase66-caught-up-publication-preflight-summary.txt"
|
||||
pattern: "^publication_decision_schema_locked=true$"
|
||||
save_as: schema_locked
|
||||
- action: assert_greater
|
||||
actual: "{{ schema_locked }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight/phase66-caught-up-publication-preflight-summary.txt"
|
||||
pattern: "^publication_blocked_until_caught_up=true$"
|
||||
save_as: blocked_until_caught_up
|
||||
- action: assert_greater
|
||||
actual: "{{ blocked_until_caught_up }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight/phase66-caught-up-publication-preflight-summary.txt"
|
||||
pattern: "^publication_disabled_after_caught_up=true$"
|
||||
save_as: disabled_after_caught_up
|
||||
- action: assert_greater
|
||||
actual: "{{ disabled_after_caught_up }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight/phase66-caught-up-publication-preflight-summary.txt"
|
||||
pattern: "^publication_mutation_allowed=false$"
|
||||
save_as: mutation_false
|
||||
- action: assert_greater
|
||||
actual: "{{ mutation_false }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase66-caught-up-publication-preflight"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,88 @@
|
||||
# Runner-native cleanup residue audit.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the lab is clean before the next workload starts. This is not an
|
||||
# install/uninstall functional test; it is a repeatability guard for beta
|
||||
# suites that should fail when stale iSCSI/NVMe/K8s/process state leaks from
|
||||
# earlier children.
|
||||
#
|
||||
# Expected invocation:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/cleanup-residue-chain.yaml
|
||||
|
||||
name: cleanup-residue-chain
|
||||
timeout: 6m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: host_protocol_residue
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/uninstall /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/pin_build"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then git rev-parse HEAD > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/pin_build/git.sha && git status --porcelain > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/pin_build/git.status && test ! -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/pin_build/git.status; else echo no-git-worktree > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/pin_build/git.sha; : > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/pin_build/git.status; fi"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "command -v iscsiadm >/dev/null && (sudo -n iscsiadm -m session > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/iscsi-sessions.after-cleanup.txt 2>&1 || grep -q 'No active sessions' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/iscsi-sessions.after-cleanup.txt)"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/verify-cleanup bash scripts/verify-helm-cleanup.sh {{ product_root }}"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "sudo nvme list-subsys -o json > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/nvme-list-subsys.after-cleanup.json 2> /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/nvme-list-subsys.after-cleanup.err && ! grep -Ei 'nqn\\.[^[:space:]\"}]*seaweedfs|nqn\\.[^[:space:]\"}]*sw-block|nqn\\.[^[:space:]\"}]*weedblock' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/nvme-list-subsys.after-cleanup.json"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: kubernetes_residue
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "bash -e -c 'kubectl get deploy,daemonset,statefulset,pod,svc,pvc,pv -A -o name > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/k8s-resources.after-cleanup.txt 2> /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/k8s-resources.after-cleanup.err; kubectl get storageclass,csidriver -o name >> /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/k8s-resources.after-cleanup.txt 2>> /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/k8s-resources.after-cleanup.err; if grep -E \"(sw-block|seaweed-block|block\\.csi\\.seaweedfs\\.com)\" /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/k8s-resources.after-cleanup.txt > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/k8s-residue.after-cleanup.txt; then exit 1; fi'"
|
||||
|
||||
- name: hostpath_residue
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "if sudo test -d /var/lib/sw-block; then sudo find /var/lib/sw-block -maxdepth 1 -mindepth 1 -print > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/sw-block-hostpath.all.txt; sudo find /var/lib/sw-block -maxdepth 1 -mindepth 1 -type d -name 'testops-*' -print > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/sw-block-hostpath-testops-residue.txt; else : > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/sw-block-hostpath.all.txt; : > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/sw-block-hostpath-testops-residue.txt; fi; test ! -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/sw-block-hostpath-testops-residue.txt"
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/uninstall"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "kubectl delete storageclass sw-block sw-block-example sw-block-dynamic sw-block-dynamic-nvme --ignore-not-found=true > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue/delete-storageclasses.log 2>&1 || true"
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
unmount: "/tmp/sw-block-iscsi-os/mnt,/tmp/sw-block-iscsi-failover/mnt,/tmp/sw-block-iscsi-mpath/mnt,/tmp/sw-block-nvme-failover/mnt"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cleanup-residue"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,340 @@
|
||||
# Runner-native cluster operations inventory chain.
|
||||
#
|
||||
# Goal:
|
||||
# Prove that an operator can discover the live alpha Kubernetes volume from
|
||||
# the cluster itself, not from TestOps artifacts, and collect nested
|
||||
# per-replica status bundles through sw-block ops inventory.
|
||||
#
|
||||
# Expected invocation:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/cluster-ops-inventory-chain.yaml
|
||||
|
||||
name: cluster-ops-inventory-chain
|
||||
timeout: 22m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/pin_build /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/demo /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "pkill -f 'kubectl.*port-forward.*svc/blockmaste[r]' >/dev/null 2>&1 || true"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: preflight
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && bash scripts/preflight-k8s-alpha.sh --local-k3s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/preflight.txt 2>&1"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/preflight.txt"
|
||||
pattern: "summary status=PASS"
|
||||
save_as: preflight_count
|
||||
- action: assert_greater
|
||||
actual: "{{ preflight_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: pin_build_alpha_images
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.SW_BLOCK_IMPORT_K3S: "1"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/pin_build"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE_ID="
|
||||
save_as: sw_block_image_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sw_block_image_id_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_CSI_IMAGE_ID="
|
||||
save_as: sw_block_csi_image_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sw_block_csi_image_id_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: live_volume_boundary
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash -lc 'set -a; source /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/pin_build/alpha-images.env; set +a; set +e; SW_BLOCK_DEMO_STOP_AFTER=blockvolume-ready SW_BLOCK_DEMO_KEEP_ON_STOP=1 bash scripts/run-k8s-demo.sh {{ product_root }}; rc=$?; echo $rc > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/demo/controlled-stop.exit_code; test \"$rc\" -eq 42'"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/demo"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/demo/run.log"
|
||||
pattern: "\\[app-demo\\] controlled stop after blockvolume ready"
|
||||
save_as: controlled_stop_count
|
||||
- action: assert_greater
|
||||
actual: "{{ controlled_stop_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/demo/generated-blockvolume.yaml"
|
||||
pattern: "--status-addr="
|
||||
save_as: generated_status_addr_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generated_status_addr_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: second_volume_boundary
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cat > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/second-pvc.yaml <<'YAML'\napiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n name: sw-block-demo-pvc-2\n namespace: default\nspec:\n accessModes:\n - ReadWriteOnce\n storageClassName: sw-block-dynamic\n resources:\n requests:\n storage: 1Mi\nYAML\nkubectl apply -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/second-pvc.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/apply-second-pvc.log 2>&1\nkubectl -n default wait --for=jsonpath='{.status.phase}'=Bound pvc/sw-block-demo-pvc-2 --timeout=120s >> /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/apply-second-pvc.log 2>&1\nfor i in $(seq 1 120); do count=$(kubectl -n default get deploy -l app=sw-blockvolume --no-headers 2>/dev/null | wc -l); test \"$count\" -ge 2 && break; sleep 1; done\ncount=$(kubectl -n default get deploy -l app=sw-blockvolume --no-headers 2>/dev/null | wc -l); test \"$count\" -ge 2\nkubectl -n default wait --for=condition=available deploy -l app=sw-blockvolume --timeout=120s >> /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/apply-second-pvc.log 2>&1\nkubectl -n kube-system exec deploy/sw-blockmaster -c blockmaster -- sh -c 'cat /manifests/*.yaml' > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/second-volume-generated-blockvolume.yaml 2> /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/second-volume-generated-blockvolume.err\nkubectl -n default get deploy -l app=sw-blockvolume -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/product-owned-blockvolumes.after-second-pvc.txt"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/apply-second-pvc.log"
|
||||
pattern: "persistentvolumeclaim/sw-block-demo-pvc-2 created"
|
||||
save_as: second_pvc_created_count
|
||||
- action: assert_greater
|
||||
actual: "{{ second_pvc_created_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/product-owned-blockvolumes.after-second-pvc.txt"
|
||||
pattern: "^sw-blockvolume-"
|
||||
save_as: second_volume_ready_count
|
||||
- action: assert_greater
|
||||
actual: "{{ second_volume_ready_count }}"
|
||||
threshold: "1"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "test ! -e /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/second-volume/apply.log"
|
||||
|
||||
- name: inventory_live_cluster
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "cd {{ product_root }} && bash -c 'set -euo pipefail; OUT=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory; mkdir -p \"$OUT\"; pf_port=$(python3 - <<\"PY\"\nimport socket\ns=socket.socket(); s.bind((\"127.0.0.1\",0)); print(s.getsockname()[1]); s.close()\nPY\n); kubectl -n kube-system port-forward svc/blockmaster ${pf_port}:9333 > \"$OUT/blockmaster-port-forward.log\" 2>&1 & pf_pid=$!; echo \"$pf_pid\" > \"$OUT/blockmaster-port-forward.pid\"; cleanup(){ kill \"$pf_pid\" >/dev/null 2>&1 || true; wait \"$pf_pid\" >/dev/null 2>&1 || true; }; trap cleanup EXIT; for i in $(seq 1 30); do (echo >/dev/tcp/127.0.0.1/${pf_port}) >/dev/null 2>&1 && break; sleep 1; done; (echo >/dev/tcp/127.0.0.1/${pf_port}) >/dev/null 2>&1; go run ./cmd/sw-block ops inventory --namespace default --master 127.0.0.1:${pf_port} --out \"$OUT\" --timeout 30s > \"$OUT/stdout.txt\" 2> \"$OUT/stderr.txt\"; rc=$?; echo \"$rc\" > \"$OUT/exit_code.txt\"; find \"$OUT/volumes\" -name ops-status-bundle.json -exec cat {} \\; > \"$OUT/nested-ops-status-bundles.json\" 2>/dev/null || true; exit \"$rc\"'"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/exit_code.txt"
|
||||
pattern: "^0$"
|
||||
save_as: inventory_exit_zero_count
|
||||
- action: assert_greater
|
||||
actual: "{{ inventory_exit_zero_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: inventory_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "^inventory_status: \\(ok\\|unhealthy\\)$"
|
||||
save_as: inventory_status_count
|
||||
- action: assert_greater
|
||||
actual: "{{ inventory_status_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "^volumes: total=2 ok=[0-2] unhealthy=[0-2] invalid=0$"
|
||||
save_as: two_volume_count
|
||||
- action: assert_greater
|
||||
actual: "{{ two_volume_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "rf=1 desired=1 observed=1"
|
||||
save_as: two_observed_volume_count
|
||||
- action: assert_greater
|
||||
actual: "{{ two_observed_volume_count }}"
|
||||
threshold: "1"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "protocols=iscsi"
|
||||
save_as: two_iscsi_protocol_count
|
||||
- action: assert_greater
|
||||
actual: "{{ two_iscsi_protocol_count }}"
|
||||
threshold: "1"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "! grep -q 'generated_deployment_missing\\|observed_replicas=0 desired_replicas=1\\|replica_slot_missing' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "! grep -q 'replica_unhealthy' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "! grep -E 'replica: .*status=ok .*epoch=0 endpoint_version=0' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "! grep -q 'ops_status=unhealthy reason=authority_not_assigned epoch=' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "lifecycle_owner=pvc-owner-ref"
|
||||
save_as: lifecycle_owner_count
|
||||
- action: assert_greater
|
||||
actual: "{{ lifecycle_owner_count }}"
|
||||
threshold: "1"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "owner_ref=PersistentVolumeClaim/default/sw-block-demo-pvc"
|
||||
save_as: pvc_owner_ref_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pvc_owner_ref_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "owner_ref=PersistentVolumeClaim/default/sw-block-demo-pvc-2"
|
||||
save_as: second_pvc_owner_ref_count
|
||||
- action: assert_greater
|
||||
actual: "{{ second_pvc_owner_ref_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "pvc=sw-block-demo-pvc"
|
||||
save_as: pvc_identity_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pvc_identity_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "pvc=sw-block-demo-pvc-2"
|
||||
save_as: second_pvc_identity_count
|
||||
- action: assert_greater
|
||||
actual: "{{ second_pvc_identity_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory-summary.txt"
|
||||
pattern: "support_bundle=volumes/"
|
||||
save_as: replica_support_bundle_count
|
||||
- action: assert_greater
|
||||
actual: "{{ replica_support_bundle_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory.json"
|
||||
pattern: "\"pvc_name\": \"sw-block-demo-pvc\""
|
||||
save_as: json_pvc_count
|
||||
- action: assert_greater
|
||||
actual: "{{ json_pvc_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory.json"
|
||||
pattern: "\"pvc_name\": \"sw-block-demo-pvc-2\""
|
||||
save_as: json_second_pvc_count
|
||||
- action: assert_greater
|
||||
actual: "{{ json_second_pvc_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/volume-inventory.json"
|
||||
pattern: "\"status_address\": \"127.0.0.1:"
|
||||
save_as: json_status_addr_count
|
||||
- action: assert_greater
|
||||
actual: "{{ json_status_addr_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory/nested-ops-status-bundles.json"
|
||||
pattern: "\"command\": \"sw-block ops status\""
|
||||
save_as: nested_status_bundle_count
|
||||
- action: assert_greater
|
||||
actual: "{{ nested_status_bundle_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: scoped_delete_inventory
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "kubectl -n default delete pvc sw-block-demo-pvc-2 --wait=true --timeout=120s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/delete-second-pvc.log 2>&1\nfor i in $(seq 1 120); do if ! kubectl -n default get deploy -l app=sw-blockvolume -o jsonpath='{range .items[*]}{.metadata.ownerReferences[0].name}{\"\\n\"}{end}' 2>/dev/null | grep -q '^sw-block-demo-pvc-2$'; then break; fi; sleep 1; done\nif kubectl -n default get deploy -l app=sw-blockvolume -o jsonpath='{range .items[*]}{.metadata.ownerReferences[0].name}{\"\\n\"}{end}' 2>/dev/null | grep -q '^sw-block-demo-pvc-2$'; then echo 'second PVC-owned deployment still present after delete' >&2; exit 1; fi\nkubectl -n default get deploy -l app=sw-blockvolume -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/blockvolumes.after-delete-second-pvc.txt"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "cd {{ product_root }} && bash -c 'set -euo pipefail; OUT=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory-after-delete; mkdir -p \"$OUT\"; pf_port=$(python3 - <<\"PY\"\nimport socket\ns=socket.socket(); s.bind((\"127.0.0.1\",0)); print(s.getsockname()[1]); s.close()\nPY\n); kubectl -n kube-system port-forward svc/blockmaster ${pf_port}:9333 > \"$OUT/blockmaster-port-forward.log\" 2>&1 & pf_pid=$!; echo \"$pf_pid\" > \"$OUT/blockmaster-port-forward.pid\"; cleanup(){ kill \"$pf_pid\" >/dev/null 2>&1 || true; wait \"$pf_pid\" >/dev/null 2>&1 || true; }; trap cleanup EXIT; for i in $(seq 1 30); do (echo >/dev/tcp/127.0.0.1/${pf_port}) >/dev/null 2>&1 && break; sleep 1; done; (echo >/dev/tcp/127.0.0.1/${pf_port}) >/dev/null 2>&1; go run ./cmd/sw-block ops inventory --namespace default --master 127.0.0.1:${pf_port} --out \"$OUT\" --timeout 30s > \"$OUT/stdout.txt\" 2> \"$OUT/stderr.txt\"; rc=$?; echo \"$rc\" > \"$OUT/exit_code.txt\"; exit \"$rc\"'"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory-after-delete/volume-inventory-summary.txt"
|
||||
pattern: "^volumes: total=1 ok=[0-1] unhealthy=[0-1] invalid=0$"
|
||||
save_as: one_volume_after_delete_count
|
||||
- action: assert_greater
|
||||
actual: "{{ one_volume_after_delete_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory-after-delete/volume-inventory-summary.txt"
|
||||
pattern: "pvc=sw-block-demo-pvc"
|
||||
save_as: surviving_pvc_count
|
||||
- action: assert_greater
|
||||
actual: "{{ surviving_pvc_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "! grep -q 'pvc=sw-block-demo-pvc-2\\|owner_ref=PersistentVolumeClaim/default/sw-block-demo-pvc-2\\|generated_deployment_missing\\|orphan-blockvolume-deploy' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/inventory-after-delete/volume-inventory-summary.txt"
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "kubectl -n default delete pvc sw-block-demo-pvc-2 --ignore-not-found=true --wait=true --timeout=120s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/delete-second-pvc.log 2>&1 || true"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory/uninstall"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "pkill -f 'kubectl.*port-forward.*svc/blockmaste[r]' >/dev/null 2>&1 || true"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |[/]kubectl .*port-forward .*svc/blockmaste[r]|^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-cluster-inventory"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,94 @@
|
||||
# Runner-native CSI lifecycle component gate.
|
||||
#
|
||||
# Goal:
|
||||
# Run the fast CSI controller/node component tests that pin publish,
|
||||
# stage, unpublish, unstage, and reattach semantics without requiring a
|
||||
# privileged Linux initiator or Kubernetes workload.
|
||||
#
|
||||
# Expected invocation:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/csi-lifecycle-component-gate.yaml
|
||||
|
||||
name: csi-lifecycle-component-gate
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component/pin_build"
|
||||
|
||||
- name: pin_build
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && git rev-parse HEAD > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component/pin_build/git.sha && git status --porcelain > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component/pin_build/git.status && test ! -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component/pin_build/git.status"
|
||||
|
||||
- name: csi_component_tests
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash -o pipefail -c 'go test -count=1 -v ./core/csi | tee /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component/core-csi-go-test.log'"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component/core-csi-go-test.log"
|
||||
pattern: "--- PASS: TestG15e_CSIReattachUsesFreshPublishTargetAfterUnstage"
|
||||
save_as: reattach_component_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reattach_component_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component/core-csi-go-test.log"
|
||||
pattern: "--- PASS: TestNodeStage_FailsClosedOnStaleLoggedInSessionWithoutStagedIdentity"
|
||||
save_as: stale_session_component_count
|
||||
- action: assert_greater
|
||||
actual: "{{ stale_session_component_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component/core-csi-go-test.log"
|
||||
pattern: "--- PASS: TestNodeStageUnstage_RepeatedCyclesLeaveNoLocalState"
|
||||
save_as: repeated_cycle_component_count
|
||||
- action: assert_greater
|
||||
actual: "{{ repeated_cycle_component_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: final_asserts
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-lifecycle-component"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,278 @@
|
||||
# Runner-native RF=1 durable blockvolume restart chain.
|
||||
#
|
||||
# Goal:
|
||||
# clean target -> build/import alpha images -> run dynamic PVC with durable
|
||||
# generated blockvolume hostPath state -> restart generated blockvolume
|
||||
# Deployment -> verify replacement app pod reads pre-restart bytes -> collect.
|
||||
#
|
||||
# Expected invocation from sw-test-runner-standalone:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/csi-rf1-durable-restart-chain.yaml
|
||||
|
||||
name: csi-rf1-durable-restart-chain
|
||||
timeout: 18m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: pin_build_alpha_images
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.SW_BLOCK_IMPORT_K3S: "1"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/pin_build"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE_ID="
|
||||
save_as: pin_image_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pin_image_id_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: durable_blockvolume_restart
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-k8s-blockvolume-restart.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ALPHA_IMAGES_ENV: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/pin_build/alpha-images.env"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart"
|
||||
env.SW_BLOCK_LAUNCHER_STATE_HOSTPATH: "/var/lib/sw-block/testops-{{ run_id }}-csi-rf1-restart"
|
||||
env.SW_BLOCK_COLLECT_INVENTORY_AFTER_RESTART: "1"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/run.log"
|
||||
pattern: "\\[app-demo\\] PASS:"
|
||||
save_as: app_pass_count
|
||||
- action: assert_greater
|
||||
actual: "{{ app_pass_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/run.log"
|
||||
pattern: "restart_blockvolume_before_reader=1"
|
||||
save_as: restart_mode_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_mode_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/block-stack.rendered.yaml"
|
||||
pattern: "--launcher-status"
|
||||
save_as: launcher_status_count
|
||||
- action: assert_greater
|
||||
actual: "{{ launcher_status_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/block-stack.rendered.yaml"
|
||||
pattern: "--launcher-state-hostpath=/var/lib/sw-block/testops-{{ run_id }}-csi-rf1-restart"
|
||||
save_as: launcher_state_hostpath_count
|
||||
- action: assert_greater
|
||||
actual: "{{ launcher_state_hostpath_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/generated-blockvolume.yaml"
|
||||
pattern: "hostPath:"
|
||||
save_as: generated_hostpath_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generated_hostpath_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/generated-blockvolume.yaml"
|
||||
pattern: "type: DirectoryOrCreate"
|
||||
save_as: generated_hostpath_type_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generated_hostpath_type_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/generated-blockvolume.yaml"
|
||||
pattern: "--status-addr=127.0.0.1:"
|
||||
save_as: generated_status_addr_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generated_status_addr_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "awk 'BEGIN{in_volumes=0;in_state=0;bad=0} /^[[:space:]]*volumes:[[:space:]]*$/{in_volumes=1;next} in_volumes && /^[^[:space:]]/{in_volumes=0;in_state=0} in_volumes && /^[[:space:]]*-[[:space:]]*name:[[:space:]]*state[[:space:]]*$/{in_state=1;next} in_state && /^[[:space:]]*-[[:space:]]*name:[[:space:]]*/{in_state=0} in_state && /emptyDir:/{bad=1} END{exit bad}' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/generated-blockvolume.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/writer.log"
|
||||
pattern: "\\[app-writer\\] wrote and verified /data/demo.bin"
|
||||
save_as: writer_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "test -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/blockvolume-pod-ids.before-restart.tsv && test -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/blockvolume-pod-ids.after-restart.tsv && ! cmp -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/blockvolume-pod-ids.before-restart.tsv /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/blockvolume-pod-ids.after-restart.tsv"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "! grep -q 'iqn.2026-05.io.seaweedfs' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/iscsi-sessions.before-blockvolume-restart.txt"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/restart-blockvolume-status.log"
|
||||
pattern: "successfully rolled out"
|
||||
save_as: blockvolume_rollout_count
|
||||
- action: assert_greater
|
||||
actual: "{{ blockvolume_rollout_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/reader.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: reader_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/reader.describe.before-delete.txt"
|
||||
pattern: "Status: Succeeded"
|
||||
save_as: reader_succeeded_describe_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_succeeded_describe_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/status-durable-after-blockvolume-restart.json"
|
||||
pattern: "\"ReplicaID\"[[:space:]]*:[[:space:]]*\"r1\""
|
||||
save_as: durable_status_replica_count
|
||||
- action: assert_greater
|
||||
actual: "{{ durable_status_replica_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/status-durable-after-blockvolume-restart.json"
|
||||
pattern: "\"Epoch\"[[:space:]]*:[[:space:]]*[1-9][0-9]*"
|
||||
save_as: durable_status_epoch_count
|
||||
- action: assert_greater
|
||||
actual: "{{ durable_status_epoch_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/status-durable-after-blockvolume-restart.json"
|
||||
pattern: "\"Latched\"[[:space:]]*:[[:space:]]*true"
|
||||
save_as: durable_status_latched_count
|
||||
- action: assert_greater
|
||||
actual: "{{ durable_status_latched_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/status-durable-after-blockvolume-restart.json"
|
||||
pattern: "\"Operational\"[[:space:]]*:[[:space:]]*true"
|
||||
save_as: durable_status_operational_count
|
||||
- action: assert_greater
|
||||
actual: "{{ durable_status_operational_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/blockvolume-generated.after-restart.log"
|
||||
pattern: "\"phase\":\"iscsi-listening\""
|
||||
save_as: blockvolume_iscsi_listening_count
|
||||
- action: assert_greater
|
||||
actual: "{{ blockvolume_iscsi_listening_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/lifecycle-volumes.after-blockvolume-restart.json"
|
||||
pattern: "\"protocol\"[[:space:]]*:[[:space:]]*\"iscsi\""
|
||||
save_as: lifecycle_after_restart_protocol_count
|
||||
- action: assert_greater
|
||||
actual: "{{ lifecycle_after_restart_protocol_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/ops-inventory-after-restart/volume-inventory-summary.txt"
|
||||
pattern: "^volume: .*pvc=sw-block-demo-pvc .*protocols=iscsi"
|
||||
save_as: inventory_after_restart_volume_count
|
||||
- action: assert_greater
|
||||
actual: "{{ inventory_after_restart_volume_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/ops-inventory-after-restart/volume-inventory-summary.txt"
|
||||
pattern: "^replica: .*support_bundle=volumes/"
|
||||
save_as: inventory_after_restart_support_bundle_count
|
||||
- action: assert_greater
|
||||
actual: "{{ inventory_after_restart_support_bundle_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/ops-inventory-after-restart/volume-inventory-summary.txt"
|
||||
pattern: "lifecycle_owner=pvc-owner-ref owner_ref=PersistentVolumeClaim/default/sw-block-demo-pvc"
|
||||
save_as: inventory_after_restart_owner_ref_count
|
||||
- action: assert_greater
|
||||
actual: "{{ inventory_after_restart_owner_ref_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/ops-inventory-after-restart/nested-ops-status-bundles.json"
|
||||
pattern: "\"command\": \"sw-block ops status\""
|
||||
save_as: nested_ops_status_bundle_count
|
||||
- action: assert_greater
|
||||
actual: "{{ nested_ops_status_bundle_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "find /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain/durable_blockvolume_restart/ops-inventory-after-restart/volumes -name volume-status-summary.txt -exec grep -q '^durable_entry: .*latched=true .*operational=true' {} \\; -print | grep -q ."
|
||||
|
||||
- name: final_asserts
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "test ! -e /var/lib/sw-block/testops-{{ run_id }}-csi-rf1-restart"
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-chain"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,120 @@
|
||||
# Runner-native RF=1 durable restart component gate.
|
||||
#
|
||||
# Goal:
|
||||
# Pin the cheap contracts behind csi-rf1-durable-restart-chain without
|
||||
# launching k3s: restart wrapper shape, generated hostPath/status manifests,
|
||||
# master frontend status projection, and durable status endpoint lineage.
|
||||
# The full csi-rf1-durable-restart-chain remains the end-to-end proof for
|
||||
# pod restart, reattach timing, and mounted data continuity.
|
||||
#
|
||||
# Expected invocation:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/csi-rf1-durable-restart-component-gate.yaml
|
||||
|
||||
name: csi-rf1-durable-restart-component-gate
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/pin_build"
|
||||
|
||||
- name: pin_build
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && git rev-parse HEAD > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/pin_build/git.sha && git status --porcelain > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/pin_build/git.status && test ! -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/pin_build/git.status"
|
||||
|
||||
- name: restart_component_tests
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash -o pipefail -c 'go test -count=1 -json -run \"^(TestCSIRF1DurableRestartScripts_PinBlockvolumeRestartContract|TestG15d_K8sRenderer_CanUseHostPathStateVolume|TestG15d_K8sRenderer_DurableHostPathPreservesOwnerRefAndStatus|TestG15d_K8sRenderer_CanOptIntoBlockVolumeStatusEndpoint|TestStatusFrontendsForAssignedLine_ReturnsObservedFrontendFacts|TestStatusServer_DurableStatusEndpoint_EnabledAfterStart_ReturnsLineage)$\" ./internal/testops ./core/host/master ./core/host/volume ./core/launcher | tee /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/restart-component-go-test.jsonl'"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/restart-component-go-test.jsonl"
|
||||
pattern: "\"Action\":\"pass\".*\"Test\":\"TestCSIRF1DurableRestartScripts_PinBlockvolumeRestartContract\""
|
||||
save_as: restart_wrapper_shape_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_wrapper_shape_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/restart-component-go-test.jsonl"
|
||||
pattern: "\"Action\":\"pass\".*\"Test\":\"TestG15d_K8sRenderer_CanUseHostPathStateVolume\""
|
||||
save_as: hostpath_render_count
|
||||
- action: assert_greater
|
||||
actual: "{{ hostpath_render_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/restart-component-go-test.jsonl"
|
||||
pattern: "\"Action\":\"pass\".*\"Test\":\"TestG15d_K8sRenderer_DurableHostPathPreservesOwnerRefAndStatus\""
|
||||
save_as: hostpath_owner_ref_status_count
|
||||
- action: assert_greater
|
||||
actual: "{{ hostpath_owner_ref_status_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/restart-component-go-test.jsonl"
|
||||
pattern: "\"Action\":\"pass\".*\"Test\":\"TestG15d_K8sRenderer_CanOptIntoBlockVolumeStatusEndpoint\""
|
||||
save_as: status_render_count
|
||||
- action: assert_greater
|
||||
actual: "{{ status_render_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/restart-component-go-test.jsonl"
|
||||
pattern: "\"Action\":\"pass\".*\"Test\":\"TestStatusFrontendsForAssignedLine_ReturnsObservedFrontendFacts\""
|
||||
save_as: master_frontend_projection_count
|
||||
- action: assert_greater
|
||||
actual: "{{ master_frontend_projection_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component/restart-component-go-test.jsonl"
|
||||
pattern: "\"Action\":\"pass\".*\"Test\":\"TestStatusServer_DurableStatusEndpoint_EnabledAfterStart_ReturnsLineage\""
|
||||
save_as: durable_status_lineage_count
|
||||
- action: assert_greater
|
||||
actual: "{{ durable_status_lineage_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: final_asserts
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-component"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,140 @@
|
||||
# Runner-native RF=1 durable restart partial-state chain.
|
||||
#
|
||||
# Goal:
|
||||
# Prove that a controlled post-restart blockvolume outage produces an
|
||||
# actionable inventory bundle instead of a silent reader timeout.
|
||||
|
||||
name: csi-rf1-durable-restart-failure-chain
|
||||
timeout: 18m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/pin_build /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: pin_build_alpha_images
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.SW_BLOCK_IMPORT_K3S: "1"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/pin_build"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE_ID="
|
||||
save_as: pin_image_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pin_image_id_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: durable_hostpath_unwritable
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 12m
|
||||
cmd: "cd {{ product_root }} && bash -c 'set -a; source /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/pin_build/alpha-images.env; set +a; set +e; SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure SW_BLOCK_LAUNCHER_STATE_HOSTPATH=/proc/sw-block-testops-{{ run_id }} SW_BLOCK_COLLECT_INVENTORY_ON_FAILURE=1 bash scripts/run-k8s-blockvolume-restart.sh {{ product_root }}; rc=$?; echo $rc > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure/exit_code.txt; test \"$rc\" -ne 0'"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure/run.log"
|
||||
pattern: "launcher_state_hostpath=/proc/sw-block-testops-{{ run_id }}"
|
||||
save_as: bad_hostpath_count
|
||||
- action: assert_greater
|
||||
actual: "{{ bad_hostpath_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure/exit_code.txt"
|
||||
pattern: "^[1-9][0-9]*$"
|
||||
save_as: failed_exit_count
|
||||
- action: assert_greater
|
||||
actual: "{{ failed_exit_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: failure_bundle_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure/ops-inventory-on-failure/volume-inventory-summary.txt"
|
||||
pattern: "^inventory_status: unhealthy$"
|
||||
save_as: inventory_unhealthy_count
|
||||
- action: assert_greater
|
||||
actual: "{{ inventory_unhealthy_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure/ops-inventory-on-failure/volume-inventory-summary.txt"
|
||||
pattern: "pvc=sw-block-demo-pvc"
|
||||
save_as: pvc_row_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pvc_row_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure/ops-inventory-on-failure/volume-inventory-summary.txt"
|
||||
pattern: "generated_deployment_missing\\|observed_replicas=0 desired_replicas=1\\|replica_degraded=r1 status=unhealthy\\|ops_status=unhealthy"
|
||||
save_as: actionable_issue_count
|
||||
- action: assert_greater
|
||||
actual: "{{ actionable_issue_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure/ops-inventory-on-failure/ops-inventory-bundle.json"
|
||||
pattern: "\"command\": \"sw-block ops inventory\""
|
||||
save_as: inventory_bundle_count
|
||||
- action: assert_greater
|
||||
actual: "{{ inventory_bundle_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure/restart_failure/ops-inventory-on-failure/volume-inventory-summary.txt"
|
||||
pattern: "collection_error: ops_status:"
|
||||
save_as: collection_error_count
|
||||
- action: assert_greater
|
||||
actual: "{{ collection_error_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-csi-rf1-restart-failure"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,97 @@
|
||||
name: data-plane-address-capability-chain
|
||||
timeout: 10m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: run_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address bash scripts/run-phase121-data-plane-address-capability-gate.sh {{ product_root }}"
|
||||
|
||||
- name: assert_summary
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address/phase121-data-plane-address-capability-summary.txt"
|
||||
pattern: "^phase121_data_plane_address_capability_status=ok$"
|
||||
save_as: phase121_status_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase121_status_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address/phase121-data-plane-address-capability-summary.txt"
|
||||
pattern: "^management_ip_m01=192\\.168\\.1\\.181$"
|
||||
save_as: management_ip_recorded
|
||||
- action: assert_greater
|
||||
actual: "{{ management_ip_recorded }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address/phase121-data-plane-address-capability-summary.txt"
|
||||
pattern: "^publish_target_ip_m01=10\\.0\\.0\\.181$"
|
||||
save_as: data_plane_ip_recorded
|
||||
- action: assert_greater
|
||||
actual: "{{ data_plane_ip_recorded }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address/phase121-data-plane-address-capability-summary.txt"
|
||||
pattern: "^publish_target_network_class=100gbe_tcp$"
|
||||
save_as: network_class_recorded
|
||||
- action: assert_greater
|
||||
actual: "{{ network_class_recorded }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address/phase121-data-plane-address-capability-summary.txt"
|
||||
pattern: "^frontend_transport=tcp$"
|
||||
save_as: tcp_transport
|
||||
- action: assert_greater
|
||||
actual: "{{ tcp_transport }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address/phase121-data-plane-address-capability-summary.txt"
|
||||
pattern: "^nvme_rdma_supported=false$"
|
||||
save_as: rdma_not_supported
|
||||
- action: assert_greater
|
||||
actual: "{{ rdma_not_supported }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address/phase121-data-plane-address-capability-summary.txt"
|
||||
pattern: "^internal_ip_not_reused_as_performance_target=true$"
|
||||
save_as: internal_ip_not_reused
|
||||
- action: assert_greater
|
||||
actual: "{{ internal_ip_not_reused }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address/phase121-data-plane-address-capability-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: cleanup_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ cleanup_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase121-data-plane-address"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,115 @@
|
||||
# Runner-native Phase 79 gate: the failback executor can call the
|
||||
# authority-owned runtime adapter. Execution remains explicit-policy gated, and
|
||||
# stale expected-current evidence blocks the call-site without a false failback.
|
||||
|
||||
name: failback-authority-callsite-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_authority_callsite_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite bash scripts/run-phase79-failback-authority-callsite-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^phase79_failback_authority_callsite_status=ok$"
|
||||
save_as: phase79_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase79_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^authority_runtime_adapter_invoked_by_executor=true$"
|
||||
save_as: adapter_invoked
|
||||
- action: assert_greater
|
||||
actual: "{{ adapter_invoked }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^publisher_authority_line_advanced=true$"
|
||||
save_as: publisher_advanced
|
||||
- action: assert_greater
|
||||
actual: "{{ publisher_advanced }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^stale_expected_current_blocks_callsite=true$"
|
||||
save_as: stale_guard
|
||||
- action: assert_greater
|
||||
actual: "{{ stale_guard }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^execution_policy_still_required=true$"
|
||||
save_as: policy_gate
|
||||
- action: assert_greater
|
||||
actual: "{{ policy_gate }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^failed_back_status_written=true$"
|
||||
save_as: failed_back_status
|
||||
- action: assert_greater
|
||||
actual: "{{ failed_back_status }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^runtime_failure_no_false_failback=true$"
|
||||
save_as: no_false_failback
|
||||
- action: assert_greater
|
||||
actual: "{{ no_false_failback }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite/phase79-failback-authority-callsite-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase79-failback-authority-callsite"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,125 @@
|
||||
# Runner-native Phase 78 gate: failback has a first authority-owned runtime
|
||||
# seam. It mints authority reassignment through Publisher.apply only after
|
||||
# expected-current and terminal-evidence guards pass. Default behavior remains
|
||||
# disabled and non-mutating.
|
||||
|
||||
name: failback-authority-runtime-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_authority_runtime_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime bash scripts/run-phase78-failback-authority-runtime-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^phase78_failback_authority_runtime_status=ok$"
|
||||
save_as: phase78_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase78_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^authority_failback_reassign_minted=true$"
|
||||
save_as: reassign_minted
|
||||
- action: assert_greater
|
||||
actual: "{{ reassign_minted }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^stale_expected_current_rejected=true$"
|
||||
save_as: stale_guard
|
||||
- action: assert_greater
|
||||
actual: "{{ stale_guard }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^terminal_preconditions_required=true$"
|
||||
save_as: terminal_guard
|
||||
- action: assert_greater
|
||||
actual: "{{ terminal_guard }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^failback_target_endpoint_fields=true$"
|
||||
save_as: endpoint_fields
|
||||
- action: assert_greater
|
||||
actual: "{{ endpoint_fields }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^failback_target_expected_current_fields=true$"
|
||||
save_as: expected_current_fields
|
||||
- action: assert_greater
|
||||
actual: "{{ expected_current_fields }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^executable_failback_requires_authority_endpoint=true$"
|
||||
save_as: executable_requires_endpoint
|
||||
- action: assert_greater
|
||||
actual: "{{ executable_requires_endpoint }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^explicit_runtime_authority_mutation_allowed=true$"
|
||||
save_as: authority_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ authority_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime/phase78-failback-authority-runtime-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase78-failback-authority-runtime"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,106 @@
|
||||
# Runner-native Phase 83 gate: Helm chart wiring for the failback gRPC
|
||||
# runtime transport. The default chart remains non-mutating; explicit values
|
||||
# render the blockmaster RPC flag plus executor execution/gRPC flags.
|
||||
|
||||
name: failback-chart-runtime-chain
|
||||
timeout: 6m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_chart_runtime_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime bash scripts/run-phase83-failback-chart-runtime-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime/phase83-failback-chart-runtime-summary.txt"
|
||||
pattern: "^phase83_failback_chart_runtime_status=ok$"
|
||||
save_as: phase83_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase83_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime/phase83-failback-chart-runtime-summary.txt"
|
||||
pattern: "^default_omits_failback_runtime_rpc=true$"
|
||||
save_as: default_rpc_off
|
||||
- action: assert_greater
|
||||
actual: "{{ default_rpc_off }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime/phase83-failback-chart-runtime-summary.txt"
|
||||
pattern: "^enabled_renders_failback_runtime_rpc=true$"
|
||||
save_as: enabled_rpc
|
||||
- action: assert_greater
|
||||
actual: "{{ enabled_rpc }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime/phase83-failback-chart-runtime-summary.txt"
|
||||
pattern: "^enabled_renders_failback_grpc_addr=true$"
|
||||
save_as: enabled_grpc
|
||||
- action: assert_greater
|
||||
actual: "{{ enabled_grpc }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime/phase83-failback-chart-runtime-summary.txt"
|
||||
pattern: "^rejects_execution_with_dry_run=true$"
|
||||
save_as: rejects_dryrun
|
||||
- action: assert_greater
|
||||
actual: "{{ rejects_dryrun }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime/phase83-failback-chart-runtime-summary.txt"
|
||||
pattern: "^rejects_execution_without_policy=true$"
|
||||
save_as: rejects_policy
|
||||
- action: assert_greater
|
||||
actual: "{{ rejects_policy }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime/phase83-failback-chart-runtime-summary.txt"
|
||||
pattern: "^rejects_ambiguous_runtime_transports=true$"
|
||||
save_as: rejects_ambiguous
|
||||
- action: assert_greater
|
||||
actual: "{{ rejects_ambiguous }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime/phase83-failback-chart-runtime-summary.txt"
|
||||
pattern: "^chart_default_remains_non_mutating=true$"
|
||||
save_as: default_non_mutating
|
||||
- action: assert_greater
|
||||
actual: "{{ default_non_mutating }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase83-failback-chart-runtime"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,88 @@
|
||||
# Runner-native Phase 94 gate: full opt-in failback suite renders coherently and
|
||||
# the executor can call a real blockmaster FailbackService in local test.
|
||||
# This is not a live Kubernetes install claim.
|
||||
|
||||
name: failback-deployed-grpc-smoke-chain
|
||||
timeout: 6m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_deployed_grpc_smoke_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke bash scripts/run-phase94-failback-deployed-grpc-smoke-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke/phase94-failback-deployed-grpc-smoke-summary.txt"
|
||||
pattern: "^phase94_failback_deployed_grpc_smoke_status=ok$"
|
||||
save_as: phase94_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase94_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke/phase94-failback-deployed-grpc-smoke-summary.txt"
|
||||
pattern: "^enabled_renders_failback_runtime_rpc=true$"
|
||||
save_as: runtime_rpc
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_rpc }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke/phase94-failback-deployed-grpc-smoke-summary.txt"
|
||||
pattern: "^enabled_target_owner_activates_targets=true$"
|
||||
save_as: target_activation
|
||||
- action: assert_greater
|
||||
actual: "{{ target_activation }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke/phase94-failback-deployed-grpc-smoke-summary.txt"
|
||||
pattern: "^enabled_executor_grpc_runtime=true$"
|
||||
save_as: executor_grpc
|
||||
- action: assert_greater
|
||||
actual: "{{ executor_grpc }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke/phase94-failback-deployed-grpc-smoke-summary.txt"
|
||||
pattern: "^executor_grpc_uses_real_master_service=true$"
|
||||
save_as: real_master_grpc
|
||||
- action: assert_greater
|
||||
actual: "{{ real_master_grpc }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke/phase94-failback-deployed-grpc-smoke-summary.txt"
|
||||
pattern: "^live_kubernetes_install_claimed=false$"
|
||||
save_as: no_live_install_claim
|
||||
- action: assert_greater
|
||||
actual: "{{ no_live_install_claim }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase94-failback-deployed-grpc-smoke"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,106 @@
|
||||
# Runner-native Phase 88 gate: returned-replica failback can be packaged as a
|
||||
# deployable component suite. This is still a chart/RBAC gate, not a live
|
||||
# authority-mutation claim.
|
||||
|
||||
name: failback-deployed-suite-chain
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_deployed_suite_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite bash scripts/run-phase88-failback-deployed-suite-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite/phase88-failback-deployed-suite-summary.txt"
|
||||
pattern: "^phase88_failback_deployed_suite_status=ok$"
|
||||
save_as: phase88_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase88_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite/phase88-failback-deployed-suite-summary.txt"
|
||||
pattern: "^default_omits_failback_target_owner=true$"
|
||||
save_as: target_default_off
|
||||
- action: assert_greater
|
||||
actual: "{{ target_default_off }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite/phase88-failback-deployed-suite-summary.txt"
|
||||
pattern: "^enabled_renders_failback_target_owner=true$"
|
||||
save_as: target_owner_enabled
|
||||
- action: assert_greater
|
||||
actual: "{{ target_owner_enabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite/phase88-failback-deployed-suite-summary.txt"
|
||||
pattern: "^enabled_renders_failback_executor=true$"
|
||||
save_as: executor_enabled
|
||||
- action: assert_greater
|
||||
actual: "{{ executor_enabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite/phase88-failback-deployed-suite-summary.txt"
|
||||
pattern: "^values_schema_covers_failback_suite=true$"
|
||||
save_as: schema_covers_suite
|
||||
- action: assert_greater
|
||||
actual: "{{ schema_covers_suite }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite/phase88-failback-deployed-suite-summary.txt"
|
||||
pattern: "^target_owner_rbac_create_targets_only=true$"
|
||||
save_as: target_owner_rbac
|
||||
- action: assert_greater
|
||||
actual: "{{ target_owner_rbac }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite/phase88-failback-deployed-suite-summary.txt"
|
||||
pattern: "^executor_rbac_status_only=true$"
|
||||
save_as: executor_rbac
|
||||
- action: assert_greater
|
||||
actual: "{{ executor_rbac }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite/phase88-failback-deployed-suite-summary.txt"
|
||||
pattern: "^automatic_failback_claimed=false$"
|
||||
save_as: no_auto_claim
|
||||
- action: assert_greater
|
||||
actual: "{{ no_auto_claim }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase88-failback-deployed-suite"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,60 @@
|
||||
# Runner-native Phase 87 gate: docs agree that returned-replica failback
|
||||
# runtime is opt-in/source-gated and automatic deployed failback is not claimed.
|
||||
|
||||
name: failback-docs-alignment-chain
|
||||
timeout: 4m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_docs_alignment
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase87-failback-docs-alignment && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase87-failback-docs-alignment && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase87-failback-docs-alignment bash scripts/run-phase87-failback-docs-alignment-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase87-failback-docs-alignment/phase87-failback-docs-alignment-summary.txt"
|
||||
pattern: "^phase87_failback_docs_alignment_status=ok$"
|
||||
save_as: phase87_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase87_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase87-failback-docs-alignment/phase87-failback-docs-alignment-summary.txt"
|
||||
pattern: "^automatic_failback_not_claimed=true$"
|
||||
save_as: no_auto
|
||||
- action: assert_greater
|
||||
actual: "{{ no_auto }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase87-failback-docs-alignment/phase87-failback-docs-alignment-summary.txt"
|
||||
pattern: "^frontend_publication_after_failback_not_claimed=true$"
|
||||
save_as: no_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ no_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase87-failback-docs-alignment"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,115 @@
|
||||
# Runner-native Phase 76 gate: SwBlockReplicaFailback executor writes
|
||||
# disabled/blocked status only. It does not execute failback, advance authority,
|
||||
# swap publish targets, publish frontend paths, or mutate storage.
|
||||
|
||||
name: failback-executor-boundary-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_executor_boundary_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary bash scripts/run-phase76-failback-executor-boundary-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^phase76_failback_executor_boundary_status=ok$"
|
||||
save_as: phase76_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase76_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^failback_executor_writes_disabled_status=true$"
|
||||
save_as: writes_disabled
|
||||
- action: assert_greater
|
||||
actual: "{{ writes_disabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^failback_executor_dry_run_no_status_write=true$"
|
||||
save_as: dry_run_no_write
|
||||
- action: assert_greater
|
||||
actual: "{{ dry_run_no_write }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^kubernetes_writer_failback_status_subresource=true$"
|
||||
save_as: status_subresource
|
||||
- action: assert_greater
|
||||
actual: "{{ status_subresource }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^failback_executor_rbac_status_only=true$"
|
||||
save_as: rbac_status_only
|
||||
- action: assert_greater
|
||||
actual: "{{ rbac_status_only }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^failback_attempts=0$"
|
||||
save_as: no_failback_attempt
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_attempt }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^authority_mutation_allowed=false$"
|
||||
save_as: no_authority_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_authority_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary/phase76-failback-executor-boundary-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase76-failback-executor-boundary"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,115 @@
|
||||
# Runner-native Phase 82 gate: failback executor can use the blockmaster
|
||||
# FailbackService gRPC runtime transport, still behind explicit execution
|
||||
# policy. HTTP runtime remains supported; HTTP and gRPC are mutually exclusive.
|
||||
|
||||
name: failback-executor-grpc-runtime-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_executor_grpc_runtime_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime bash scripts/run-phase82-failback-executor-grpc-runtime-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^phase82_failback_executor_grpc_runtime_status=ok$"
|
||||
save_as: phase82_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase82_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^grpc_runtime_calls_failback_service=true$"
|
||||
save_as: grpc_calls_service
|
||||
- action: assert_greater
|
||||
actual: "{{ grpc_calls_service }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^cmd_grpc_runtime_writes_failed_back_status=true$"
|
||||
save_as: grpc_status
|
||||
- action: assert_greater
|
||||
actual: "{{ grpc_status }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^cmd_grpc_runtime_requires_enable=true$"
|
||||
save_as: requires_enable
|
||||
- action: assert_greater
|
||||
actual: "{{ requires_enable }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^cmd_rejects_ambiguous_runtime_transports=true$"
|
||||
save_as: ambiguous_rejected
|
||||
- action: assert_greater
|
||||
actual: "{{ ambiguous_rejected }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^cmd_http_runtime_still_supported=true$"
|
||||
save_as: http_still_supported
|
||||
- action: assert_greater
|
||||
actual: "{{ http_still_supported }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^execution_policy_still_required=true$"
|
||||
save_as: policy_gate
|
||||
- action: assert_greater
|
||||
actual: "{{ policy_gate }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime/phase82-failback-executor-grpc-runtime-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase82-failback-executor-grpc-runtime"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,97 @@
|
||||
# Runner-native Phase 85 gate: failback executor policy safety. Explicit
|
||||
# execution flags do not cause runtime calls unless a valid executable target
|
||||
# exists.
|
||||
|
||||
name: failback-executor-policy-safety-chain
|
||||
timeout: 6m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_executor_policy_safety
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety bash scripts/run-phase85-failback-executor-policy-safety-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety/phase85-failback-executor-policy-safety-summary.txt"
|
||||
pattern: "^phase85_failback_executor_policy_safety_status=ok$"
|
||||
save_as: phase85_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase85_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety/phase85-failback-executor-policy-safety-summary.txt"
|
||||
pattern: "^no_targets_no_runtime_call=true$"
|
||||
save_as: no_targets
|
||||
- action: assert_greater
|
||||
actual: "{{ no_targets }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety/phase85-failback-executor-policy-safety-summary.txt"
|
||||
pattern: "^invalid_target_no_runtime_call=true$"
|
||||
save_as: invalid_target
|
||||
- action: assert_greater
|
||||
actual: "{{ invalid_target }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety/phase85-failback-executor-policy-safety-summary.txt"
|
||||
pattern: "^execution_flags_alone_insufficient=true$"
|
||||
save_as: flags_insufficient
|
||||
- action: assert_greater
|
||||
actual: "{{ flags_insufficient }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety/phase85-failback-executor-policy-safety-summary.txt"
|
||||
pattern: "^runtime_requires_valid_target=true$"
|
||||
save_as: requires_valid
|
||||
- action: assert_greater
|
||||
actual: "{{ requires_valid }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety/phase85-failback-executor-policy-safety-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety/phase85-failback-executor-policy-safety-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase85-failback-executor-policy-safety"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,97 @@
|
||||
# Runner-native Phase 96 gate: terminal SwBlockReplicaFailback evidence creates
|
||||
# a disabled SwBlockFrontendPublication target. This is not a frontend
|
||||
# publication execution or data-path claim.
|
||||
|
||||
name: failback-frontend-publication-target-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_frontend_publication_target_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target bash scripts/run-phase96-failback-frontend-publication-target-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target/phase96-failback-frontend-publication-target-summary.txt"
|
||||
pattern: "^phase96_failback_frontend_publication_target_status=ok$"
|
||||
save_as: phase96_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase96_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target/phase96-failback-frontend-publication-target-summary.txt"
|
||||
pattern: "^terminal_failed_back_creates_frontend_publication_target=true$"
|
||||
save_as: target_created
|
||||
- action: assert_greater
|
||||
actual: "{{ target_created }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target/phase96-failback-frontend-publication-target-summary.txt"
|
||||
pattern: "^non_terminal_failback_rejected=true$"
|
||||
save_as: rejects_non_terminal
|
||||
- action: assert_greater
|
||||
actual: "{{ rejects_non_terminal }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target/phase96-failback-frontend-publication-target-summary.txt"
|
||||
pattern: "^executor_accepts_failback_target_as_disabled=true$"
|
||||
save_as: executor_disabled
|
||||
- action: assert_greater
|
||||
actual: "{{ executor_disabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target/phase96-failback-frontend-publication-target-summary.txt"
|
||||
pattern: "^frontend_publication_attempts=0$"
|
||||
save_as: no_publication_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_publication_attempts }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target/phase96-failback-frontend-publication-target-summary.txt"
|
||||
pattern: "^failback_attempts=0$"
|
||||
save_as: no_failback_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_attempts }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target/phase96-failback-frontend-publication-target-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase96-failback-frontend-publication-target"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,96 @@
|
||||
# Runner-native Phase 98 close gate: deployed failback, product-owned frontend
|
||||
# publication runtime confirmation, post-publication workload I/O, and cleanup.
|
||||
|
||||
name: failback-frontend-workload-close-chain
|
||||
timeout: 35m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_frontend_workload_close_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 34m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close bash scripts/run-phase98-failback-frontend-workload-close-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close/phase98-failback-frontend-workload-close-summary.txt"
|
||||
pattern: "^phase98_failback_frontend_workload_close_status=ok$"
|
||||
save_as: phase98_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase98_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close/phase98-failback-frontend-workload-close-summary.txt"
|
||||
pattern: "^executor_status_failed_back=true$"
|
||||
save_as: failback_done
|
||||
- action: assert_greater
|
||||
actual: "{{ failback_done }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close/phase98-failback-frontend-workload-close-summary.txt"
|
||||
pattern: "^frontend_published=true$"
|
||||
save_as: frontend_published
|
||||
- action: assert_greater
|
||||
actual: "{{ frontend_published }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close/phase98-failback-frontend-workload-close-summary.txt"
|
||||
pattern: "^frontend_publication_failback_started=false$"
|
||||
save_as: no_second_failback
|
||||
- action: assert_greater
|
||||
actual: "{{ no_second_failback }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close/phase98-failback-frontend-workload-close-summary.txt"
|
||||
pattern: "^post_failback_publication_writer_verified=true$"
|
||||
save_as: post_writer
|
||||
- action: assert_greater
|
||||
actual: "{{ post_writer }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close/phase98-failback-frontend-workload-close-summary.txt"
|
||||
pattern: "^post_failback_publication_reader_verified=true$"
|
||||
save_as: post_reader
|
||||
- action: assert_greater
|
||||
actual: "{{ post_reader }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close/phase98-failback-frontend-workload-close-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: cleanup_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ cleanup_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase98-failback-frontend-workload-close"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,87 @@
|
||||
# Runner-native Phase 86 gate: an explicit gRPC failback runtime address is
|
||||
# sufficient; the target does not need the legacy HTTP runtimeEndpoint field.
|
||||
|
||||
name: failback-grpc-runtime-endpoint-decoupling-chain
|
||||
timeout: 6m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_grpc_runtime_endpoint_decoupling
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling bash scripts/run-phase86-failback-grpc-runtime-endpoint-decoupling-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling/phase86-failback-grpc-runtime-endpoint-decoupling-summary.txt"
|
||||
pattern: "^phase86_failback_grpc_runtime_endpoint_decoupling_status=ok$"
|
||||
save_as: phase86_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase86_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling/phase86-failback-grpc-runtime-endpoint-decoupling-summary.txt"
|
||||
pattern: "^grpc_runtime_does_not_require_target_runtime_endpoint=true$"
|
||||
save_as: grpc_no_endpoint
|
||||
- action: assert_greater
|
||||
actual: "{{ grpc_no_endpoint }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling/phase86-failback-grpc-runtime-endpoint-decoupling-summary.txt"
|
||||
pattern: "^legacy_http_runtime_endpoint_still_supported=true$"
|
||||
save_as: http_supported
|
||||
- action: assert_greater
|
||||
actual: "{{ http_supported }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling/phase86-failback-grpc-runtime-endpoint-decoupling-summary.txt"
|
||||
pattern: "^real_master_grpc_service_without_target_endpoint=true$"
|
||||
save_as: real_master
|
||||
- action: assert_greater
|
||||
actual: "{{ real_master }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling/phase86-failback-grpc-runtime-endpoint-decoupling-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling/phase86-failback-grpc-runtime-endpoint-decoupling-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase86-failback-grpc-runtime-endpoint-decoupling"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,79 @@
|
||||
# Runner-native Phase 93 gate: multi-volume target-owner -> executor handoff
|
||||
# isolation. Runtime requests must not mix expected-current authority or target
|
||||
# addresses across volumes.
|
||||
|
||||
name: failback-handoff-isolation-chain
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_handoff_isolation_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation bash scripts/run-phase93-failback-handoff-isolation-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation/phase93-failback-handoff-isolation-summary.txt"
|
||||
pattern: "^phase93_failback_handoff_isolation_status=ok$"
|
||||
save_as: phase93_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase93_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation/phase93-failback-handoff-isolation-summary.txt"
|
||||
pattern: "^multi_volume_target_create_count=2$"
|
||||
save_as: target_count
|
||||
- action: assert_greater
|
||||
actual: "{{ target_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation/phase93-failback-handoff-isolation-summary.txt"
|
||||
pattern: "^multi_volume_runtime_request_count=2$"
|
||||
save_as: request_count
|
||||
- action: assert_greater
|
||||
actual: "{{ request_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation/phase93-failback-handoff-isolation-summary.txt"
|
||||
pattern: "^cross_volume_expected_current_mixup=false$"
|
||||
save_as: no_expected_current_mixup
|
||||
- action: assert_greater
|
||||
actual: "{{ no_expected_current_mixup }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation/phase93-failback-handoff-isolation-summary.txt"
|
||||
pattern: "^cross_volume_target_addr_mixup=false$"
|
||||
save_as: no_target_addr_mixup
|
||||
- action: assert_greater
|
||||
actual: "{{ no_target_addr_mixup }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase93-failback-handoff-isolation"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,96 @@
|
||||
# Runner-native Phase 84 gate: local integrated smoke for failback executor ->
|
||||
# gRPC runtime -> real blockmaster FailbackService -> master Publisher.
|
||||
|
||||
name: failback-integrated-grpc-smoke-chain
|
||||
timeout: 6m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_integrated_grpc_smoke
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc bash scripts/run-phase84-failback-integrated-grpc-smoke.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc/phase84-failback-integrated-grpc-summary.txt"
|
||||
pattern: "^phase84_failback_integrated_grpc_status=ok$"
|
||||
save_as: phase84_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase84_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc/phase84-failback-integrated-grpc-summary.txt"
|
||||
pattern: "^service_default_disabled_test=true$"
|
||||
save_as: default_disabled
|
||||
- action: assert_greater
|
||||
actual: "{{ default_disabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc/phase84-failback-integrated-grpc-summary.txt"
|
||||
pattern: "^executor_grpc_uses_real_master_service=true$"
|
||||
save_as: integrated
|
||||
- action: assert_greater
|
||||
actual: "{{ integrated }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc/phase84-failback-integrated-grpc-summary.txt"
|
||||
pattern: "^master_publisher_epoch_advanced=true$"
|
||||
save_as: epoch_advanced
|
||||
- action: assert_greater
|
||||
actual: "{{ epoch_advanced }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc/phase84-failback-integrated-grpc-summary.txt"
|
||||
pattern: "^publish_target_swapped_after_failback=true$"
|
||||
save_as: target_swapped
|
||||
- action: assert_greater
|
||||
actual: "{{ target_swapped }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc/phase84-failback-integrated-grpc-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc/phase84-failback-integrated-grpc-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase84-failback-integrated-grpc"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,124 @@
|
||||
# Runner-native Phase 95 gate: install the failback target-owner/executor
|
||||
# suite in k3s and drive one real blockmaster gRPC failback authority call
|
||||
# from an in-cluster executor. This is not a frontend publication claim.
|
||||
|
||||
name: failback-live-deployed-suite-chain
|
||||
timeout: 35m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_live_deployed_suite_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 34m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite bash scripts/run-phase95-failback-live-deployed-suite-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^phase95_failback_live_deployed_suite_status=ok$"
|
||||
save_as: phase95_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase95_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^helm_install=pass$"
|
||||
save_as: helm_install_pass
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_install_pass }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^first_volume_writer_reader=pass$"
|
||||
save_as: first_volume_pass
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_pass }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^failback_target_created=true$"
|
||||
save_as: target_created
|
||||
- action: assert_greater
|
||||
actual: "{{ target_created }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^failback_executor_completed=true$"
|
||||
save_as: executor_completed
|
||||
- action: assert_greater
|
||||
actual: "{{ executor_completed }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^executor_status_failed_back=true$"
|
||||
save_as: failed_back
|
||||
- action: assert_greater
|
||||
actual: "{{ failed_back }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^master_publisher_epoch_advanced=true$"
|
||||
save_as: epoch_advanced
|
||||
- action: assert_greater
|
||||
actual: "{{ epoch_advanced }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^publish_target_swapped_after_failback=true$"
|
||||
save_as: target_swapped
|
||||
- action: assert_greater
|
||||
actual: "{{ target_swapped }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^frontend_publication_after_failback_claimed=false$"
|
||||
save_as: no_frontend_claim
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_claim }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite/phase95-failback-live-deployed-suite-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: cleanup_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ cleanup_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase95-failback-live-deployed-suite"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,106 @@
|
||||
# Runner-native Phase 77 gate: failback has a typed runtime contract and
|
||||
# explicit execution-policy gate. Default reconciliation remains disabled; a
|
||||
# fake runtime can report terminal evidence only in tests.
|
||||
|
||||
name: failback-runtime-contract-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_runtime_contract_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract bash scripts/run-phase77-failback-runtime-contract-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract/phase77-failback-runtime-contract-summary.txt"
|
||||
pattern: "^phase77_failback_runtime_contract_status=ok$"
|
||||
save_as: phase77_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase77_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract/phase77-failback-runtime-contract-summary.txt"
|
||||
pattern: "^failback_execution_policy_gate=true$"
|
||||
save_as: policy_gate
|
||||
- action: assert_greater
|
||||
actual: "{{ policy_gate }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract/phase77-failback-runtime-contract-summary.txt"
|
||||
pattern: "^failback_runtime_invoked_only_when_enabled=true$"
|
||||
save_as: runtime_gated
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_gated }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract/phase77-failback-runtime-contract-summary.txt"
|
||||
pattern: "^runtime_failure_no_false_failback=true$"
|
||||
save_as: failure_no_false
|
||||
- action: assert_greater
|
||||
actual: "{{ failure_no_false }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract/phase77-failback-runtime-contract-summary.txt"
|
||||
pattern: "^runtime_invalid_terminal_evidence_no_false_failback=true$"
|
||||
save_as: invalid_no_false
|
||||
- action: assert_greater
|
||||
actual: "{{ invalid_no_false }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract/phase77-failback-runtime-contract-summary.txt"
|
||||
pattern: "^http_runtime_contract_posts_request=true$"
|
||||
save_as: http_contract
|
||||
- action: assert_greater
|
||||
actual: "{{ http_contract }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract/phase77-failback-runtime-contract-summary.txt"
|
||||
pattern: "^target_writer_serializes_runtime_fields=true$"
|
||||
save_as: writer_contract
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_contract }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract/phase77-failback-runtime-contract-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase77-failback-runtime-contract"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,115 @@
|
||||
# Runner-native Phase 81 gate: blockmaster has a FailbackService RPC that is
|
||||
# registered but disabled by default. Enabling it is explicit and still requires
|
||||
# expected-current + terminal evidence.
|
||||
|
||||
name: failback-service-rpc-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_service_rpc_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc bash scripts/run-phase81-failback-service-rpc-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^phase81_failback_service_rpc_status=ok$"
|
||||
save_as: phase81_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase81_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^failback_service_default_disabled=true$"
|
||||
save_as: default_disabled
|
||||
- action: assert_greater
|
||||
actual: "{{ default_disabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^failback_runtime_rpc_flag_default_false=true$"
|
||||
save_as: flag_default_false
|
||||
- action: assert_greater
|
||||
actual: "{{ flag_default_false }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^failback_runtime_rpc_flag_opt_in=true$"
|
||||
save_as: flag_opt_in
|
||||
- action: assert_greater
|
||||
actual: "{{ flag_opt_in }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^failback_service_registered=true$"
|
||||
save_as: service_registered
|
||||
- action: assert_greater
|
||||
actual: "{{ service_registered }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^enabled_failback_service_advances_publisher=true$"
|
||||
save_as: enabled_advances
|
||||
- action: assert_greater
|
||||
actual: "{{ enabled_advances }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^public_rpc_enabled_by_default=false$"
|
||||
save_as: public_rpc_default_off
|
||||
- action: assert_greater
|
||||
actual: "{{ public_rpc_default_off }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc/phase81-failback-service-rpc-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase81-failback-service-rpc"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,88 @@
|
||||
# Runner-native Phase 91 gate: failback target activation is explicit,
|
||||
# default-off, and requires both policy and runtime endpoint. The target owner
|
||||
# may stamp enabled targets, but it does not call the runtime.
|
||||
|
||||
name: failback-target-activation-policy-chain
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_target_activation_policy_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy bash scripts/run-phase91-failback-target-activation-policy-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy/phase91-failback-target-activation-policy-summary.txt"
|
||||
pattern: "^phase91_failback_target_activation_policy_status=ok$"
|
||||
save_as: phase91_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase91_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy/phase91-failback-target-activation-policy-summary.txt"
|
||||
pattern: "^activation_default_off=true$"
|
||||
save_as: activation_default_off
|
||||
- action: assert_greater
|
||||
actual: "{{ activation_default_off }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy/phase91-failback-target-activation-policy-summary.txt"
|
||||
pattern: "^activation_policy_required=true$"
|
||||
save_as: policy_required
|
||||
- action: assert_greater
|
||||
actual: "{{ policy_required }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy/phase91-failback-target-activation-policy-summary.txt"
|
||||
pattern: "^activation_runtime_endpoint_required=true$"
|
||||
save_as: runtime_required
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_required }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy/phase91-failback-target-activation-policy-summary.txt"
|
||||
pattern: "^activated_target_failback_decision=enabled$"
|
||||
save_as: target_enabled
|
||||
- action: assert_greater
|
||||
actual: "{{ target_enabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy/phase91-failback-target-activation-policy-summary.txt"
|
||||
pattern: "^failback_runtime_call_attempted=false$"
|
||||
save_as: no_runtime_call
|
||||
- action: assert_greater
|
||||
actual: "{{ no_runtime_call }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase91-failback-target-activation-policy"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,88 @@
|
||||
# Runner-native Phase 90 gate: failback target owner consumes current
|
||||
# SwBlockVolume.status authority facts before creating a failback target.
|
||||
# This does not execute failback or publish a frontend.
|
||||
|
||||
name: failback-target-authority-chain
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_target_authority_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority bash scripts/run-phase90-failback-target-authority-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority/phase90-failback-target-authority-summary.txt"
|
||||
pattern: "^phase90_failback_target_authority_status=ok$"
|
||||
save_as: phase90_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase90_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority/phase90-failback-target-authority-summary.txt"
|
||||
pattern: "^expected_current_replica_from_swblockvolume_status=true$"
|
||||
save_as: expected_replica_from_status
|
||||
- action: assert_greater
|
||||
actual: "{{ expected_replica_from_status }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority/phase90-failback-target-authority-summary.txt"
|
||||
pattern: "^expected_current_epoch_from_swblockvolume_status=true$"
|
||||
save_as: expected_epoch_from_status
|
||||
- action: assert_greater
|
||||
actual: "{{ expected_epoch_from_status }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority/phase90-failback-target-authority-summary.txt"
|
||||
pattern: "^missing_current_authority_target_create_count=0$"
|
||||
save_as: missing_authority_no_target
|
||||
- action: assert_greater
|
||||
actual: "{{ missing_authority_no_target }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority/phase90-failback-target-authority-summary.txt"
|
||||
pattern: "^created_target_failback_decision=disabled$"
|
||||
save_as: target_disabled
|
||||
- action: assert_greater
|
||||
actual: "{{ target_disabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority/phase90-failback-target-authority-summary.txt"
|
||||
pattern: "^failback_runtime_call_attempted=false$"
|
||||
save_as: no_runtime_call
|
||||
- action: assert_greater
|
||||
actual: "{{ no_runtime_call }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase90-failback-target-authority"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,88 @@
|
||||
# Runner-native Phase 92 gate: target owner creates an enabled failback target,
|
||||
# executor consumes it through a fake/local runtime, and expected-current
|
||||
# authority facts reach the runtime request.
|
||||
|
||||
name: failback-target-executor-handoff-chain
|
||||
timeout: 5m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_target_executor_handoff_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff bash scripts/run-phase92-failback-target-executor-handoff-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff/phase92-failback-target-executor-handoff-summary.txt"
|
||||
pattern: "^phase92_failback_target_executor_handoff_status=ok$"
|
||||
save_as: phase92_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase92_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff/phase92-failback-target-executor-handoff-summary.txt"
|
||||
pattern: "^target_owner_created_enabled_target=true$"
|
||||
save_as: owner_created
|
||||
- action: assert_greater
|
||||
actual: "{{ owner_created }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff/phase92-failback-target-executor-handoff-summary.txt"
|
||||
pattern: "^executor_consumed_target=true$"
|
||||
save_as: executor_consumed
|
||||
- action: assert_greater
|
||||
actual: "{{ executor_consumed }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff/phase92-failback-target-executor-handoff-summary.txt"
|
||||
pattern: "^runtime_request_expected_current_replica=r2$"
|
||||
save_as: expected_replica
|
||||
- action: assert_greater
|
||||
actual: "{{ expected_replica }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff/phase92-failback-target-executor-handoff-summary.txt"
|
||||
pattern: "^runtime_request_expected_current_epoch=7$"
|
||||
save_as: expected_epoch
|
||||
- action: assert_greater
|
||||
actual: "{{ expected_epoch }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff/phase92-failback-target-executor-handoff-summary.txt"
|
||||
pattern: "^frontend_publication_after_failback_claimed=false$"
|
||||
save_as: no_frontend_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase92-failback-target-executor-handoff"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,116 @@
|
||||
# Runner-native Phase 75 gate: returned-replica failback can create a
|
||||
# failback target handoff CR only after terminal evidence is present. The owner
|
||||
# remains disabled by default, dry-run by default, and has no status/finalizer,
|
||||
# storage, authority, or frontend publication mutation power.
|
||||
|
||||
name: failback-target-owner-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: failback_target_owner_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner bash scripts/run-phase75-failback-target-owner-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^phase75_failback_target_owner_status=ok$"
|
||||
save_as: phase75_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase75_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^failback_target_owner_creates_target=true$"
|
||||
save_as: creates_target
|
||||
- action: assert_greater
|
||||
actual: "{{ creates_target }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^failback_target_owner_dry_run_no_create=true$"
|
||||
save_as: dry_run_no_create
|
||||
- action: assert_greater
|
||||
actual: "{{ dry_run_no_create }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^failback_target_owner_requires_terminal_evidence=true$"
|
||||
save_as: terminal_evidence_required
|
||||
- action: assert_greater
|
||||
actual: "{{ terminal_evidence_required }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^failback_target_crd_schema=true$"
|
||||
save_as: target_crd_schema
|
||||
- action: assert_greater
|
||||
actual: "{{ target_crd_schema }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^failback_target_owner_chart_boundary=true$"
|
||||
save_as: chart_boundary
|
||||
- action: assert_greater
|
||||
actual: "{{ chart_boundary }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^failback_attempts=0$"
|
||||
save_as: no_failback_attempt
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_attempt }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner/phase75-failback-target-owner-summary.txt"
|
||||
pattern: "^frontend_publication_allowed=false$"
|
||||
save_as: no_frontend_publication
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_publication }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase75-failback-target-owner"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,96 @@
|
||||
# Runner-native Phase 73 gate: returned-replica frontend publication requires
|
||||
# a real authority/failback owner and must not be faked by runtime status.
|
||||
|
||||
name: frontend-publication-authority-owner-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: frontend_publication_authority_owner_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner bash scripts/run-phase73-frontend-publication-authority-owner-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner/phase73-frontend-publication-authority-owner-summary.txt"
|
||||
pattern: "^phase73_frontend_publication_authority_owner_status=ok$"
|
||||
save_as: phase73_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase73_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner/phase73-frontend-publication-authority-owner-summary.txt"
|
||||
pattern: "^frontend_publication_requires_authority_owner=true$"
|
||||
save_as: authority_owner_required
|
||||
- action: assert_greater
|
||||
actual: "{{ authority_owner_required }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner/phase73-frontend-publication-authority-owner-summary.txt"
|
||||
pattern: "^returned_replica_runtime_invocations=0$"
|
||||
save_as: no_returned_runtime
|
||||
- action: assert_greater
|
||||
actual: "{{ no_returned_runtime }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner/phase73-frontend-publication-authority-owner-summary.txt"
|
||||
pattern: "^returned_replica_frontend_published=false$"
|
||||
save_as: no_false_publish
|
||||
- action: assert_greater
|
||||
actual: "{{ no_false_publish }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner/phase73-frontend-publication-authority-owner-summary.txt"
|
||||
pattern: "^generic_runtime_seam_preserved=true$"
|
||||
save_as: generic_seam_preserved
|
||||
- action: assert_greater
|
||||
actual: "{{ generic_seam_preserved }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner/phase73-frontend-publication-authority-owner-summary.txt"
|
||||
pattern: "^frontend_publication_attempts=0$"
|
||||
save_as: no_publication_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_publication_attempts }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner/phase73-frontend-publication-authority-owner-summary.txt"
|
||||
pattern: "^failback_attempts=0$"
|
||||
save_as: no_failback_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_attempts }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase73-frontend-publication-authority-owner"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,96 @@
|
||||
# Runner-native Phase 70 gate: frontend publication executor status boundary.
|
||||
|
||||
name: frontend-publication-executor-boundary-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: frontend_publication_executor_boundary_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary bash scripts/run-phase70-frontend-publication-executor-boundary-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary/phase70-frontend-publication-executor-boundary-summary.txt"
|
||||
pattern: "^phase70_frontend_publication_executor_boundary_status=ok$"
|
||||
save_as: phase70_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase70_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary/phase70-frontend-publication-executor-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_executor_status_writes=true$"
|
||||
save_as: status_writes
|
||||
- action: assert_greater
|
||||
actual: "{{ status_writes }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary/phase70-frontend-publication-executor-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_executor_status=blocked$"
|
||||
save_as: status_blocked
|
||||
- action: assert_greater
|
||||
actual: "{{ status_blocked }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary/phase70-frontend-publication-executor-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_executor_reason=frontend_publication_policy_disabled$"
|
||||
save_as: reason_disabled
|
||||
- action: assert_greater
|
||||
actual: "{{ reason_disabled }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary/phase70-frontend-publication-executor-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_attempts=0$"
|
||||
save_as: no_frontend_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_attempts }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary/phase70-frontend-publication-executor-boundary-summary.txt"
|
||||
pattern: "^frontend_published=false$"
|
||||
save_as: no_frontend_published
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_published }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary/phase70-frontend-publication-executor-boundary-summary.txt"
|
||||
pattern: "^failback_started=false$"
|
||||
save_as: no_failback_started
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_started }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary/phase70-frontend-publication-executor-boundary-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase70-frontend-publication-executor-boundary"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,97 @@
|
||||
# Runner-native Phase 97 gate: explicit-policy frontend publication executor
|
||||
# call-site after terminal failback evidence. This proves executor/runtime
|
||||
# handoff only; workload-visible I/O remains a later gate.
|
||||
|
||||
name: frontend-publication-executor-callsite-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: frontend_publication_executor_callsite_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite bash scripts/run-phase97-frontend-publication-executor-callsite-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite/phase97-frontend-publication-executor-callsite-summary.txt"
|
||||
pattern: "^phase97_frontend_publication_executor_callsite_status=ok$"
|
||||
save_as: phase97_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase97_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite/phase97-frontend-publication-executor-callsite-summary.txt"
|
||||
pattern: "^failback_target_runtime_invoked=true$"
|
||||
save_as: runtime_invoked
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_invoked }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite/phase97-frontend-publication-executor-callsite-summary.txt"
|
||||
pattern: "^frontend_publication_attempts=1$"
|
||||
save_as: publication_attempt
|
||||
- action: assert_greater
|
||||
actual: "{{ publication_attempt }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite/phase97-frontend-publication-executor-callsite-summary.txt"
|
||||
pattern: "^frontend_published=true$"
|
||||
save_as: frontend_published
|
||||
- action: assert_greater
|
||||
actual: "{{ frontend_published }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite/phase97-frontend-publication-executor-callsite-summary.txt"
|
||||
pattern: "^failback_attempts=0$"
|
||||
save_as: no_failback_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_attempts }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite/phase97-frontend-publication-executor-callsite-summary.txt"
|
||||
pattern: "^failback_started=false$"
|
||||
save_as: no_failback_started
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_started }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite/phase97-frontend-publication-executor-callsite-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase97-frontend-publication-executor-callsite"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,167 @@
|
||||
# Runner-native Phase 71 gate: frontend publication executor live API boundary.
|
||||
|
||||
name: frontend-publication-live-api-boundary-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: frontend_publication_live_api_boundary_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary bash scripts/run-phase71-frontend-publication-live-api-boundary-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^phase71_frontend_publication_live_api_boundary_status=ok$"
|
||||
save_as: phase71_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase71_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^executor_status_patch_succeeded=true$"
|
||||
save_as: status_patch
|
||||
- action: assert_greater
|
||||
actual: "{{ status_patch }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_executor_status_writes=true$"
|
||||
save_as: status_writes
|
||||
- action: assert_greater
|
||||
actual: "{{ status_writes }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_executor_status=blocked$"
|
||||
save_as: status_blocked
|
||||
- action: assert_greater
|
||||
actual: "{{ status_blocked }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_executor_reason=frontend_publication_policy_disabled$"
|
||||
save_as: reason_disabled
|
||||
- action: assert_greater
|
||||
actual: "{{ reason_disabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_executor_status_mutation_allowed=true$"
|
||||
save_as: status_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ status_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_mutation_allowed=false$"
|
||||
save_as: frontend_mutation_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ frontend_mutation_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^frontend_published=false$"
|
||||
save_as: no_frontend_published
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_published }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^failback_started=false$"
|
||||
save_as: no_failback_started
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_started }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^frontend_publication_executor_rbac_status_only=true$"
|
||||
save_as: rbac_status_only
|
||||
- action: assert_greater
|
||||
actual: "{{ rbac_status_only }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^executor_spec_patch_allowed=false$"
|
||||
save_as: spec_patch_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ spec_patch_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^executor_label_patch_allowed=false$"
|
||||
save_as: label_patch_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ label_patch_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^executor_finalizers_endpoint_allowed=false$"
|
||||
save_as: finalizers_denied
|
||||
- action: assert_greater
|
||||
actual: "{{ finalizers_denied }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary/phase71-frontend-publication-live-api-boundary-summary.txt"
|
||||
pattern: "^target_object_integrity_preserved=true$"
|
||||
save_as: integrity_preserved
|
||||
- action: assert_greater
|
||||
actual: "{{ integrity_preserved }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase71-frontend-publication-live-api-boundary"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,72 @@
|
||||
# Runner-native Phase 68 gate: ACK eligibility to frontend publication preflight.
|
||||
|
||||
name: frontend-publication-preflight-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: frontend_publication_preflight_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight bash scripts/run-phase68-frontend-publication-preflight-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight/phase68-frontend-publication-preflight-summary.txt"
|
||||
pattern: "^phase68_frontend_publication_preflight_status=ok$"
|
||||
save_as: phase68_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase68_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight/phase68-frontend-publication-preflight-summary.txt"
|
||||
pattern: "^frontend_publication_decision_schema_locked=true$"
|
||||
save_as: schema_locked
|
||||
- action: assert_greater
|
||||
actual: "{{ schema_locked }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight/phase68-frontend-publication-preflight-summary.txt"
|
||||
pattern: "^frontend_publication_decision=disabled$"
|
||||
save_as: decision_disabled
|
||||
- action: assert_greater
|
||||
actual: "{{ decision_disabled }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight/phase68-frontend-publication-preflight-summary.txt"
|
||||
pattern: "^frontend_publication_mutation_allowed=false$"
|
||||
save_as: mutation_false
|
||||
- action: assert_greater
|
||||
actual: "{{ mutation_false }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight/phase68-frontend-publication-preflight-summary.txt"
|
||||
pattern: "^frontend_publication_attempts=0$"
|
||||
save_as: no_frontend_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_attempts }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase68-frontend-publication-preflight"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,131 @@
|
||||
# Runner-native Phase 72 gate: frontend publication runtime contract.
|
||||
|
||||
name: frontend-publication-runtime-contract-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: frontend_publication_runtime_contract_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract bash scripts/run-phase72-frontend-publication-runtime-contract-gate.sh {{ product_root }}"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^phase72_frontend_publication_runtime_contract_status=ok$"
|
||||
save_as: phase72_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase72_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^frontend_publication_runtime_contract_schema_locked=true$"
|
||||
save_as: schema_locked
|
||||
- action: assert_greater
|
||||
actual: "{{ schema_locked }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^frontend_publication_runtime_endpoint_field=true$"
|
||||
save_as: endpoint_field
|
||||
- action: assert_greater
|
||||
actual: "{{ endpoint_field }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^frontend_publication_execution_policy_gate=true$"
|
||||
save_as: policy_gate
|
||||
- action: assert_greater
|
||||
actual: "{{ policy_gate }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^frontend_publication_runtime_invoked_only_when_enabled=true$"
|
||||
save_as: runtime_invoked_only_when_enabled
|
||||
- action: assert_greater
|
||||
actual: "{{ runtime_invoked_only_when_enabled }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^frontend_publication_runtime_failure_no_false_publish=true$"
|
||||
save_as: no_false_publish
|
||||
- action: assert_greater
|
||||
actual: "{{ no_false_publish }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^frontend_publication_runtime_invalid_terminal_evidence_no_false_publish=true$"
|
||||
save_as: invalid_terminal_no_false_publish
|
||||
- action: assert_greater
|
||||
actual: "{{ invalid_terminal_no_false_publish }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^frontend_publication_attempts=1$"
|
||||
save_as: one_frontend_attempt
|
||||
- action: assert_greater
|
||||
actual: "{{ one_frontend_attempt }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^frontend_published=true$"
|
||||
save_as: frontend_published
|
||||
- action: assert_greater
|
||||
actual: "{{ frontend_published }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^failback_started=false$"
|
||||
save_as: failback_not_started
|
||||
- action: assert_greater
|
||||
actual: "{{ failback_not_started }}"
|
||||
threshold: "0"
|
||||
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract/phase72-frontend-publication-runtime-contract-summary.txt"
|
||||
pattern: "^storage_mutation_allowed=false$"
|
||||
save_as: no_storage_mutation
|
||||
- action: assert_greater
|
||||
actual: "{{ no_storage_mutation }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase72-frontend-publication-runtime-contract"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,96 @@
|
||||
# Runner-native Phase 69 gate: frontend publication target contract.
|
||||
|
||||
name: frontend-publication-target-contract-chain
|
||||
timeout: 8m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: frontend_publication_target_contract_gate
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 7m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract bash scripts/run-phase69-frontend-publication-target-contract-gate.sh {{ product_root }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract/phase69-frontend-publication-target-contract-summary.txt"
|
||||
pattern: "^phase69_frontend_publication_target_contract_status=ok$"
|
||||
save_as: phase69_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ phase69_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract/phase69-frontend-publication-target-contract-summary.txt"
|
||||
pattern: "^frontend_publication_target_schema_locked=true$"
|
||||
save_as: schema_locked
|
||||
- action: assert_greater
|
||||
actual: "{{ schema_locked }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract/phase69-frontend-publication-target-contract-summary.txt"
|
||||
pattern: "^frontend_publication_target_owner_creates_target=true$"
|
||||
save_as: creates_target
|
||||
- action: assert_greater
|
||||
actual: "{{ creates_target }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract/phase69-frontend-publication-target-contract-summary.txt"
|
||||
pattern: "^frontend_publication_target_owner_dry_run_no_create=true$"
|
||||
save_as: dry_run_no_create
|
||||
- action: assert_greater
|
||||
actual: "{{ dry_run_no_create }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract/phase69-frontend-publication-target-contract-summary.txt"
|
||||
pattern: "^frontend_publication_target_owner_rejects_enabled_publication=true$"
|
||||
save_as: rejects_enabled
|
||||
- action: assert_greater
|
||||
actual: "{{ rejects_enabled }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract/phase69-frontend-publication-target-contract-summary.txt"
|
||||
pattern: "^frontend_publication_target_owner_rbac_narrow=true$"
|
||||
save_as: rbac_narrow
|
||||
- action: assert_greater
|
||||
actual: "{{ rbac_narrow }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract/phase69-frontend-publication-target-contract-summary.txt"
|
||||
pattern: "^frontend_publication_attempts=0$"
|
||||
save_as: no_frontend_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_frontend_attempts }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract/phase69-frontend-publication-target-contract-summary.txt"
|
||||
pattern: "^failback_attempts=0$"
|
||||
save_as: no_failback_attempts
|
||||
- action: assert_greater
|
||||
actual: "{{ no_failback_attempts }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase69-frontend-publication-target-contract"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,270 @@
|
||||
# Runner-native Phase 21 D3 Helm first-volume chain.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the PM/user Helm path:
|
||||
# generate values.day1.yaml -> helm install -> first PVC ->
|
||||
# writer checksum -> reader checksum -> read-only report -> helm uninstall.
|
||||
#
|
||||
# Lab prerequisite:
|
||||
# helm must be installed on the runner node. k3s labs also need explicit
|
||||
# KUBECONFIG because helm does not auto-load /etc/rancher/k3s/k3s.yaml the
|
||||
# way the k3s-wrapped kubectl command does.
|
||||
|
||||
name: helm-first-volume-chain
|
||||
timeout: 26m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "ghcr.io/seaweedfs/seaweed-block:sha-28a99ce4f644"
|
||||
sw_block_csi_image: "ghcr.io/seaweedfs/seaweed-block-csi:sha-28a99ce4f644"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: generate_day1_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "helm version --short > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values/helm-version.txt && cd {{ product_root }} && bash scripts/generate-helm-values-day1.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_HELM_VALUES_OUT: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values/values.day1.yaml"
|
||||
env.SW_BLOCK_ACTIVATION_IMAGE_MODE: "published"
|
||||
env.SW_BLOCK_IMAGE: "{{ sw_block_image }}"
|
||||
env.SW_BLOCK_CSI_IMAGE: "{{ sw_block_csi_image }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values/values.day1.yaml"
|
||||
pattern: "^blockNodes:$"
|
||||
save_as: block_nodes_count
|
||||
- action: assert_greater
|
||||
actual: "{{ block_nodes_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values/values.day1.yaml"
|
||||
pattern: "externalISCSI: true"
|
||||
save_as: external_iscsi_count
|
||||
- action: assert_greater
|
||||
actual: "{{ external_iscsi_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values/values.day1.yaml"
|
||||
pattern: "enabled: true"
|
||||
save_as: chap_enabled_count
|
||||
- action: assert_greater
|
||||
actual: "{{ chap_enabled_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values/values.day1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/helm-lint.txt && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values/values.day1.yaml --wait --timeout 5m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/helm-install.txt && kubectl -n {{ helm_namespace }} rollout status deploy/sw-blockmaster --timeout=180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/wait-blockmaster.txt && kubectl -n {{ helm_namespace }} rollout status deploy/sw-block-csi-controller --timeout=180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/wait-csi-controller.txt && kubectl -n {{ helm_namespace }} rollout status ds/sw-block-csi-node --timeout=180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/wait-csi-node.txt && helm status {{ helm_release }} --namespace {{ helm_namespace }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/helm-status.txt && kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/kube-system-ready.txt && kubectl get sc sw-block-dynamic -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/storageclass.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/helm-status.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/install/storageclass.txt"
|
||||
pattern: "block.csi.seaweedfs.com"
|
||||
save_as: storageclass_provider_count
|
||||
- action: assert_greater
|
||||
actual: "{{ storageclass_provider_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: first_volume_user_loop
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-basic-app-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app"
|
||||
env.SW_BLOCK_BASIC_APP_CLEANUP: "1"
|
||||
env.SW_BLOCK_INSTALL_MODE: "helm"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_HELM_VALUES_FILE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/values/values.day1.yaml"
|
||||
env.SW_BLOCK_IMAGE: "{{ sw_block_image }}"
|
||||
env.SW_BLOCK_CSI_IMAGE: "{{ sw_block_csi_image }}"
|
||||
|
||||
- name: first_volume_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^first_volume_status=ok$"
|
||||
save_as: first_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^install_mode=helm$"
|
||||
save_as: install_mode_count
|
||||
- action: assert_greater
|
||||
actual: "{{ install_mode_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^helm_release={{ helm_release }}$"
|
||||
save_as: helm_release_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_release_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^image={{ sw_block_image }}$"
|
||||
save_as: image_count
|
||||
- action: assert_greater
|
||||
actual: "{{ image_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^image_digest="
|
||||
save_as: image_digest_count
|
||||
- action: assert_greater
|
||||
actual: "{{ image_digest_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^writer_verified=true$"
|
||||
save_as: writer_verified_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_verified_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^reader_verified=true$"
|
||||
save_as: reader_verified_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_verified_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/writer.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: writer_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/reader.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: reader_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: basic_cleanup_count
|
||||
- action: assert_greater
|
||||
actual: "{{ basic_cleanup_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/status/report/index.html"
|
||||
pattern: "<html"
|
||||
save_as: report_html_count
|
||||
- action: assert_greater
|
||||
actual: "{{ report_html_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/status/report/cluster-evidence.json"
|
||||
pattern: "\"volumes\""
|
||||
save_as: report_cluster_count
|
||||
- action: assert_greater
|
||||
actual: "{{ report_cluster_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/status/report/timeline.jsonl"
|
||||
pattern: "\"event_id\":\"master-"
|
||||
save_as: report_timeline_count
|
||||
- action: assert_greater
|
||||
actual: "{{ report_timeline_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/status/report/summary.txt"
|
||||
pattern: "^status=ok"
|
||||
save_as: report_summary_count
|
||||
- action: assert_greater
|
||||
actual: "{{ report_summary_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "! grep -Eiq '<button[^>]*>(promote|repair|delete|rebuild|cleanup)|data-action=\"(promote|repair|delete|rebuild|cleanup)\"|href=\"[^\"]*/(promote|repair|delete|rebuild|cleanup)' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/basic-app/status/report/index.html"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh; kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/cleanup/kube-system-after-uninstall.txt 2>&1 || true"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-first-volume/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,234 @@
|
||||
# Runner-native v0.3 pre-release gate: documented Go CLI Helm values path.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the literal user-facing path:
|
||||
# go build ./cmd/sw-block
|
||||
# -> sw-block ops generate-helm-values
|
||||
# -> helm install
|
||||
# -> first PVC writer/reader
|
||||
# -> read-only report
|
||||
# -> helm uninstall cleanup
|
||||
#
|
||||
# This exists because the older Helm gates used scripts/generate-helm-values-day1.sh
|
||||
# and did not cover the documented Go CLI generator.
|
||||
|
||||
name: helm-first-volume-via-sw-block-cli-chain
|
||||
timeout: 28m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "ghcr.io/seaweedfs/seaweed-block:sha-dc2972d0059b"
|
||||
sw_block_csi_image: "ghcr.io/seaweedfs/seaweed-block-csi:sha-dc2972d0059b"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: build_sw_block_cli
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/bin/sw-block --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/bin/sw-block.version.txt"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/bin/sw-block.version.txt"
|
||||
pattern: "sw-block"
|
||||
save_as: sw_block_version_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sw_block_version_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: generate_day1_values_via_cli
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "helm version --short > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/helm-version.txt && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/generate.stdout.txt && ! grep -q '^ dataPort: 3260$' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/values.day1.yaml"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/values.day1.yaml"
|
||||
pattern: "dataPort: 19101"
|
||||
save_as: data_port_19101_count
|
||||
- action: assert_greater
|
||||
actual: "{{ data_port_19101_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/values.day1.yaml"
|
||||
pattern: "launcherReplicationAckFlag: false"
|
||||
save_as: compat_ack_false_count
|
||||
- action: assert_greater
|
||||
actual: "{{ compat_ack_false_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/values.day1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/install/helm-lint.txt && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/install/helm-install.txt && kubectl -n {{ helm_namespace }} get deploy,ds,pods,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/install/kube-system.after-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: first_volume_user_loop
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-basic-app-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app"
|
||||
env.SW_BLOCK_BASIC_APP_CLEANUP: "1"
|
||||
env.SW_BLOCK_INSTALL_MODE: "helm"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_HELM_VALUES_FILE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/values/values.day1.yaml"
|
||||
|
||||
- name: first_volume_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^first_volume_status=ok$"
|
||||
save_as: first_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^writer_verified=true$"
|
||||
save_as: writer_verified_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_verified_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^reader_verified=true$"
|
||||
save_as: reader_verified_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_verified_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^status_report=status/report/index.html$"
|
||||
save_as: report_html_count
|
||||
- action: assert_greater
|
||||
actual: "{{ report_html_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app/first-volume-summary.txt"
|
||||
pattern: "^operator_snapshot=status/report/operator-snapshot.json$"
|
||||
save_as: operator_snapshot_summary_count
|
||||
- action: assert_greater
|
||||
actual: "{{ operator_snapshot_summary_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 1m
|
||||
cmd: |
|
||||
set -e;
|
||||
out=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app/status/report/dashboard-route;
|
||||
mkdir -p "$out";
|
||||
port=$(python3 - <<'PY'
|
||||
import socket
|
||||
s = socket.socket()
|
||||
s.bind(("127.0.0.1", 0))
|
||||
print(s.getsockname()[1])
|
||||
s.close()
|
||||
PY
|
||||
);
|
||||
echo "$port" > "$out/dashboard.port";
|
||||
/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/bin/sw-block ops dashboard --from-bundle /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/basic-app --listen 127.0.0.1:${port} > "$out/dashboard.stdout.txt" 2> "$out/dashboard.stderr.txt" &
|
||||
pid=$!;
|
||||
trap 'kill $pid >/dev/null 2>&1 || true; wait $pid >/dev/null 2>&1 || true' EXIT;
|
||||
for i in $(seq 1 100); do
|
||||
code=$(curl -s -o "$out/operator-snapshot.json" -w '%{http_code}' "http://127.0.0.1:${port}/operator-snapshot.json" || true);
|
||||
if [ "$code" = "200" ] && python3 - "$out/operator-snapshot.json" <<'PY'
|
||||
import json, sys
|
||||
doc = json.load(open(sys.argv[1]))
|
||||
if doc.get("read_only") is not True:
|
||||
raise SystemExit(1)
|
||||
if (doc.get("mutation") or {}).get("mutation_allowed") is not False:
|
||||
raise SystemExit(1)
|
||||
PY
|
||||
then
|
||||
exit 0;
|
||||
fi;
|
||||
sleep 0.2;
|
||||
done;
|
||||
echo "operator-snapshot route failed" >&2;
|
||||
cat "$out/dashboard.stderr.txt" >&2 || true;
|
||||
exit 1
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-cli-first-volume/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,181 @@
|
||||
# Runner-native Phase 26 D2 gate: Helm install / upgrade / rollback lifecycle.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the chart handles a narrow release lifecycle smoke:
|
||||
# generate values
|
||||
# -> helm install
|
||||
# -> first PVC writer/reader, keep PVC
|
||||
# -> helm upgrade with the same chart/values
|
||||
# -> verify existing PVC data
|
||||
# -> helm rollback to revision 1
|
||||
# -> verify existing PVC data again
|
||||
# -> helm uninstall and strict cleanup
|
||||
|
||||
name: helm-lifecycle-upgrade-rollback-chain
|
||||
timeout: 32m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "ghcr.io/seaweedfs/seaweed-block:sha-dc2972d0059b"
|
||||
sw_block_csi_image: "ghcr.io/seaweedfs/seaweed-block-csi:sha-dc2972d0059b"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/first-volume /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/upgrade /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/after-upgrade /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/rollback /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/after-rollback /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values/generate.stdout.txt && cd {{ product_root }} && bash scripts/verify-helm-release-hygiene.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values/hygiene"
|
||||
env.SW_BLOCK_HELM_VALUES_FILE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values/values.day1.yaml"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/install/helm-install.txt && helm history {{ helm_release }} --namespace {{ helm_namespace }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/install/helm-history.after-install.txt && kubectl -n {{ helm_namespace }} get deploy,ds,pods,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/install/kube-system.after-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: first_volume_keep_pvc
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-basic-app-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/first-volume"
|
||||
env.SW_BLOCK_BASIC_APP_CLEANUP: "0"
|
||||
env.SW_BLOCK_INSTALL_MODE: "helm-lifecycle"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_HELM_VALUES_FILE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values/values.day1.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/first-volume/first-volume-summary.txt"
|
||||
pattern: "^first_volume_status=ok$"
|
||||
save_as: first_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_upgrade_and_verify
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm upgrade {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/upgrade/helm-upgrade.txt && helm history {{ helm_release }} --namespace {{ helm_namespace }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/upgrade/helm-history.after-upgrade.txt && bash scripts/verify-basic-app-existing-pvc.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/after-upgrade"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/after-upgrade/existing-pvc-summary.txt"
|
||||
pattern: "^existing_pvc_status=ok$"
|
||||
save_as: after_upgrade_reader_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ after_upgrade_reader_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/upgrade/helm-history.after-upgrade.txt"
|
||||
pattern: "superseded"
|
||||
save_as: helm_superseded_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_superseded_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_rollback_and_verify
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "helm rollback {{ helm_release }} 1 --namespace {{ helm_namespace }} --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/rollback/helm-rollback.txt && helm history {{ helm_release }} --namespace {{ helm_namespace }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/rollback/helm-history.after-rollback.txt && cd {{ product_root }} && bash scripts/verify-basic-app-existing-pvc.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/after-rollback"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/after-rollback/existing-pvc-summary.txt"
|
||||
pattern: "^existing_pvc_status=ok$"
|
||||
save_as: after_rollback_reader_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ after_rollback_reader_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/rollback/helm-history.after-rollback.txt"
|
||||
pattern: "deployed"
|
||||
save_as: helm_deployed_after_rollback_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_after_rollback_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-lifecycle/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,172 @@
|
||||
# Runner-native Phase 26 D3 gate: multi-volume Day-1 smoke.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the Helm-installed StorageClass can handle a small multi-PVC user
|
||||
# shape and that ops report/dashboard evidence distinguishes each volume.
|
||||
|
||||
name: helm-multi-volume-day1-chain
|
||||
timeout: 34m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase26-d3"
|
||||
sw_block_csi_image: "sw-block-csi:phase26-d3"
|
||||
volume_count: "3"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod -l sw-block-test=multi-volume --ignore-not-found=true --wait=true --timeout=120s; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-writer-$i sw-block-multi-reader-$i --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-$i --ignore-not-found=true --wait=true --timeout=120s; done; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/multi-volume /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE={{ sw_block_image }}"
|
||||
save_as: local_image_built_count
|
||||
- action: assert_greater
|
||||
actual: "{{ local_image_built_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/values/generate.stdout.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/values/values.day1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/install/helm-lint.txt && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/install/helm-install.txt && kubectl -n {{ helm_namespace }} get deploy,ds,pods,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/install/kube-system.after-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: multi_volume_user_loop
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 12m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-multi-volume-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/multi-volume"
|
||||
env.SW_BLOCK_MULTI_VOLUME_COUNT: "{{ volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_CLEANUP: "1"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^multi_volume_status=ok$"
|
||||
save_as: multi_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ multi_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: multi_volume_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^writer_verified_count=3$"
|
||||
save_as: writer_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^reader_verified_count=3$"
|
||||
save_as: reader_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^managed_volume_count=3$"
|
||||
save_as: managed_volume_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ managed_volume_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/multi-volume/status/report/summary.txt"
|
||||
pattern: "^volumes=3$"
|
||||
save_as: report_volume_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ report_volume_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "for i in $(seq 1 60); do out=$(kubectl -n default get deploy -l app=sw-blockvolume -o name 2>/dev/null); if [ -z \"$out\" ]; then exit 0; fi; sleep 2; done; echo \"timeout: launcher-rendered deployments still present\" >&2; kubectl -n default get deploy -l app=sw-blockvolume -o wide >&2; exit 1"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/cleanup/helm-uninstall.txt || true; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-writer-$i sw-block-multi-reader-$i --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-$i --ignore-not-found=true --wait=true --timeout=120s; done; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -1,247 +0,0 @@
|
||||
# Phase 27 D8: multi-volume RF=3 mounted failover with app pods spread across nodes.
|
||||
#
|
||||
# Pass = three RF=3 PVCs are mounted by long-running writer pods distributed
|
||||
# across node-a/node-b/node-c, each target volume's current primary is stopped in turn,
|
||||
# the same writer pod UID verifies old data and writes new data through
|
||||
# dm-multipath, and cleanup is clean.
|
||||
|
||||
name: helm-multi-volume-rf3-app-spread-failover-chain
|
||||
timeout: 52m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase27-d8"
|
||||
sw_block_csi_image: "sw-block-csi:phase27-d8"
|
||||
volume_count: "3"
|
||||
replication_factor: "3"
|
||||
app_nodes: "m01,m02,tp01"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: |
|
||||
set -e
|
||||
helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s >/dev/null 2>&1 || true
|
||||
kubectl -n default delete pod -l sw-block-test=multi-volume-mounted-failover --ignore-not-found=true --wait=true --timeout=180s
|
||||
for i in 1 2 3; do
|
||||
kubectl -n default delete pod sw-block-multi-mounted-writer-$i --ignore-not-found=true --wait=true --timeout=180s
|
||||
kubectl -n default delete pvc sw-block-multi-mounted-pvc-$i --ignore-not-found=true --wait=true --timeout=180s
|
||||
done
|
||||
kubectl delete storageclass sw-block-multi-mounted sw-block-dynamic --ignore-not-found=true --wait=true --timeout=180s
|
||||
kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true
|
||||
for ip in 192.168.1.181 192.168.1.184 192.168.1.188; do
|
||||
if [ "$ip" = "192.168.1.184" ]; then runner="bash -lc"; else runner="ssh -i /opt/work/testdev_key -o StrictHostKeyChecking=no testdev@$ip"; fi
|
||||
$runner 'sudo -n iscsiadm -m node 2>/dev/null | awk '"'"'/io.seaweedfs/ {print $1, $2}'"'"' | while read portal target; do sudo -n iscsiadm -m node -T "$target" -p "$portal" --logout >/dev/null 2>&1 || true; sudo -n iscsiadm -m node -T "$target" -p "$portal" -o delete >/dev/null 2>&1 || true; done; sudo -n multipath -F >/dev/null 2>&1 || true'
|
||||
done
|
||||
rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover
|
||||
mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/recovery /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/cleanup
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/preclean/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLEANUP_MULTIPATH_FLUSH: "1"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
|
||||
- name: preflight
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "kubectl get nodes -o wide | tee /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/preflight-nodes.txt && kubectl get nodes --no-headers | awk '$2==\"Ready\"{c++} END{if(c<3){exit 1}}'"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/preflight-nodes.txt"
|
||||
pattern: "Ready"
|
||||
save_as: ready_node_count
|
||||
- action: assert_greater
|
||||
actual: "{{ ready_node_count }}"
|
||||
threshold: "2"
|
||||
|
||||
- name: host_multipath_prereq
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: |
|
||||
set -e
|
||||
B=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover
|
||||
: > "$B/multipath-prereq.txt"
|
||||
for spec in m01:192.168.1.181 m02:192.168.1.184 tp01:192.168.1.188; do
|
||||
name="${spec%%:*}"
|
||||
ip="${spec#*:}"
|
||||
if [ "$ip" = "192.168.1.184" ]; then runner="bash -lc"; else runner="ssh -i /opt/work/testdev_key -o StrictHostKeyChecking=no testdev@$ip"; fi
|
||||
$runner 'set -e; command -v iscsiadm >/dev/null; command -v multipath >/dev/null; command -v sg_rtpg >/dev/null; sudo modprobe iscsi_tcp; sudo modprobe dm_multipath; sudo modprobe scsi_dh_alua; test -d /sys/module/iscsi_tcp; test -d /sys/module/dm_multipath; test -d /sys/module/scsi_dh_alua; sudo multipath -t >/tmp/sw-block-multipath-prereq.config.txt 2>&1'
|
||||
echo "node=${name} multipath_prereq=pass" >> "$B/multipath-prereq.txt"
|
||||
done
|
||||
echo multipath_prereq=pass >> "$B/multipath-prereq.txt"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/multipath-prereq.txt"
|
||||
pattern: "multipath_prereq=pass"
|
||||
save_as: multipath_prereq_count
|
||||
- action: assert_greater
|
||||
actual: "{{ multipath_prereq_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} --replication-factor {{ replication_factor }} --ack-profile sync-quorum --stage2-multipath > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/values/generate.stdout.txt && python3 - <<'PY'\nfrom pathlib import Path\np=Path('/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/values/values.day1.yaml')\ns=p.read_text()\ns=s.replace('launcherReplicationAckFlag: false','launcherReplicationAckFlag: true')\np.write_text(s)\nPY"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: |
|
||||
set -e
|
||||
B=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover
|
||||
cd {{ product_root }}
|
||||
helm lint charts/seaweed-block -f "$B/values/values.day1.yaml" > "$B/install/helm-lint.txt"
|
||||
helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f "$B/values/values.day1.yaml" --wait --timeout 10m > "$B/install/helm-install.txt"
|
||||
kubectl -n {{ helm_namespace }} rollout status deploy/sw-blockmaster --timeout=180s > "$B/install/rollout-blockmaster.txt"
|
||||
kubectl -n {{ helm_namespace }} rollout status deploy/sw-block-csi-controller --timeout=180s > "$B/install/rollout-csi-controller.txt"
|
||||
kubectl -n {{ helm_namespace }} rollout status ds/sw-block-csi-node --timeout=180s > "$B/install/rollout-csi-node.txt"
|
||||
helm get values {{ helm_release }} --namespace {{ helm_namespace }} --all > "$B/install/helm-values.applied.yaml"
|
||||
helm get manifest {{ helm_release }} --namespace {{ helm_namespace }} > "$B/install/helm-manifest.yaml"
|
||||
kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > "$B/install/kube-system.after-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/install/helm-manifest.yaml"
|
||||
pattern: "sw-block:phase27-d8"
|
||||
save_as: helm_manifest_phase_image_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_manifest_phase_image_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: app_spread_mounted_failover
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 34m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-multi-volume-mounted-failover.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/recovery"
|
||||
env.SW_BLOCK_MULTI_VOLUME_COUNT: "{{ volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_RF: "{{ replication_factor }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_APP_NODE: "{{ app_nodes }}"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^multi_volume_mounted_failover_status=ok$"
|
||||
save_as: mounted_failover_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ mounted_failover_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: app_spread_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^app_node_distribution_count=3$"
|
||||
save_as: app_spread_count
|
||||
- action: assert_greater
|
||||
actual: "{{ app_spread_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^recovered_volume_count=3$"
|
||||
save_as: recovered_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ recovered_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 2m
|
||||
cmd: "B=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/recovery/failover; grep -q '^writer_node=m01$' \"$B/volume-1/summary.txt\"; grep -q '^writer_node=m02$' \"$B/volume-2/summary.txt\"; grep -q '^writer_node=tp01$' \"$B/volume-3/summary.txt\"; for i in 1 2 3; do S=$B/volume-$i/summary.txt; grep -q '^failover_status=promoted$' \"$S\"; grep -q '^target_recovered=true$' \"$S\"; grep -q '^pod_recreate_used=false$' \"$S\"; grep -q '^rtpg_transition_verified=true$' \"$S\"; grep -q '^old_primary_stale_io_success_count=0$' \"$S\"; done"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: |
|
||||
helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/cleanup/helm-uninstall.txt || true
|
||||
kubectl -n default delete pod -l sw-block-test=multi-volume-mounted-failover --ignore-not-found=true --force --grace-period=0 --wait=false
|
||||
for i in 1 2 3; do kubectl -n default delete pvc sw-block-multi-mounted-pvc-$i --ignore-not-found=true --wait=false; done
|
||||
kubectl delete storageclass sw-block-multi-mounted sw-block-dynamic --ignore-not-found=true --wait=false
|
||||
kubectl -n default delete deploy -l app=sw-blockvolume --ignore-not-found=true --wait=false
|
||||
for ip in 192.168.1.181 192.168.1.184 192.168.1.188; do
|
||||
if [ "$ip" = "192.168.1.184" ]; then runner="bash -lc"; else runner="ssh -i /opt/work/testdev_key -o StrictHostKeyChecking=no testdev@$ip"; fi
|
||||
$runner 'sudo -n iscsiadm -m node 2>/dev/null | awk '"'"'/io.seaweedfs/ {print $1, $2}'"'"' | while read portal target; do sudo -n iscsiadm -m node -T "$target" -p "$portal" --logout >/dev/null 2>&1 || true; sudo -n iscsiadm -m node -T "$target" -p "$portal" -o delete >/dev/null 2>&1 || true; done; sudo -n multipath -F >/dev/null 2>&1 || true'
|
||||
done
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/cleanup/verify SW_BLOCK_HELM_RELEASE={{ helm_release }} SW_BLOCK_HELM_NAMESPACE={{ helm_namespace }} SW_BLOCK_CLEANUP_MULTIPATH_FLUSH=1 bash scripts/verify-helm-cleanup.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "(blockmaster|blockvolume|blockcsi|iscsi-target)"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-app-spread-failover/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
+303
@@ -0,0 +1,303 @@
|
||||
# Phase 27 D4: multi-volume RF=3 interleaved mounted failover.
|
||||
#
|
||||
# Pass = three RF=3 PVCs are mounted by long-running writer pods on the same
|
||||
# kubelet, two target volumes have their current primaries stopped in one bounded window, the same
|
||||
# writer pod UID verifies old data and writes new data through dm-multipath,
|
||||
# non-target mounted workloads keep working, and cleanup is clean.
|
||||
|
||||
name: helm-multi-volume-rf3-interleaved-failover-chain
|
||||
timeout: 52m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase27-d4"
|
||||
sw_block_csi_image: "sw-block-csi:phase27-d4"
|
||||
volume_count: "3"
|
||||
target_volume_count: "2"
|
||||
replication_factor: "3"
|
||||
app_node: "m02"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s || true; kubectl -n default delete pod -l sw-block-test=multi-volume-mounted-failover --ignore-not-found=true --wait=true --timeout=180s; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-mounted-writer-$i --ignore-not-found=true --wait=true --timeout=180s; kubectl -n default delete pvc sw-block-multi-mounted-pvc-$i --ignore-not-found=true --wait=true --timeout=180s; done; kubectl delete storageclass sw-block-multi-mounted sw-block-dynamic --ignore-not-found=true --wait=true --timeout=180s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n multipath -F >/dev/null 2>&1 || true; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/preclean/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLEANUP_MULTIPATH_FLUSH: "1"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
|
||||
- name: preflight
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && bash scripts/preflight-k8s-alpha.sh --local-k3s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/preflight.txt 2>&1"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/preflight.txt"
|
||||
pattern: "summary status=PASS"
|
||||
save_as: preflight_count
|
||||
- action: assert_greater
|
||||
actual: "{{ preflight_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: host_multipath_prereq
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "set -e; B=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover; { echo stage2_protocol=iscsi-alua; command -v iscsiadm >/dev/null && echo command_iscsiadm=present; command -v multipath >/dev/null && echo command_multipath=present; command -v sg_rtpg >/dev/null && echo command_sg_rtpg=present; sudo modprobe iscsi_tcp; sudo modprobe dm_multipath; sudo modprobe scsi_dh_alua; test -d /sys/module/iscsi_tcp && echo module_iscsi_tcp=loaded; test -d /sys/module/dm_multipath && echo module_dm_multipath=loaded; test -d /sys/module/scsi_dh_alua && echo module_scsi_dh_alua=loaded; sudo multipath -t > \"$B/multipath-prereq.config.txt\" 2>&1; echo multipath_prereq=pass; } > \"$B/multipath-prereq.txt\" 2>&1"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/multipath-prereq.txt"
|
||||
pattern: "multipath_prereq=pass"
|
||||
save_as: multipath_prereq_count
|
||||
- action: assert_greater
|
||||
actual: "{{ multipath_prereq_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} --replication-factor {{ replication_factor }} --ack-profile sync-quorum --stage2-multipath > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/generate.stdout.txt && python3 - <<'PY'\nfrom pathlib import Path\np=Path('/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/values.day1.yaml')\ns=p.read_text()\ns=s.replace('launcherReplicationAckFlag: false','launcherReplicationAckFlag: true')\np.write_text(s)\nPY"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/values.day1.yaml"
|
||||
pattern: "replicationFactor: 3"
|
||||
save_as: rf3_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ rf3_in_values }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/values.day1.yaml"
|
||||
pattern: "ackProfile: sync-quorum"
|
||||
save_as: sync_quorum_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ sync_quorum_in_values }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/values.day1.yaml"
|
||||
pattern: "enabled: true"
|
||||
save_as: stage2_enabled_count
|
||||
- action: assert_greater
|
||||
actual: "{{ stage2_enabled_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/values.day1.yaml"
|
||||
pattern: "launcherReplicationAckFlag: true"
|
||||
save_as: ack_flag_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ ack_flag_in_values }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/values.day1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/install/helm-lint.txt && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/install/helm-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: multi_volume_interleaved_failover
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 34m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-multi-volume-mounted-failover.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery"
|
||||
env.SW_BLOCK_MULTI_VOLUME_COUNT: "{{ volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_RF: "{{ replication_factor }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_FAILOVER_MODE: "interleaved"
|
||||
env.SW_BLOCK_MULTI_VOLUME_TARGET_COUNT: "{{ target_volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_APP_NODE: "{{ app_node }}"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^multi_volume_interleaved_failover_status=ok$"
|
||||
save_as: interleaved_failover_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ interleaved_failover_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: interleaved_failover_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^recovered_volume_count=2$"
|
||||
save_as: recovered_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ recovered_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^mounted_workload_checksum_passed_count=2$"
|
||||
save_as: mounted_workload_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ mounted_workload_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^failover_mode=interleaved$"
|
||||
save_as: interleaved_mode_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ interleaved_mode_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^target_volume_count=2$"
|
||||
save_as: target_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ target_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^untouched_volume_stable=true$"
|
||||
save_as: untouched_stable_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ untouched_stable_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^untouched_workload_ok=true$"
|
||||
save_as: untouched_workload_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ untouched_workload_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^pod_recreate_used=false$"
|
||||
save_as: no_pod_recreate
|
||||
- action: assert_greater
|
||||
actual: "{{ no_pod_recreate }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^cross_interference_observed=false$"
|
||||
save_as: no_cross_interference
|
||||
- action: assert_greater
|
||||
actual: "{{ no_cross_interference }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/host/multipath.before.txt"
|
||||
pattern: "hwhandler='1 alua'"
|
||||
save_as: multipath_alua_count
|
||||
- action: assert_greater
|
||||
actual: "{{ multipath_alua_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/host/sg-rtpg.before.txt"
|
||||
pattern: "asymmetric access state"
|
||||
save_as: rtpg_before_count
|
||||
- action: assert_greater
|
||||
actual: "{{ rtpg_before_count }}"
|
||||
threshold: "2"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 2m
|
||||
cmd: "for i in 1 2; do D=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/failover/volume-$i; S=$D/summary.txt; P=$D/stale-primary-probe.log; B=$D/rtpg-before-states.txt; A=$D/rtpg-after-states.txt; grep -q '^interleaved_fault=true$' \"$S\"; grep -q '^failover_status=promoted$' \"$S\"; grep -q '^target_recovered=true$' \"$S\"; grep -q '^pod_recreate_used=false$' \"$S\"; grep -q '^data_check_after_failover=mounted_workload_checksum_passed$' \"$S\"; grep -q '^post_failure_primary_count=1$' \"$S\"; grep -q '^stale_primary_probe=direct_read$' \"$S\"; grep -q '^old_primary_stale_io_success_count=0$' \"$S\"; test -s \"$P\"; grep -q '^stale_primary_probe=direct_read$' \"$P\"; grep -q '^old_primary_stale_io_success_count=0$' \"$P\"; test -s \"$B\"; test -s \"$A\"; grep -q '^rtpg_before_old_primary_aas=0x00$' \"$S\"; grep -q '^rtpg_after_promoted_aas=0x00$' \"$S\"; grep -q '^rtpg_transition_verified=true$' \"$S\"; grep -q '^cross_interference_observed=false$' \"$S\"; done; grep -q '^non_target_workload_ok$' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/recovery/failover/untouched-volume-3.log"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod -l sw-block-test=multi-volume-mounted-failover --ignore-not-found=true --force --grace-period=0 --wait=false; for i in 1 2 3; do kubectl -n default delete pvc sw-block-multi-mounted-pvc-$i --ignore-not-found=true --wait=false; done; kubectl delete storageclass sw-block-multi-mounted sw-block-dynamic --ignore-not-found=true --wait=false; kubectl -n default delete deploy -l app=sw-blockvolume --ignore-not-found=true --wait=false"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "for _ in $(seq 1 60); do if ! sudo -n iscsiadm -m session 2>/dev/null | grep -q io.seaweedfs; then break; fi; sudo -n iscsiadm -m session 2>/dev/null | awk '/io.seaweedfs/ {print $3, $4}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" --logout || true; done; sleep 2; done; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n multipath -F >/dev/null 2>&1 || true"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLEANUP_MULTIPATH_FLUSH: "1"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-interleaved-failover/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,268 @@
|
||||
# Phase 27 D3: multi-volume RF=3 mounted transparent failover.
|
||||
#
|
||||
# Pass = three RF=3 PVCs are mounted by long-running writer pods on the same
|
||||
# kubelet, each target volume's current primary is stopped in turn, the same
|
||||
# writer pod UID verifies old data and writes new data through dm-multipath,
|
||||
# non-target mounted workloads keep working, and cleanup is clean.
|
||||
|
||||
name: helm-multi-volume-rf3-mounted-failover-chain
|
||||
timeout: 52m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase27-d3"
|
||||
sw_block_csi_image: "sw-block-csi:phase27-d3"
|
||||
volume_count: "3"
|
||||
replication_factor: "3"
|
||||
app_node: "m02"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s || true; kubectl -n default delete pod -l sw-block-test=multi-volume-mounted-failover --ignore-not-found=true --wait=true --timeout=180s; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-mounted-writer-$i --ignore-not-found=true --wait=true --timeout=180s; kubectl -n default delete pvc sw-block-multi-mounted-pvc-$i --ignore-not-found=true --wait=true --timeout=180s; done; kubectl delete storageclass sw-block-multi-mounted sw-block-dynamic --ignore-not-found=true --wait=true --timeout=180s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n multipath -F >/dev/null 2>&1 || true; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/preclean/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLEANUP_MULTIPATH_FLUSH: "1"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
|
||||
- name: preflight
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && bash scripts/preflight-k8s-alpha.sh --local-k3s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/preflight.txt 2>&1"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/preflight.txt"
|
||||
pattern: "summary status=PASS"
|
||||
save_as: preflight_count
|
||||
- action: assert_greater
|
||||
actual: "{{ preflight_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: host_multipath_prereq
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "set -e; B=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover; { echo stage2_protocol=iscsi-alua; command -v iscsiadm >/dev/null && echo command_iscsiadm=present; command -v multipath >/dev/null && echo command_multipath=present; command -v sg_rtpg >/dev/null && echo command_sg_rtpg=present; sudo modprobe iscsi_tcp; sudo modprobe dm_multipath; sudo modprobe scsi_dh_alua; test -d /sys/module/iscsi_tcp && echo module_iscsi_tcp=loaded; test -d /sys/module/dm_multipath && echo module_dm_multipath=loaded; test -d /sys/module/scsi_dh_alua && echo module_scsi_dh_alua=loaded; sudo multipath -t > \"$B/multipath-prereq.config.txt\" 2>&1; echo multipath_prereq=pass; } > \"$B/multipath-prereq.txt\" 2>&1"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/multipath-prereq.txt"
|
||||
pattern: "multipath_prereq=pass"
|
||||
save_as: multipath_prereq_count
|
||||
- action: assert_greater
|
||||
actual: "{{ multipath_prereq_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} --replication-factor {{ replication_factor }} --ack-profile sync-quorum --stage2-multipath > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/generate.stdout.txt && python3 - <<'PY'\nfrom pathlib import Path\np=Path('/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/values.day1.yaml')\ns=p.read_text()\ns=s.replace('launcherReplicationAckFlag: false','launcherReplicationAckFlag: true')\np.write_text(s)\nPY"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/values.day1.yaml"
|
||||
pattern: "replicationFactor: 3"
|
||||
save_as: rf3_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ rf3_in_values }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/values.day1.yaml"
|
||||
pattern: "ackProfile: sync-quorum"
|
||||
save_as: sync_quorum_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ sync_quorum_in_values }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/values.day1.yaml"
|
||||
pattern: "enabled: true"
|
||||
save_as: stage2_enabled_count
|
||||
- action: assert_greater
|
||||
actual: "{{ stage2_enabled_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/values.day1.yaml"
|
||||
pattern: "launcherReplicationAckFlag: true"
|
||||
save_as: ack_flag_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ ack_flag_in_values }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/values.day1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/install/helm-lint.txt && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/install/helm-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: multi_volume_mounted_failover
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 34m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-multi-volume-mounted-failover.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery"
|
||||
env.SW_BLOCK_MULTI_VOLUME_COUNT: "{{ volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_RF: "{{ replication_factor }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_APP_NODE: "{{ app_node }}"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^multi_volume_mounted_failover_status=ok$"
|
||||
save_as: mounted_failover_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ mounted_failover_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: mounted_failover_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^recovered_volume_count=3$"
|
||||
save_as: recovered_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ recovered_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^mounted_workload_checksum_passed_count=3$"
|
||||
save_as: mounted_workload_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ mounted_workload_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^pod_recreate_used=false$"
|
||||
save_as: no_pod_recreate
|
||||
- action: assert_greater
|
||||
actual: "{{ no_pod_recreate }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery/multi-volume-mounted-failover-summary.txt"
|
||||
pattern: "^cross_interference_observed=false$"
|
||||
save_as: no_cross_interference
|
||||
- action: assert_greater
|
||||
actual: "{{ no_cross_interference }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery/host/multipath.before.txt"
|
||||
pattern: "hwhandler='1 alua'"
|
||||
save_as: multipath_alua_count
|
||||
- action: assert_greater
|
||||
actual: "{{ multipath_alua_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery/host/sg-rtpg.before.txt"
|
||||
pattern: "asymmetric access state"
|
||||
save_as: rtpg_before_count
|
||||
- action: assert_greater
|
||||
actual: "{{ rtpg_before_count }}"
|
||||
threshold: "2"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 2m
|
||||
cmd: "for i in 1 2 3; do D=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/recovery/failover/volume-$i; S=$D/summary.txt; P=$D/stale-primary-probe.log; B=$D/rtpg-before-states.txt; A=$D/rtpg-after-states.txt; grep -q '^failover_status=promoted$' \"$S\"; grep -q '^target_recovered=true$' \"$S\"; grep -q '^pod_recreate_used=false$' \"$S\"; grep -q '^data_check_after_failover=mounted_workload_checksum_passed$' \"$S\"; grep -q '^post_failure_primary_count=1$' \"$S\"; grep -q '^stale_primary_probe=direct_read$' \"$S\"; grep -q '^old_primary_stale_io_success_count=0$' \"$S\"; test -s \"$P\"; grep -q '^stale_primary_probe=direct_read$' \"$P\"; grep -q '^old_primary_stale_io_success_count=0$' \"$P\"; test -s \"$B\"; test -s \"$A\"; grep -q '^rtpg_before_old_primary_aas=0x00$' \"$S\"; grep -q '^rtpg_after_promoted_aas=0x00$' \"$S\"; grep -q '^rtpg_transition_verified=true$' \"$S\"; grep -q '^cross_interference_observed=false$' \"$S\"; done"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod -l sw-block-test=multi-volume-mounted-failover --ignore-not-found=true --force --grace-period=0 --wait=false; for i in 1 2 3; do kubectl -n default delete pvc sw-block-multi-mounted-pvc-$i --ignore-not-found=true --wait=false; done; kubectl delete storageclass sw-block-multi-mounted sw-block-dynamic --ignore-not-found=true --wait=false; kubectl -n default delete deploy -l app=sw-blockvolume --ignore-not-found=true --wait=false"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "for _ in $(seq 1 60); do if ! sudo -n iscsiadm -m session 2>/dev/null | grep -q io.seaweedfs; then break; fi; sudo -n iscsiadm -m session 2>/dev/null | awk '/io.seaweedfs/ {print $3, $4}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" --logout || true; done; sleep 2; done; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n multipath -F >/dev/null 2>&1 || true"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLEANUP_MULTIPATH_FLUSH: "1"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-mounted-failover/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,205 @@
|
||||
# Phase 27 D1 spike: multi-volume Day-1 at RF=3, no fault injection.
|
||||
#
|
||||
# Goal:
|
||||
# First signal on whether the v0.3.1 placement / port-assignment scheme can
|
||||
# actually host N concurrent RF=3 volumes (N=3 PVCs => 9 blockvolume pods
|
||||
# total, 3 per node on a 3-node lab). This is the lowest-bar readiness gate
|
||||
# for the multi-volume HA independence track; it does NOT inject faults.
|
||||
#
|
||||
# Pass = 3 PVCs bind, 3 writers verify, 3 readers verify, report shows
|
||||
# replication_factor=3 and three ManagedVolumes, cleanup is clean.
|
||||
# Fail = first signal that the port / placement scheme needs more work before
|
||||
# multi-volume HA gates can even be authored.
|
||||
|
||||
name: helm-multi-volume-rf3-readiness-chain
|
||||
timeout: 34m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase27-rf3"
|
||||
sw_block_csi_image: "sw-block-csi:phase27-rf3"
|
||||
volume_count: "3"
|
||||
replication_factor: "3"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod -l sw-block-test=multi-volume --ignore-not-found=true --wait=true --timeout=120s; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-writer-$i sw-block-multi-reader-$i --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-$i --ignore-not-found=true --wait=true --timeout=120s; done; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3 && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE={{ sw_block_image }}"
|
||||
save_as: local_image_built_count
|
||||
- action: assert_greater
|
||||
actual: "{{ local_image_built_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} --replication-factor {{ replication_factor }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/values/generate.stdout.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/values/values.day1.yaml"
|
||||
pattern: "replicationFactor: 3"
|
||||
save_as: rf3_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ rf3_in_values }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/values/values.day1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/install/helm-lint.txt && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/install/helm-install.txt && kubectl -n {{ helm_namespace }} get deploy,ds,pods,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/install/kube-system.after-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: multi_volume_user_loop
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 18m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-multi-volume-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume"
|
||||
env.SW_BLOCK_MULTI_VOLUME_COUNT: "{{ volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_RF: "{{ replication_factor }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_CLEANUP: "1"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^multi_volume_status=ok$"
|
||||
save_as: multi_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ multi_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: multi_volume_rf3_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^replication_factor=3$"
|
||||
save_as: rf3_in_summary
|
||||
- action: assert_greater
|
||||
actual: "{{ rf3_in_summary }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^writer_verified_count=3$"
|
||||
save_as: writer_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^reader_verified_count=3$"
|
||||
save_as: reader_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^managed_volume_count=3$"
|
||||
save_as: managed_volume_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ managed_volume_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume/status/report/summary.txt"
|
||||
pattern: "^volumes=3$"
|
||||
save_as: report_volume_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ report_volume_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/multi-volume/status/report/summary.txt"
|
||||
pattern: "rf=3"
|
||||
save_as: rf3_in_report
|
||||
- action: assert_greater
|
||||
actual: "{{ rf3_in_report }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "for i in $(seq 1 60); do out=$(kubectl -n default get deploy -l app=sw-blockvolume -o name 2>/dev/null); if [ -z \"$out\" ]; then exit 0; fi; sleep 2; done; echo \"timeout: launcher-rendered deployments still present\" >&2; kubectl -n default get deploy -l app=sw-blockvolume -o wide >&2; exit 1"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/cleanup/helm-uninstall.txt || true; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-writer-$i sw-block-multi-reader-$i --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-$i --ignore-not-found=true --wait=true --timeout=120s; done; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,174 @@
|
||||
# Phase 27 D2: multi-volume RF=3 CSI reattach recovery.
|
||||
#
|
||||
# Pass = three RF=3 PVCs are ready, then each volume's current primary is
|
||||
# stopped in turn; only the target volume changes primary, a replacement
|
||||
# reader verifies persisted data through CSI/pod recreate, and cleanup is
|
||||
# clean.
|
||||
|
||||
name: helm-multi-volume-rf3-reattach-recovery-chain
|
||||
timeout: 48m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase27-d2"
|
||||
sw_block_csi_image: "sw-block-csi:phase27-d2"
|
||||
volume_count: "3"
|
||||
replication_factor: "3"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod -l sw-block-test=multi-volume --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pod -l sw-block-test=multi-volume-reattach --ignore-not-found=true --wait=true --timeout=120s; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-writer-$i sw-block-multi-reader-$i sw-block-multi-reattach-reader-$i --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-$i --ignore-not-found=true --wait=true --timeout=120s; done; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/recovery /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} --replication-factor {{ replication_factor }} --ack-profile sync-quorum > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/generate.stdout.txt && python3 - <<'PY'\nfrom pathlib import Path\np=Path('/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/values.day1.yaml')\ns=p.read_text()\ns=s.replace('launcherReplicationAckFlag: false','launcherReplicationAckFlag: true')\np.write_text(s)\nPY"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/values.day1.yaml"
|
||||
pattern: "replicationFactor: 3"
|
||||
save_as: rf3_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ rf3_in_values }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/values.day1.yaml"
|
||||
pattern: "ackProfile: sync-quorum"
|
||||
save_as: sync_quorum_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ sync_quorum_in_values }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/values.day1.yaml"
|
||||
pattern: "launcherReplicationAckFlag: true"
|
||||
save_as: ack_flag_in_values
|
||||
- action: assert_greater
|
||||
actual: "{{ ack_flag_in_values }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/values.day1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/install/helm-lint.txt && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/install/helm-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: multi_volume_reattach_recovery
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 26m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-multi-volume-reattach-recovery.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/recovery"
|
||||
env.SW_BLOCK_MULTI_VOLUME_COUNT: "{{ volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_RF: "{{ replication_factor }}"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/recovery/multi-volume-reattach-summary.txt"
|
||||
pattern: "^multi_volume_reattach_status=ok$"
|
||||
save_as: recovery_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ recovery_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: recovery_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/recovery/multi-volume-reattach-summary.txt"
|
||||
pattern: "^recovered_volume_count=3$"
|
||||
save_as: recovered_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ recovered_count_ok }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/recovery/multi-volume-reattach-summary.txt"
|
||||
pattern: "^cross_interference_observed=false$"
|
||||
save_as: no_cross_interference
|
||||
- action: assert_greater
|
||||
actual: "{{ no_cross_interference }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 2m
|
||||
cmd: "for i in 1 2 3; do S=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/recovery/failover/volume-$i/summary.txt; grep -q '^failover_status=promoted$' \"$S\"; grep -q '^target_recovered=true$' \"$S\"; grep -q '^reader_verified=true$' \"$S\"; grep -q '^pod_recreate_used=true$' \"$S\"; grep -q '^post_failure_primary_count=1$' \"$S\"; grep -q '^cross_interference_observed=false$' \"$S\"; done"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod -l sw-block-test=multi-volume --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pod -l sw-block-test=multi-volume-reattach --ignore-not-found=true --wait=true --timeout=120s; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-writer-$i sw-block-multi-reader-$i sw-block-multi-reattach-reader-$i --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-$i --ignore-not-found=true --wait=true --timeout=120s; done; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-reattach/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,212 @@
|
||||
# Phase 31 D5: multi-volume RF3 restart smoke.
|
||||
#
|
||||
# Goal:
|
||||
# Prove a Helm-installed RF=3 sync-quorum stack with hostPath restart
|
||||
# persistence can restart k3s/product and keep three independent PVCs readable
|
||||
# without mixing per-volume authority or publish targets.
|
||||
#
|
||||
# Product boundary:
|
||||
# Three PVCs, RF=3, sync-quorum, no injected primary failure. This is restart
|
||||
# persistence smoke, not rebuild/failback or physical-host-loss recovery.
|
||||
|
||||
name: helm-multi-volume-rf3-restart-smoke-chain
|
||||
timeout: 42m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase31-d5"
|
||||
sw_block_csi_image: "sw-block-csi:phase31-d5"
|
||||
volume_count: "3"
|
||||
replication_factor: "3"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "sudo -n chmod 644 /etc/rancher/k3s/k3s.yaml || true; helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s || true; kubectl -n default delete pod -l sw-block-test=multi-volume --ignore-not-found=true --wait=true --timeout=120s; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-writer-$i sw-block-multi-reader-$i --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-$i --ignore-not-found=true --wait=true --timeout=120s; done; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n rm -rf /var/lib/sw-block/testops-{{ run_id }}-rf3-restart-smoke; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/multi-volume /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/after-restart /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/values.restart.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} --replication-factor {{ replication_factor }} --ack-profile sync-quorum --restart-persistence hostpath --state-hostpath /var/lib/sw-block/testops-{{ run_id }}-rf3-restart-smoke > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/generate.stdout.txt && python3 - <<'PY'\nfrom pathlib import Path\np=Path('/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/values.restart.yaml')\ns=p.read_text()\ns=s.replace('launcherReplicationAckFlag: false','launcherReplicationAckFlag: true')\np.write_text(s)\nPY"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/generate.stdout.txt"
|
||||
pattern: "^restart_persistence_mode=hostpath$"
|
||||
save_as: restart_mode_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_mode_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/values.restart.yaml"
|
||||
pattern: "replicationFactor: 3"
|
||||
save_as: rf3_values_count
|
||||
- action: assert_greater
|
||||
actual: "{{ rf3_values_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/values.restart.yaml"
|
||||
pattern: "ackProfile: sync-quorum"
|
||||
save_as: sync_quorum_values_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sync_quorum_values_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/values.restart.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/install/helm-lint.txt && helm template {{ helm_release }} charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/values.restart.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/install/helm-template.yaml && grep -q -- '--launcher-state-hostpath=/var/lib/sw-block/testops-{{ run_id }}-rf3-restart-smoke' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/install/helm-template.yaml && grep -q -- '--launcher-replication-ack=sync-quorum' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/install/helm-template.yaml && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/values/values.restart.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/install/helm-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: multi_volume_before_restart
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 16m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-multi-volume-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/multi-volume"
|
||||
env.SW_BLOCK_MULTI_VOLUME_COUNT: "{{ volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_RF: "{{ replication_factor }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_CLEANUP: "0"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^writer_verified_count=3$"
|
||||
save_as: writer_before_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_before_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/multi-volume/multi-volume-summary.txt"
|
||||
pattern: "^reader_verified_count=3$"
|
||||
save_as: reader_before_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_before_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/multi-volume/status/cluster-evidence.json"
|
||||
pattern: "\"volumes\""
|
||||
save_as: cluster_before_count
|
||||
- action: assert_greater
|
||||
actual: "{{ cluster_before_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: restart_k3s_and_compare_volumes
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "set -e; cp /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/multi-volume/status/cluster-evidence.json /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/cluster-before-restart.json; date -u > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/restart-start.txt; sudo -n systemctl restart k3s; for i in $(seq 1 180); do if sudo -n k3s kubectl get nodes >/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/nodes.wait.txt 2>&1; then break; fi; sleep 2; done; sudo -n chmod 644 /etc/rancher/k3s/k3s.yaml; kubectl wait --for=condition=Ready node/m02 --timeout=300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/wait-node-ready.txt; kubectl -n {{ helm_namespace }} rollout status deploy/sw-blockmaster --timeout=300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/wait-blockmaster.txt; kubectl -n {{ helm_namespace }} rollout status deploy/sw-block-csi-controller --timeout=300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/wait-csi-controller.txt; kubectl -n {{ helm_namespace }} rollout status ds/sw-block-csi-node --timeout=300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/wait-csi-node.txt; for d in $(kubectl -n default get deploy -l app=sw-blockvolume -o name); do kubectl -n default rollout status \"$d\" --timeout=300s; done > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/wait-blockvolumes.txt; port=$(/usr/bin/python3 - <<'PY'\nimport socket\ns=socket.socket(); s.bind(('127.0.0.1',0)); print(s.getsockname()[1]); s.close()\nPY\n); kubectl -n {{ helm_namespace }} port-forward deploy/sw-blockmaster ${port}:9333 > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/blockmaster-port-forward.log 2>&1 & pf=$!; trap 'kill $pf >/dev/null 2>&1 || true; wait $pf >/dev/null 2>&1 || true' EXIT; for i in $(seq 1 60); do if (echo >/dev/tcp/127.0.0.1/$port) >/dev/null 2>&1; then break; fi; sleep 1; done; /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/bin/sw-block ops cluster --master-api 127.0.0.1:${port} --timeout 30s -o json > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/cluster-after-restart.json; /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/bin/sw-block ops report --master-api 127.0.0.1:${port} --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/report > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/report.stdout.txt; python3 - /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/cluster-before-restart.json /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/cluster-after-restart.json /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/multi-volume-restart-summary.txt <<'PY'\nimport json, sys\nbefore=json.load(open(sys.argv[1])); after=json.load(open(sys.argv[2])); out=sys.argv[3]\ndef by_id(doc):\n return {v.get('volume_id'): v for v in doc.get('volumes', []) if v.get('volume_id')}\nb=by_id(before); a=by_id(after)\nstatus='ok'; reasons=[]\nif len(b)!=3 or len(a)!=3:\n status='failed'; reasons.append(f'volume_count_before_{len(b)}_after_{len(a)}')\nfor vid, bv in b.items():\n av=a.get(vid)\n if not av:\n status='failed'; reasons.append(f'missing_{vid}'); continue\n for field in ('primary_replica','publish_target'):\n if bv.get(field) != av.get(field):\n status='failed'; reasons.append(f'{vid}_{field}_changed')\n be=int(bv.get('epoch') or bv.get('authority_epoch') or 0)\n ae=int(av.get('epoch') or av.get('authority_epoch') or 0)\n if ae < be:\n status='failed'; reasons.append(f'{vid}_epoch_rollback')\npublish=[v.get('publish_target') for v in a.values() if v.get('publish_target')]\nduplicate=len(publish)!=len(set(publish))\nif duplicate:\n status='failed'; reasons.append('duplicate_publish_target_for_distinct_volume')\nwith open(out,'w',encoding='utf-8') as f:\n f.write(f'multi_volume_restart_status={status}\\n')\n f.write(f'before_volume_count={len(b)}\\n')\n f.write(f'after_volume_count={len(a)}\\n')\n f.write('reader_verified_count=pending\\n')\n f.write(f'managed_volume_count={sum(1 for line in open(sys.argv[3].replace(\"multi-volume-restart-summary.txt\",\"report/summary.txt\"), encoding=\"utf-8\") if line.startswith(\"managed_volume=\"))}\\n')\n f.write(f'duplicate_publish_target_for_distinct_volume={str(duplicate).lower()}\\n')\n f.write(f'cross_volume_authority_mixup={\"true\" if status != \"ok\" else \"false\"}\\n')\n f.write(f'reason={\",\".join(reasons) if reasons else \"all_volumes_persisted\"}\\n')\nif status!='ok':\n raise SystemExit(','.join(reasons))\nPY"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/multi-volume-restart-summary.txt"
|
||||
pattern: "^multi_volume_restart_status=ok$"
|
||||
save_as: restart_status_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_status_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/multi-volume-restart-summary.txt"
|
||||
pattern: "^managed_volume_count=3$"
|
||||
save_as: managed_volume_after_count
|
||||
- action: assert_greater
|
||||
actual: "{{ managed_volume_after_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: readers_after_restart
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 14m
|
||||
cmd: "set -e; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-reader-$i --ignore-not-found=true --wait=true --timeout=120s; kubectl apply -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/multi-volume/manifests/reader-$i.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/after-restart/apply-reader-$i.log; kubectl -n default wait --for=jsonpath='{.status.phase}'=Succeeded pod/sw-block-multi-reader-$i --timeout=240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/after-restart/wait-reader-$i.log; kubectl -n default logs sw-block-multi-reader-$i > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/after-restart/reader-$i.log; grep -q '/data/demo.bin: OK' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/after-restart/reader-$i.log; done; count=$(grep -l '/data/demo.bin: OK' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/after-restart/reader-*.log | wc -l | tr -d ' '); echo \"reader_verified_count=$count\" >> /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/multi-volume-restart-summary.txt; test \"$count\" = \"3\""
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/restart/multi-volume-restart-summary.txt"
|
||||
pattern: "^reader_verified_count=3$"
|
||||
save_as: reader_count_ok
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_count_ok }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 9m
|
||||
cmd: "mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/cleanup/diagnostics; for n in $(seq 1 90); do kubectl get nodes >/dev/null 2>&1 && break; sleep 2; done; kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/cleanup/diagnostics/kube-system.before-cleanup.txt 2>&1 || true; helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod -l sw-block-test=multi-volume --ignore-not-found=true --wait=true --timeout=180s || true; for i in 1 2 3; do kubectl -n default delete pod sw-block-multi-writer-$i sw-block-multi-reader-$i sw-block-multi-reattach-reader-$i --ignore-not-found=true --wait=true --timeout=120s || true; kubectl -n default delete pvc sw-block-multi-pvc-$i --ignore-not-found=true --wait=true --timeout=120s || true; done; kubectl -n default delete deploy -l app=sw-blockvolume --ignore-not-found=true --wait=true --timeout=180s || true; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s || true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n rm -rf /var/lib/sw-block/testops-{{ run_id }}-rf3-restart-smoke; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLEANUP_HOSTPATH_PREFIX: "testops-{{ run_id }}-rf3-restart-smoke"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-multi-volume-rf3-restart"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,112 @@
|
||||
# Runner-native Phase 26 D1 gate: Helm release hygiene.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the chart is a repeatable release artifact before running heavier
|
||||
# lifecycle gates:
|
||||
# build sw-block CLI
|
||||
# -> generate Day-1 values from the live cluster
|
||||
# -> helm lint
|
||||
# -> helm template
|
||||
# -> helm package
|
||||
# -> assert rendered release-critical resources exist
|
||||
|
||||
name: helm-release-hygiene-chain
|
||||
timeout: 12m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "ghcr.io/seaweedfs/seaweed-block:sha-28a99ce4f644"
|
||||
sw_block_csi_image: "ghcr.io/seaweedfs/seaweed-block-csi:sha-28a99ce4f644"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
|
||||
- name: build_sw_block_cli
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/bin/sw-block --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/bin/sw-block.version.txt"
|
||||
|
||||
- name: generate_day1_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "helm version --short > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/values/helm-version.txt && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/values/generate.stdout.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_release_hygiene
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && bash scripts/verify-helm-release-hygiene.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene"
|
||||
env.SW_BLOCK_HELM_VALUES_FILE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/values/values.day1.yaml"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
|
||||
- name: helm_release_hygiene_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene/helm-release-hygiene-summary.txt"
|
||||
pattern: "^helm_hygiene_status=ok$"
|
||||
save_as: hygiene_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ hygiene_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene/helm-release-hygiene-summary.txt"
|
||||
pattern: "^rendered_storageclass_count=1$"
|
||||
save_as: rendered_sc_count
|
||||
- action: assert_greater
|
||||
actual: "{{ rendered_sc_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene/helm-release-hygiene-summary.txt"
|
||||
pattern: "^rendered_csidriver_count=1$"
|
||||
save_as: rendered_csidriver_count
|
||||
- action: assert_greater
|
||||
actual: "{{ rendered_csidriver_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene/helm-release-hygiene-summary.txt"
|
||||
pattern: "^rendered_master_count=1$"
|
||||
save_as: rendered_master_count
|
||||
- action: assert_greater
|
||||
actual: "{{ rendered_master_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 1m
|
||||
cmd: "ls /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene/*.tgz >/dev/null && test -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene/helm-template.yaml && test -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-release-hygiene/hygiene/helm-lint.txt"
|
||||
@@ -0,0 +1,481 @@
|
||||
# Phase 31 D4: RF3 promotion state survives Kubernetes restart.
|
||||
#
|
||||
# Goal:
|
||||
# Prove that after an RF=3 sync-quorum volume promotes a surviving replica,
|
||||
# a k3s/product restart does not resurrect the old primary or roll authority
|
||||
# back to the pre-promotion target.
|
||||
#
|
||||
# Product boundary:
|
||||
# One PVC, RF=3, sync-quorum, CSI/pod recreate recovery after failover, then
|
||||
# CSI/pod recreate after k3s restart. This is not backup/restore, returned
|
||||
# replica rebuild/failback, or physical host loss.
|
||||
|
||||
name: helm-rf3-promotion-restart-persistence-chain
|
||||
timeout: 44m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase31-d4"
|
||||
sw_block_csi_image: "sw-block-csi:phase31-d4"
|
||||
volume_count: "1"
|
||||
replication_factor: "3"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "sudo -n chmod 644 /etc/rancher/k3s/k3s.yaml || true; helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s || true; kubectl -n default delete pod -l sw-block-test=multi-volume --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pod -l sw-block-test=multi-volume-reattach --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pod sw-block-multi-writer-1 sw-block-multi-reader-1 sw-block-multi-reattach-reader-1 --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-1 --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete deploy -l app=sw-blockvolume --ignore-not-found=true --wait=true --timeout=180s; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n rm -rf /var/lib/sw-block/testops-{{ run_id }}-rf3-promotion-restart; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/recovery /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/restart /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/cleanup; leftover=$(kubectl -n default get deploy -l app=sw-blockvolume -o name 2>/dev/null || true); if [ -n \"$leftover\" ]; then echo \"$leftover\" > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/pre-clean-blockvolume-leftover.txt; exit 3; fi"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/values.restart.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} --replication-factor {{ replication_factor }} --ack-profile sync-quorum --restart-persistence hostpath --state-hostpath /var/lib/sw-block/testops-{{ run_id }}-rf3-promotion-restart > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/generate.stdout.txt && python3 - <<'PY'\nfrom pathlib import Path\np=Path('/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/values.restart.yaml')\ns=p.read_text()\ns=s.replace('launcherReplicationAckFlag: false','launcherReplicationAckFlag: true')\np.write_text(s)\nPY"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/generate.stdout.txt"
|
||||
pattern: "^restart_persistence_mode=hostpath$"
|
||||
save_as: restart_mode_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_mode_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/values.restart.yaml"
|
||||
pattern: "ackProfile: sync-quorum"
|
||||
save_as: sync_quorum_values_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sync_quorum_values_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/values.restart.yaml"
|
||||
pattern: "launcherReplicationAckFlag: true"
|
||||
save_as: ack_flag_values_count
|
||||
- action: assert_greater
|
||||
actual: "{{ ack_flag_values_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/values.restart.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/install/helm-lint.txt && helm template {{ helm_release }} charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/values.restart.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/install/helm-template.yaml && grep -q -- '--launcher-state-hostpath=/var/lib/sw-block/testops-{{ run_id }}-rf3-promotion-restart' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/install/helm-template.yaml && grep -q -- '--launcher-replication-ack=sync-quorum' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/install/helm-template.yaml && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/values/values.restart.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/install/helm-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: promote_and_reattach
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 22m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-multi-volume-reattach-recovery.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/recovery"
|
||||
env.SW_BLOCK_MULTI_VOLUME_COUNT: "{{ volume_count }}"
|
||||
env.SW_BLOCK_MULTI_VOLUME_RF: "{{ replication_factor }}"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/recovery/multi-volume-reattach-summary.txt"
|
||||
pattern: "^multi_volume_reattach_status=ok$"
|
||||
save_as: recovery_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ recovery_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/recovery/failover/volume-1/summary.txt"
|
||||
pattern: "^failover_status=promoted$"
|
||||
save_as: promoted_count
|
||||
- action: assert_greater
|
||||
actual: "{{ promoted_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: restart_k3s_and_verify_authority
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 9m
|
||||
cmd: |
|
||||
set -e
|
||||
out=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/restart
|
||||
date -u > "$out/restart-start.txt"
|
||||
sudo -n systemctl restart k3s
|
||||
for i in $(seq 1 180); do
|
||||
if sudo -n k3s kubectl get nodes > "$out/nodes.wait.txt" 2>&1; then break; fi
|
||||
sleep 2
|
||||
done
|
||||
sudo -n chmod 644 /etc/rancher/k3s/k3s.yaml
|
||||
kubectl wait --for=condition=Ready node/m02 --timeout=300s > "$out/wait-node-ready.txt"
|
||||
kubectl -n {{ helm_namespace }} rollout status deploy/sw-blockmaster --timeout=300s > "$out/wait-blockmaster.txt"
|
||||
kubectl -n {{ helm_namespace }} rollout status deploy/sw-block-csi-controller --timeout=300s > "$out/wait-csi-controller.txt"
|
||||
kubectl -n {{ helm_namespace }} rollout status ds/sw-block-csi-node --timeout=300s > "$out/wait-csi-node.txt"
|
||||
for d in $(kubectl -n default get deploy -l app=sw-blockvolume -o name); do
|
||||
kubectl -n default rollout status "$d" --timeout=300s
|
||||
done > "$out/wait-blockvolumes.txt"
|
||||
port=$(/usr/bin/python3 - <<'PY'
|
||||
import socket
|
||||
s=socket.socket(); s.bind(('127.0.0.1',0)); print(s.getsockname()[1]); s.close()
|
||||
PY
|
||||
)
|
||||
pf=''
|
||||
cluster_ready=false
|
||||
for attempt in $(seq 1 10); do
|
||||
pod=$(kubectl -n {{ helm_namespace }} get pods -l app.kubernetes.io/component=blockmaster --field-selector=status.phase=Running -o name 2>/dev/null | head -1 || true)
|
||||
if [ -z "$pod" ]; then
|
||||
pod=$(kubectl -n {{ helm_namespace }} get pods -o name 2>/dev/null | grep '/sw-blockmaster-' | head -1 || true)
|
||||
fi
|
||||
if [ -z "$pod" ]; then sleep 2; continue; fi
|
||||
echo "$pod" > "$out/blockmaster-port-forward-pod.txt"
|
||||
kubectl -n {{ helm_namespace }} wait --for=condition=Ready "$pod" --timeout=30s >> "$out/wait-blockmaster-pod.txt" 2>&1 || { sleep 2; continue; }
|
||||
kubectl -n {{ helm_namespace }} port-forward "$pod" "${port}:9333" > "$out/blockmaster-port-forward.log" 2>&1 &
|
||||
pf=$!
|
||||
sleep 2
|
||||
if /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/bin/sw-block ops cluster --master-api "127.0.0.1:${port}" --timeout 30s -o json > "$out/cluster-after-restart.json.tmp" 2> "$out/cluster-after-restart.stderr.txt"; then
|
||||
mv "$out/cluster-after-restart.json.tmp" "$out/cluster-after-restart.json"
|
||||
cluster_ready=true
|
||||
break
|
||||
fi
|
||||
kill "$pf" >/dev/null 2>&1 || true
|
||||
wait "$pf" >/dev/null 2>&1 || true
|
||||
sleep 2
|
||||
done
|
||||
test "$cluster_ready" = true
|
||||
trap 'kill "$pf" >/dev/null 2>&1 || true; wait "$pf" >/dev/null 2>&1 || true' EXIT
|
||||
python3 - /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/recovery/failover/volume-1/summary.txt /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/recovery/failover/volume-1/after.json "$out/cluster-after-restart.json" "$out/restart-promotion-summary.txt" <<'PY'
|
||||
import json, sys
|
||||
summary_path, before_json, after_json, out_path = sys.argv[1:]
|
||||
summary = {}
|
||||
for line in open(summary_path, encoding='utf-8'):
|
||||
if '=' in line:
|
||||
k, v = line.strip().split('=', 1)
|
||||
summary[k] = v
|
||||
volume_id = summary['volume_id']
|
||||
promoted = summary['promoted_replica']
|
||||
target = summary['after_publish_target']
|
||||
before = json.load(open(before_json))
|
||||
after = json.load(open(after_json))
|
||||
def find(doc):
|
||||
for v in doc.get('volumes', []):
|
||||
if v.get('volume_id') == volume_id:
|
||||
return v
|
||||
raise SystemExit('volume_not_found')
|
||||
b = find(before)
|
||||
a = find(after)
|
||||
before_epoch = int(b.get('epoch') or b.get('authority_epoch') or 0)
|
||||
after_epoch = int(a.get('epoch') or a.get('authority_epoch') or 0)
|
||||
primary_count = sum(1 for r in a.get('replicas', []) if r.get('role') == 'primary')
|
||||
status = 'ok'
|
||||
reasons = []
|
||||
if a.get('primary_replica') != promoted:
|
||||
status = 'failed'; reasons.append('primary_rolled_back')
|
||||
if a.get('publish_target') != target:
|
||||
status = 'failed'; reasons.append('publish_target_changed')
|
||||
if after_epoch < before_epoch:
|
||||
status = 'failed'; reasons.append('epoch_rolled_back')
|
||||
if primary_count != 1:
|
||||
status = 'failed'; reasons.append('primary_count_not_one')
|
||||
with open(out_path, 'w', encoding='utf-8') as f:
|
||||
f.write(f'restart_promotion_status={status}\n')
|
||||
f.write(f'volume_id={volume_id}\n')
|
||||
f.write(f'before_restart_primary={promoted}\n')
|
||||
f.write(f'after_restart_primary={a.get("primary_replica", "")}\n')
|
||||
f.write(f'before_restart_publish_target={target}\n')
|
||||
f.write(f'after_restart_publish_target={a.get("publish_target", "")}\n')
|
||||
f.write(f'before_restart_epoch={before_epoch}\n')
|
||||
f.write(f'after_restart_epoch={after_epoch}\n')
|
||||
f.write(f'post_restart_primary_count={primary_count}\n')
|
||||
f.write(f'reason={",".join(reasons) if reasons else "authority_persisted"}\n')
|
||||
if status != 'ok':
|
||||
raise SystemExit(','.join(reasons))
|
||||
PY
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/restart/restart-promotion-summary.txt"
|
||||
pattern: "^restart_promotion_status=ok$"
|
||||
save_as: restart_promotion_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_promotion_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/restart/restart-promotion-summary.txt"
|
||||
pattern: "^reason=authority_persisted$"
|
||||
save_as: authority_persisted_count
|
||||
- action: assert_greater
|
||||
actual: "{{ authority_persisted_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: reader_after_restart
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "set -e; kubectl -n default delete pod sw-block-multi-reattach-reader-1 --ignore-not-found=true --wait=true --timeout=120s; kubectl apply -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/recovery/manifests/sw-block-multi-reattach-reader-1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart/apply-reader-after-restart.log; kubectl -n default wait --for=jsonpath='{.status.phase}'=Succeeded pod/sw-block-multi-reattach-reader-1 --timeout=240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart/wait-reader-after-restart.log; kubectl -n default logs sw-block-multi-reattach-reader-1 > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart/reader-after-restart.log; grep -q '/data/demo.bin: OK' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart/reader-after-restart.log"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart/reader-after-restart.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: reader_after_restart_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_after_restart_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: post_restart_degraded_status_boundary
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: |
|
||||
set -e
|
||||
out=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart/convergence
|
||||
mkdir -p "$out"
|
||||
python3 - "$out" <<'PY'
|
||||
import json
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
out = Path(sys.argv[1])
|
||||
root = Path("/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart")
|
||||
sw_block = root / "bin/sw-block"
|
||||
restart_summary = root / "restart/restart-promotion-summary.txt"
|
||||
volume_id = ""
|
||||
for line in restart_summary.read_text(encoding="utf-8").splitlines():
|
||||
if line.startswith("volume_id="):
|
||||
volume_id = line.split("=", 1)[1]
|
||||
break
|
||||
if not volume_id:
|
||||
raise SystemExit("volume_id unavailable")
|
||||
|
||||
def run(*args, **kwargs):
|
||||
return subprocess.run(args, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
|
||||
|
||||
pods = run(
|
||||
"kubectl", "-n", "{{ helm_namespace }}", "get", "pods",
|
||||
"-l", "app.kubernetes.io/component=blockmaster",
|
||||
"--field-selector=status.phase=Running",
|
||||
"-o", "json",
|
||||
check=True,
|
||||
)
|
||||
pod_items = json.loads(pods.stdout).get("items") or []
|
||||
if not pod_items:
|
||||
pods = run(
|
||||
"kubectl", "-n", "{{ helm_namespace }}", "get", "pods",
|
||||
"--field-selector=status.phase=Running",
|
||||
"-o", "json",
|
||||
check=True,
|
||||
)
|
||||
pod_items = [
|
||||
item for item in json.loads(pods.stdout).get("items") or []
|
||||
if item.get("metadata", {}).get("name", "").startswith("sw-blockmaster-")
|
||||
]
|
||||
ready_pod = ""
|
||||
for item in pod_items:
|
||||
conditions = {c.get("type"): c.get("status") for c in (item.get("status") or {}).get("conditions") or []}
|
||||
if conditions.get("Ready") == "True":
|
||||
ready_pod = item["metadata"]["name"]
|
||||
break
|
||||
if not ready_pod:
|
||||
raise SystemExit("no Ready blockmaster pod")
|
||||
(out / "blockmaster-pod.txt").write_text(ready_pod + "\n", encoding="utf-8")
|
||||
|
||||
sock = socket.socket()
|
||||
sock.bind(("127.0.0.1", 0))
|
||||
port = sock.getsockname()[1]
|
||||
sock.close()
|
||||
(out / "port.txt").write_text(str(port) + "\n", encoding="utf-8")
|
||||
|
||||
pf_log = open(out / "blockmaster-port-forward.log", "w", encoding="utf-8")
|
||||
pf = subprocess.Popen(
|
||||
["kubectl", "-n", "{{ helm_namespace }}", "port-forward", f"pod/{ready_pod}", f"{port}:9333"],
|
||||
stdout=pf_log,
|
||||
stderr=subprocess.STDOUT,
|
||||
text=True,
|
||||
)
|
||||
|
||||
def port_ready():
|
||||
try:
|
||||
with socket.create_connection(("127.0.0.1", port), timeout=1):
|
||||
return True
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
try:
|
||||
deadline = time.time() + 30
|
||||
while time.time() < deadline:
|
||||
if pf.poll() is not None:
|
||||
raise SystemExit("port-forward exited early")
|
||||
if port_ready():
|
||||
break
|
||||
time.sleep(0.5)
|
||||
else:
|
||||
raise SystemExit("port-forward did not become ready")
|
||||
|
||||
consecutive = 0
|
||||
max_consecutive = 0
|
||||
observations = []
|
||||
final_reason = ""
|
||||
for attempt in range(1, 31):
|
||||
report_dir = out / f"report-{attempt:02d}"
|
||||
evidence_dir = out / f"evidence-{attempt:02d}"
|
||||
cmd = [
|
||||
str(sw_block), "ops", "report",
|
||||
"--namespace", "default",
|
||||
"--master", f"127.0.0.1:{port}",
|
||||
"--out", str(report_dir),
|
||||
"--evidence-out", str(evidence_dir),
|
||||
"--timeout", "30s",
|
||||
]
|
||||
proc = run(*cmd)
|
||||
(out / f"report-{attempt:02d}.stdout.txt").write_text(proc.stdout, encoding="utf-8")
|
||||
(out / f"report-{attempt:02d}.stderr.txt").write_text(proc.stderr, encoding="utf-8")
|
||||
if proc.returncode != 0:
|
||||
observations.append(f"{attempt}: report_failed rc={proc.returncode}")
|
||||
consecutive = 0
|
||||
time.sleep(3)
|
||||
continue
|
||||
snap_path = report_dir / "operator-snapshot.json"
|
||||
snap = json.loads(snap_path.read_text(encoding="utf-8"))
|
||||
vols = snap.get("volumes") or []
|
||||
target = next((v for v in vols if (v.get("status") or {}).get("volume_id") == volume_id), None)
|
||||
if target is None:
|
||||
observations.append(f"{attempt}: volume_missing")
|
||||
consecutive = 0
|
||||
time.sleep(3)
|
||||
continue
|
||||
status = target.get("status") or {}
|
||||
conditions = status.get("conditions") or []
|
||||
ready_true = any(c.get("type") == "Ready" and c.get("status") == "True" for c in conditions)
|
||||
blocked_true = any(c.get("type") == "Blocked" and c.get("status") == "True" for c in conditions)
|
||||
status_value = status.get("status", "")
|
||||
reason = status.get("reason_code", "")
|
||||
final_reason = reason
|
||||
stable_degraded_unknown = status_value == "unknown" and reason == "status_endpoint_unreachable"
|
||||
stable_ready = status_value == "ready" and ready_true
|
||||
if (stable_ready or stable_degraded_unknown) and not blocked_true:
|
||||
consecutive += 1
|
||||
else:
|
||||
consecutive = 0
|
||||
max_consecutive = max(max_consecutive, consecutive)
|
||||
observations.append(
|
||||
f"{attempt}: status={status_value} reason={reason} ready_true={str(ready_true).lower()} "
|
||||
f"blocked_true={str(blocked_true).lower()} consecutive_stable={consecutive}"
|
||||
)
|
||||
if consecutive >= 3:
|
||||
break
|
||||
time.sleep(3)
|
||||
|
||||
(out / "observations.txt").write_text("\n".join(observations) + "\n", encoding="utf-8")
|
||||
status = "ok" if consecutive >= 3 else "failed"
|
||||
with open(out / "convergence-summary.txt", "w", encoding="utf-8") as f:
|
||||
f.write(f"restart_status_boundary={status}\n")
|
||||
f.write(f"volume_id={volume_id}\n")
|
||||
f.write(f"required_consecutive_stable=3\n")
|
||||
f.write(f"max_consecutive_stable={max_consecutive}\n")
|
||||
f.write(f"final_reason={final_reason or 'unknown'}\n")
|
||||
f.write("evidence=observations.txt\n")
|
||||
if status != "ok":
|
||||
raise SystemExit("post-restart status did not reach a stable safe surface")
|
||||
finally:
|
||||
pf.terminate()
|
||||
try:
|
||||
pf.wait(timeout=5)
|
||||
except subprocess.TimeoutExpired:
|
||||
pf.kill()
|
||||
pf.wait(timeout=5)
|
||||
pf_log.close()
|
||||
PY
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart/convergence/convergence-summary.txt"
|
||||
pattern: "^restart_status_boundary=ok$"
|
||||
save_as: restart_status_boundary_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_status_boundary_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/after-restart/convergence/convergence-summary.txt"
|
||||
pattern: "^max_consecutive_stable=3$"
|
||||
save_as: restart_consecutive_stable_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_consecutive_stable_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 9m
|
||||
cmd: "mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/cleanup/diagnostics; kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/cleanup/diagnostics/kube-system.before-cleanup.txt 2>&1 || true; helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod -l sw-block-test=multi-volume --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pod -l sw-block-test=multi-volume-reattach --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pod sw-block-multi-writer-1 sw-block-multi-reader-1 sw-block-multi-reattach-reader-1 --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-multi-pvc-1 --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-multi sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n rm -rf /var/lib/sw-block/testops-{{ run_id }}-rf3-promotion-restart; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLEANUP_HOSTPATH_PREFIX: "testops-{{ run_id }}-rf3-promotion-restart"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-rf3-promotion-restart"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,221 @@
|
||||
# Runner-native Phase 21 D3a Helm single-node first-volume chain.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the README-friendly single-node product path. This can run on a
|
||||
# real single-node Linux k3s lab, or on the 3-node lab by selecting one node
|
||||
# and pinning the writer/reader pods to that same node.
|
||||
#
|
||||
# Product boundary:
|
||||
# This is RF=1 / loopback / first-volume evidence. It is not an HA claim.
|
||||
|
||||
name: helm-single-node-first-volume-chain
|
||||
timeout: 22m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
single_node: "m02"
|
||||
sw_block_image: "ghcr.io/seaweedfs/seaweed-block:sha-28a99ce4f644"
|
||||
sw_block_csi_image: "ghcr.io/seaweedfs/seaweed-block-csi:sha-28a99ce4f644"
|
||||
sw_block_ref: "sha-28a99ce4f644" # tested image tag (the artifact under test)
|
||||
sw_block_commit: "28a99ce4f644" # its commit sha
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: generate_single_node_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "helm version --short > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values/helm-version.txt && cd {{ product_root }} && bash scripts/generate-helm-values-day1.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_HELM_VALUES_OUT: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values/values.day1.yaml"
|
||||
env.SW_BLOCK_HELM_TARGET_NODE: "{{ single_node }}"
|
||||
env.SW_BLOCK_HELM_NODE_LIMIT: "1"
|
||||
env.SW_BLOCK_HELM_REPLICATION_FACTOR: "1"
|
||||
env.SW_BLOCK_ACTIVATION_IMAGE_MODE: "published"
|
||||
env.SW_BLOCK_IMAGE: "{{ sw_block_image }}"
|
||||
env.SW_BLOCK_CSI_IMAGE: "{{ sw_block_csi_image }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values/values.day1.yaml"
|
||||
pattern: "externalISCSI: false"
|
||||
save_as: external_iscsi_false_count
|
||||
- action: assert_greater
|
||||
actual: "{{ external_iscsi_false_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values/values.day1.yaml"
|
||||
pattern: "internalIP: \"127.0.0.1\""
|
||||
save_as: loopback_count
|
||||
- action: assert_greater
|
||||
actual: "{{ loopback_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values/values.day1.yaml"
|
||||
pattern: "kubernetesNode: \"{{ single_node }}\""
|
||||
save_as: selected_node_count
|
||||
- action: assert_greater
|
||||
actual: "{{ selected_node_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values/values.day1.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/helm-lint.txt && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values/values.day1.yaml --wait --timeout 5m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/helm-install.txt && kubectl -n {{ helm_namespace }} rollout status deploy/sw-blockmaster --timeout=180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/wait-blockmaster.txt && kubectl -n {{ helm_namespace }} rollout status deploy/sw-block-csi-controller --timeout=180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/wait-csi-controller.txt && kubectl -n {{ helm_namespace }} rollout status ds/sw-block-csi-node --timeout=180s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/wait-csi-node.txt && helm status {{ helm_release }} --namespace {{ helm_namespace }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/helm-status.txt && kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/kube-system-ready.txt && kubectl get sc sw-block-dynamic -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/storageclass.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/install/helm-status.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: first_volume_user_loop
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-basic-app-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app"
|
||||
env.SW_BLOCK_BASIC_APP_CLEANUP: "1"
|
||||
env.SW_BLOCK_BASIC_APP_NODE_SELECTOR: "{{ single_node }}"
|
||||
env.SW_BLOCK_INSTALL_MODE: "helm-single-node"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_HELM_VALUES_FILE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/values/values.day1.yaml"
|
||||
env.SW_BLOCK_IMAGE: "{{ sw_block_image }}"
|
||||
env.SW_BLOCK_CSI_IMAGE: "{{ sw_block_csi_image }}"
|
||||
|
||||
- name: first_volume_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app/first-volume-summary.txt"
|
||||
pattern: "^first_volume_status=ok$"
|
||||
save_as: first_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app/first-volume-summary.txt"
|
||||
pattern: "^install_mode=helm-single-node$"
|
||||
save_as: install_mode_count
|
||||
- action: assert_greater
|
||||
actual: "{{ install_mode_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app/first-volume-summary.txt"
|
||||
pattern: "^app_node_selector={{ single_node }}$"
|
||||
save_as: node_selector_count
|
||||
- action: assert_greater
|
||||
actual: "{{ node_selector_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app/first-volume-summary.txt"
|
||||
pattern: "^writer_verified=true$"
|
||||
save_as: writer_verified_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_verified_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app/first-volume-summary.txt"
|
||||
pattern: "^reader_verified=true$"
|
||||
save_as: reader_verified_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_verified_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app/status/report/index.html"
|
||||
pattern: "<html"
|
||||
save_as: report_html_count
|
||||
- action: assert_greater
|
||||
actual: "{{ report_html_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/basic-app/first-volume-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: first_volume_provenance
|
||||
actions:
|
||||
# Emit the common control-plane envelope so the shared qa-assert.sh accepts
|
||||
# this block bundle (docs/control-plane-product-contract.md §1). Reached only
|
||||
# after the first-volume asserts pass.
|
||||
- action: emit_provenance
|
||||
product: block
|
||||
tested_ref: "{{ sw_block_ref }}"
|
||||
tested_sha: "{{ sw_block_commit }}"
|
||||
__block_first_volume_ok: "{{ first_volume_ok_count }}"
|
||||
__block_writer_verified: "{{ writer_verified_count }}"
|
||||
__block_reader_verified: "{{ reader_verified_count }}"
|
||||
__block_basic_app_cleanup_ok: "{{ cleanup_ok_count }}"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh; kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/cleanup/kube-system-after-uninstall.txt 2>&1 || true"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,415 @@
|
||||
# Phase 31 D3: Helm single-node restart persistence gate.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the smallest Kubernetes user path survives a k3s/product restart when
|
||||
# Helm is installed with explicit hostPath restart persistence.
|
||||
#
|
||||
# Product boundary:
|
||||
# RF=1 / single selected Kubernetes node / loopback iSCSI / pod recreate
|
||||
# after restart. This is not an HA, node-loss, or disaster-recovery claim.
|
||||
|
||||
name: helm-single-node-restart-persistence-chain
|
||||
timeout: 30m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
single_node: "m02"
|
||||
sw_block_image: "sw-block:local"
|
||||
sw_block_csi_image: "sw-block-csi:local"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n rm -rf /var/lib/sw-block/testops-{{ run_id }}-restart-persistence; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/basic-app /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: build_sw_block_cli
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/bin/sw-block --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/bin/sw-block.version.txt"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/bin/sw-block.version.txt"
|
||||
pattern: "sw-block"
|
||||
save_as: sw_block_version_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sw_block_version_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: pin_build_alpha_images
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.SW_BLOCK_IMPORT_K3S: "1"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/pin_build"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE_ID="
|
||||
save_as: pin_image_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pin_image_id_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: generate_restart_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/values.restart.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} --target-node {{ single_node }} --node-limit 1 --restart-persistence hostpath --state-hostpath /var/lib/sw-block/testops-{{ run_id }}-restart-persistence > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/generate.stdout.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/generate.stdout.txt"
|
||||
pattern: "^restart_persistence_mode=hostpath$"
|
||||
save_as: restart_mode_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_mode_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/generate.stdout.txt"
|
||||
pattern: "^state_hostpath=/var/lib/sw-block/testops-{{ run_id }}-restart-persistence$"
|
||||
save_as: state_hostpath_stdout_count
|
||||
- action: assert_greater
|
||||
actual: "{{ state_hostpath_stdout_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/values.restart.yaml"
|
||||
pattern: "stateHostPath: /var/lib/sw-block/testops-{{ run_id }}-restart-persistence"
|
||||
save_as: state_hostpath_values_count
|
||||
- action: assert_greater
|
||||
actual: "{{ state_hostpath_values_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm lint charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/values.restart.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/install/helm-lint.txt && helm template {{ helm_release }} charts/seaweed-block -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/values.restart.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/install/helm-template.yaml && grep -q -- '--launcher-state-hostpath=/var/lib/sw-block/testops-{{ run_id }}-restart-persistence' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/install/helm-template.yaml && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/values.restart.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/install/helm-install.txt && kubectl -n {{ helm_namespace }} rollout status deploy/sw-blockmaster --timeout=180s && kubectl -n {{ helm_namespace }} rollout status deploy/sw-block-csi-controller --timeout=180s && kubectl -n {{ helm_namespace }} rollout status ds/sw-block-csi-node --timeout=180s && kubectl -n {{ helm_namespace }} get deploy,ds,pods,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/install/kube-system.after-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: first_volume_before_restart
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-basic-app-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/basic-app"
|
||||
env.SW_BLOCK_BASIC_APP_CLEANUP: "0"
|
||||
env.SW_BLOCK_BASIC_APP_NODE_SELECTOR: "{{ single_node }}"
|
||||
env.SW_BLOCK_INSTALL_MODE: "helm-single-node-restart-persistence"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_HELM_VALUES_FILE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/values/values.restart.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/basic-app/first-volume-summary.txt"
|
||||
pattern: "^first_volume_status=ok$"
|
||||
save_as: first_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/basic-app/reader.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: reader_before_restart_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_before_restart_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: restart_k3s_and_verify
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "set -e; date -u > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/restart-start.txt; sudo -n systemctl restart k3s; for i in $(seq 1 180); do if sudo -n k3s kubectl get nodes >/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/nodes.wait.txt 2>&1; then break; fi; sleep 2; done; sudo -n chmod 644 /etc/rancher/k3s/k3s.yaml; kubectl wait --for=condition=Ready node/{{ single_node }} --timeout=300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/wait-node-ready.txt; kubectl -n {{ helm_namespace }} rollout status deploy/sw-blockmaster --timeout=300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/wait-blockmaster.txt; kubectl -n {{ helm_namespace }} rollout status deploy/sw-block-csi-controller --timeout=300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/wait-csi-controller.txt; kubectl -n {{ helm_namespace }} rollout status ds/sw-block-csi-node --timeout=300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/wait-csi-node.txt; for d in $(kubectl -n default get deploy -l app=sw-blockvolume -o name); do kubectl -n default rollout status \"$d\" --timeout=300s; done > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/wait-blockvolumes.txt; kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/kube-system.after-restart.txt; kubectl -n default get pods,pvc,pv,deploy -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/default.after-restart.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/restart/wait-blockmaster.txt"
|
||||
pattern: "successfully rolled out"
|
||||
save_as: blockmaster_restart_ready_count
|
||||
- action: assert_greater
|
||||
actual: "{{ blockmaster_restart_ready_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: reader_after_restart
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "set -e; kubectl -n default delete pod sw-block-example-reader --ignore-not-found=true --wait=true --timeout=120s; kubectl apply -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/basic-app/reader-pod.rendered.yaml > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/apply-reader-after-restart.log; kubectl -n default wait --for=jsonpath='{.status.phase}'=Succeeded pod/sw-block-example-reader --timeout=240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/wait-reader-after-restart.log; kubectl -n default logs sw-block-example-reader > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/reader-after-restart.log; grep -q '/data/demo.bin: OK' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/reader-after-restart.log; port=$(/usr/bin/python3 - <<'PY'\nimport socket\ns=socket.socket(); s.bind(('127.0.0.1',0)); print(s.getsockname()[1]); s.close()\nPY\n); kubectl -n {{ helm_namespace }} port-forward deploy/sw-blockmaster ${port}:9333 > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/blockmaster-port-forward.log 2>&1 & pf=$!; trap 'kill $pf >/dev/null 2>&1 || true; wait $pf >/dev/null 2>&1 || true' EXIT; for i in $(seq 1 60); do if (echo >/dev/tcp/127.0.0.1/$port) >/dev/null 2>&1; then break; fi; sleep 1; done; /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/bin/sw-block ops cluster --master-api 127.0.0.1:${port} --timeout 30s -o json > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/cluster-after-restart.json; /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/bin/sw-block ops report --master-api 127.0.0.1:${port} --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/report > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/report.stdout.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/reader-after-restart.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: reader_after_restart_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_after_restart_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/report/summary.txt"
|
||||
pattern: "managed_volume=.*status=ready"
|
||||
save_as: managed_volume_ready_count
|
||||
- action: assert_greater
|
||||
actual: "{{ managed_volume_ready_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: post_restart_status_convergence
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 4m
|
||||
cmd: |
|
||||
set -e
|
||||
out=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/convergence
|
||||
mkdir -p "$out"
|
||||
python3 - "$out" <<'PY'
|
||||
import json
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
out = Path(sys.argv[1])
|
||||
root = Path("/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart")
|
||||
sw_block = root / "bin/sw-block"
|
||||
summary = root / "basic-app/first-volume-summary.txt"
|
||||
volume_id = ""
|
||||
for line in summary.read_text(encoding="utf-8").splitlines():
|
||||
if line.startswith("volume_id="):
|
||||
volume_id = line.split("=", 1)[1]
|
||||
break
|
||||
if not volume_id:
|
||||
raise SystemExit("volume_id unavailable")
|
||||
|
||||
def run(*args, **kwargs):
|
||||
return subprocess.run(args, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs)
|
||||
|
||||
pods = run(
|
||||
"kubectl", "-n", "{{ helm_namespace }}", "get", "pods",
|
||||
"-l", "app.kubernetes.io/component=blockmaster",
|
||||
"--field-selector=status.phase=Running",
|
||||
"-o", "json",
|
||||
check=True,
|
||||
)
|
||||
pod_items = json.loads(pods.stdout).get("items") or []
|
||||
if not pod_items:
|
||||
pods = run(
|
||||
"kubectl", "-n", "{{ helm_namespace }}", "get", "pods",
|
||||
"--field-selector=status.phase=Running",
|
||||
"-o", "json",
|
||||
check=True,
|
||||
)
|
||||
pod_items = [
|
||||
item for item in json.loads(pods.stdout).get("items") or []
|
||||
if item.get("metadata", {}).get("name", "").startswith("sw-blockmaster-")
|
||||
]
|
||||
ready_pod = ""
|
||||
for item in pod_items:
|
||||
conditions = {c.get("type"): c.get("status") for c in (item.get("status") or {}).get("conditions") or []}
|
||||
if conditions.get("Ready") == "True":
|
||||
ready_pod = item["metadata"]["name"]
|
||||
break
|
||||
if not ready_pod:
|
||||
raise SystemExit("no Ready blockmaster pod")
|
||||
(out / "blockmaster-pod.txt").write_text(ready_pod + "\n", encoding="utf-8")
|
||||
|
||||
sock = socket.socket()
|
||||
sock.bind(("127.0.0.1", 0))
|
||||
port = sock.getsockname()[1]
|
||||
sock.close()
|
||||
(out / "port.txt").write_text(str(port) + "\n", encoding="utf-8")
|
||||
|
||||
pf_log = open(out / "blockmaster-port-forward.log", "w", encoding="utf-8")
|
||||
pf = subprocess.Popen(
|
||||
["kubectl", "-n", "{{ helm_namespace }}", "port-forward", f"pod/{ready_pod}", f"{port}:9333"],
|
||||
stdout=pf_log,
|
||||
stderr=subprocess.STDOUT,
|
||||
text=True,
|
||||
)
|
||||
|
||||
def port_ready():
|
||||
try:
|
||||
with socket.create_connection(("127.0.0.1", port), timeout=1):
|
||||
return True
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
try:
|
||||
deadline = time.time() + 30
|
||||
while time.time() < deadline:
|
||||
if pf.poll() is not None:
|
||||
raise SystemExit("port-forward exited early")
|
||||
if port_ready():
|
||||
break
|
||||
time.sleep(0.5)
|
||||
else:
|
||||
raise SystemExit("port-forward did not become ready")
|
||||
|
||||
consecutive = 0
|
||||
max_consecutive = 0
|
||||
observations = []
|
||||
final_reason = ""
|
||||
for attempt in range(1, 31):
|
||||
report_dir = out / f"report-{attempt:02d}"
|
||||
evidence_dir = out / f"evidence-{attempt:02d}"
|
||||
proc = run(
|
||||
str(sw_block), "ops", "report",
|
||||
"--namespace", "default",
|
||||
"--master", f"127.0.0.1:{port}",
|
||||
"--out", str(report_dir),
|
||||
"--evidence-out", str(evidence_dir),
|
||||
"--timeout", "30s",
|
||||
)
|
||||
(out / f"report-{attempt:02d}.stdout.txt").write_text(proc.stdout, encoding="utf-8")
|
||||
(out / f"report-{attempt:02d}.stderr.txt").write_text(proc.stderr, encoding="utf-8")
|
||||
if proc.returncode != 0:
|
||||
observations.append(f"{attempt}: report_failed rc={proc.returncode}")
|
||||
consecutive = 0
|
||||
time.sleep(3)
|
||||
continue
|
||||
snap = json.loads((report_dir / "operator-snapshot.json").read_text(encoding="utf-8"))
|
||||
vols = snap.get("volumes") or []
|
||||
target = next((v for v in vols if (v.get("status") or {}).get("volume_id") == volume_id), None)
|
||||
if target is None:
|
||||
observations.append(f"{attempt}: volume_missing")
|
||||
consecutive = 0
|
||||
time.sleep(3)
|
||||
continue
|
||||
status = target.get("status") or {}
|
||||
conditions = status.get("conditions") or []
|
||||
ready_true = any(c.get("type") == "Ready" and c.get("status") == "True" for c in conditions)
|
||||
blocked_true = any(c.get("type") == "Blocked" and c.get("status") == "True" for c in conditions)
|
||||
status_value = status.get("status", "")
|
||||
reason = status.get("reason_code", "")
|
||||
final_reason = reason
|
||||
if status_value == "ready" and ready_true and not blocked_true:
|
||||
consecutive += 1
|
||||
else:
|
||||
consecutive = 0
|
||||
max_consecutive = max(max_consecutive, consecutive)
|
||||
observations.append(
|
||||
f"{attempt}: status={status_value} reason={reason} ready_true={str(ready_true).lower()} "
|
||||
f"blocked_true={str(blocked_true).lower()} consecutive_ready={consecutive}"
|
||||
)
|
||||
if consecutive >= 3:
|
||||
break
|
||||
time.sleep(3)
|
||||
|
||||
(out / "observations.txt").write_text("\n".join(observations) + "\n", encoding="utf-8")
|
||||
status = "ok" if consecutive >= 3 else "failed"
|
||||
with open(out / "convergence-summary.txt", "w", encoding="utf-8") as f:
|
||||
f.write(f"restart_status_convergence={status}\n")
|
||||
f.write(f"volume_id={volume_id}\n")
|
||||
f.write(f"required_consecutive_ready=3\n")
|
||||
f.write(f"max_consecutive_ready={max_consecutive}\n")
|
||||
f.write(f"final_reason={final_reason or 'unknown'}\n")
|
||||
f.write("evidence=observations.txt\n")
|
||||
if status != "ok":
|
||||
raise SystemExit("post-restart status did not converge to stable Ready")
|
||||
finally:
|
||||
pf.terminate()
|
||||
try:
|
||||
pf.wait(timeout=5)
|
||||
except subprocess.TimeoutExpired:
|
||||
pf.kill()
|
||||
pf.wait(timeout=5)
|
||||
pf_log.close()
|
||||
PY
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/convergence/convergence-summary.txt"
|
||||
pattern: "^restart_status_convergence=ok$"
|
||||
save_as: restart_convergence_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_convergence_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/after-restart/convergence/convergence-summary.txt"
|
||||
pattern: "^max_consecutive_ready=3$"
|
||||
save_as: restart_consecutive_ready_count
|
||||
- action: assert_greater
|
||||
actual: "{{ restart_consecutive_ready_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/cleanup/diagnostics; kubectl -n {{ helm_namespace }} get pods,deploy,ds,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/cleanup/diagnostics/kube-system.before-cleanup.txt 2>&1 || true; kubectl -n {{ helm_namespace }} logs deploy/sw-blockmaster --all-containers=true --tail=200 > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/cleanup/diagnostics/blockmaster.before-cleanup.log 2>&1 || true; kubectl -n {{ helm_namespace }} get events --sort-by=.lastTimestamp > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/cleanup/diagnostics/events.before-cleanup.txt 2>&1 || true; helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 300s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/cleanup/helm-uninstall.txt || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example --ignore-not-found=true --wait=true --timeout=120s; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; sudo -n rm -rf /var/lib/sw-block/testops-{{ run_id }}-restart-persistence; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLEANUP_HOSTPATH_PREFIX: "testops-{{ run_id }}-restart-persistence"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "test ! -e /var/lib/sw-block/testops-{{ run_id }}-restart-persistence"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-single-node-restart"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,272 @@
|
||||
# Runner-native Phase 26 D4 gate: Helm support bundle diagnostics.
|
||||
#
|
||||
# Goal:
|
||||
# Prove a Helm-installed first-volume run produces a cold, read-only support
|
||||
# bundle that can be consumed later by sw-block ops report/explain/timeline.
|
||||
# Also prove a blocked ImagePullBackOff bundle explains itself without a live
|
||||
# cluster.
|
||||
|
||||
name: helm-support-bundle-diagnostics-chain
|
||||
timeout: 30m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
helm_release: "sw-block"
|
||||
helm_namespace: "kube-system"
|
||||
sw_block_image: "sw-block:phase26-d4"
|
||||
sw_block_csi_image: "sw-block-csi:phase26-d4"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 180s || true; kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; kubectl delete clusterrole/sw-block-csi clusterrolebinding/sw-block-csi --ignore-not-found=true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/values /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/install /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/blocked-bundle/demo /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/cleanup"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
|
||||
- name: build_and_generate_values
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && SW_BLOCK_IMAGE={{ sw_block_image }} SW_BLOCK_CSI_IMAGE={{ sw_block_csi_image }} SW_BLOCK_IMPORT_K3S=1 SW_BLOCK_IMPORT_K3S_NODES='192.168.1.181,192.168.1.188' SW_BLOCK_IMPORT_K3S_SSH_USER=testdev SW_BLOCK_IMPORT_K3S_SSH_KEY=/opt/work/testdev_key SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/build bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE={{ sw_block_image }}"
|
||||
save_as: local_image_built_count
|
||||
- action: assert_greater
|
||||
actual: "{{ local_image_built_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/bin/sw-block ./cmd/sw-block && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/bin/sw-block ops generate-helm-values --kubeconfig /etc/rancher/k3s/k3s.yaml --out /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/values/values.day1.yaml --image {{ sw_block_image }} --csi-image {{ sw_block_csi_image }} > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/values/generate.stdout.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/values/generate.stdout.txt"
|
||||
pattern: "helm_values_status=ok"
|
||||
save_as: generator_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generator_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_install_stack
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && helm install {{ helm_release }} charts/seaweed-block --namespace {{ helm_namespace }} --create-namespace -f /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/values/values.day1.yaml --wait --timeout 10m > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/install/helm-install.txt && kubectl -n {{ helm_namespace }} get deploy,ds,pods,svc -o wide > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/install/kube-system.after-install.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/install/helm-install.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_deployed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_deployed_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: first_volume_kept_for_bundle
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-basic-app-example.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app"
|
||||
env.SW_BLOCK_BASIC_APP_CLEANUP: "0"
|
||||
env.SW_BLOCK_INSTALL_MODE: "helm"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_HELM_VALUES_FILE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/values/values.day1.yaml"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app/first-volume-summary.txt"
|
||||
pattern: "^first_volume_status=ok$"
|
||||
save_as: first_volume_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_ok_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: collect_support_bundle
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && bash scripts/collect-helm-support-bundle.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_SUPPORT_BUNDLE_SOURCE: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app"
|
||||
env.SW_BLOCK_SUPPORT_BUNDLE_OUT: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app/support-bundle"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
env.SW_BLOCK_CLI: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/bin/sw-block"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app/support-bundle/support-bundle-summary.txt"
|
||||
pattern: "^support_bundle_status=ok$"
|
||||
save_as: support_bundle_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ support_bundle_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app/support-bundle/support-bundle-summary.txt"
|
||||
pattern: "^read_only=true$"
|
||||
save_as: support_bundle_readonly_count
|
||||
- action: assert_greater
|
||||
actual: "{{ support_bundle_readonly_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app/support-bundle/replayed-report/summary.txt"
|
||||
pattern: "^status=ok$"
|
||||
save_as: replayed_report_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ replayed_report_ok_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app/support-bundle/explain.txt"
|
||||
pattern: "managed_volume "
|
||||
save_as: explain_managed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ explain_managed_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app/support-bundle/helm/status.txt"
|
||||
pattern: "STATUS: deployed"
|
||||
save_as: helm_status_bundle_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_status_bundle_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/basic-app/support-bundle/k8s/pods.txt"
|
||||
pattern: "sw-block"
|
||||
save_as: k8s_pods_bundle_count
|
||||
- action: assert_greater
|
||||
actual: "{{ k8s_pods_bundle_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: blocked_bundle_asserts
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 2m
|
||||
cmd: "cat > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/blocked-bundle/demo/kube-system-pods-deploys.txt <<'EOF'\nNAME READY STATUS RESTARTS AGE IP NODE\npod/sw-block-csi-node-n948t 0/2 ImagePullBackOff 0 2m3s 192.168.1.184 m02\ndeployment.apps/sw-block-csi-controller 1/1 1 1 2m3s block-csi sw-block-csi:local\nEOF\n/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/bin/sw-block ops explain volume --from-bundle /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/blocked-bundle pvc-blocked > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/blocked-bundle/explain.txt"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/blocked-bundle/explain.txt"
|
||||
pattern: "reason=csi_node_image_pull_failed"
|
||||
save_as: blocked_reason_count
|
||||
- action: assert_greater
|
||||
actual: "{{ blocked_reason_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/blocked-bundle/explain.txt"
|
||||
pattern: "ImagePullBackOff"
|
||||
save_as: blocked_image_pull_count
|
||||
- action: assert_greater
|
||||
actual: "{{ blocked_image_pull_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: failure_snapshot
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash scripts/collect-k8s-failure-snapshot.sh {{ product_root }}"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_FAILURE_SNAPSHOT_OUT: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/failure-snapshot"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/failure-snapshot/failure-snapshot-summary.txt"
|
||||
pattern: "^read_only=true$"
|
||||
save_as: failure_snapshot_readonly_count
|
||||
- action: assert_greater
|
||||
actual: "{{ failure_snapshot_readonly_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/failure-snapshot/k8s/events-all.txt"
|
||||
pattern: "."
|
||||
save_as: failure_snapshot_events_count
|
||||
- action: assert_greater
|
||||
actual: "{{ failure_snapshot_events_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/failure-snapshot/logs/csi-node.current.log"
|
||||
pattern: "."
|
||||
save_as: failure_snapshot_csi_log_count
|
||||
- action: assert_greater
|
||||
actual: "{{ failure_snapshot_csi_log_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/failure-snapshot/host/iscsi-nodes.txt"
|
||||
pattern: "."
|
||||
save_as: failure_snapshot_iscsi_nodes_count
|
||||
- action: assert_greater
|
||||
actual: "{{ failure_snapshot_iscsi_nodes_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/failure-snapshot/host/processes.txt"
|
||||
pattern: "."
|
||||
save_as: failure_snapshot_process_count
|
||||
- action: assert_greater
|
||||
actual: "{{ failure_snapshot_process_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: helm_uninstall_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "kubectl -n default delete pod sw-block-example-reader sw-block-example-writer --ignore-not-found=true --wait=true --timeout=120s; kubectl -n default delete pvc sw-block-example-pvc --ignore-not-found=true --wait=true --timeout=120s; kubectl delete storageclass sw-block-example sw-block-dynamic --ignore-not-found=true --wait=true --timeout=120s; helm status {{ helm_release }} --namespace {{ helm_namespace }} >/dev/null 2>&1 && helm uninstall {{ helm_release }} --namespace {{ helm_namespace }} --wait --timeout 240s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/cleanup/helm-uninstall.txt || true; sudo -n iscsiadm -m node 2>/dev/null | awk '/io.seaweedfs/ {print $1, $2}' | while read portal target; do sudo -n iscsiadm -m node -T \"$target\" -p \"$portal\" -o delete || true; done; cd {{ product_root }} && bash scripts/verify-helm-cleanup.sh"
|
||||
env.KUBECONFIG: "/etc/rancher/k3s/k3s.yaml"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/cleanup/verify"
|
||||
env.SW_BLOCK_HELM_RELEASE: "{{ helm_release }}"
|
||||
env.SW_BLOCK_HELM_NAMESPACE: "{{ helm_namespace }}"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-helm-support-bundle/cleanup/verify/cleanup-summary.txt"
|
||||
pattern: "^cleanup_status=ok$"
|
||||
save_as: helm_cleanup_ok_count
|
||||
- action: assert_greater
|
||||
actual: "{{ helm_cleanup_ok_count }}"
|
||||
threshold: "0"
|
||||
@@ -0,0 +1,137 @@
|
||||
# Runner-native iSCSI OS-initiator compatibility gate.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the Linux open-iscsi path against a real kernel initiator:
|
||||
# iscsiadm discovery/login -> mkfs.ext4 -> mount -> write/read checksum
|
||||
# -> optional fio stress -> logout -> no residue.
|
||||
#
|
||||
# This is an iSCSI correctness gate. It is not a performance, HA, multipath,
|
||||
# Windows, or Kubernetes claim.
|
||||
#
|
||||
# Expected invocation:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/iscsi-os-initiator-compat-chain.yaml
|
||||
|
||||
name: iscsi-os-initiator-compat-chain
|
||||
timeout: 20m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
os_iterations: "1"
|
||||
os_stress: "fio"
|
||||
os_fio_runtime: "60"
|
||||
os_fio_size: "128m"
|
||||
durable_blocks: "65536"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/pin_build /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: pin_build
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && git rev-parse HEAD > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/pin_build/git.sha && git status --porcelain > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/pin_build/git.status && test ! -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/pin_build/git.status && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/bin/blockmaster ./cmd/blockmaster && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/bin/blockvolume ./cmd/blockvolume"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/bin/blockmaster --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/pin_build/blockmaster.version.txt && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/bin/blockvolume --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/pin_build/blockvolume.version.txt"
|
||||
|
||||
- name: os_initiator_smoke
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "sudo dmesg > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke/dmesg.before.txt 2>&1 || true"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 12m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-iscsi-os-smoke.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke"
|
||||
env.SW_BLOCK_BIN_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/bin"
|
||||
env.SW_BLOCK_ISCSI_ITERATIONS: "{{ os_iterations }}"
|
||||
env.SW_BLOCK_ISCSI_STRESS: "{{ os_stress }}"
|
||||
env.SW_BLOCK_ISCSI_FIO_RUNTIME: "{{ os_fio_runtime }}"
|
||||
env.SW_BLOCK_ISCSI_FIO_SIZE: "{{ os_fio_size }}"
|
||||
env.SW_BLOCK_DURABLE_BLOCKS: "{{ durable_blocks }}"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "sudo dmesg > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke/dmesg.after.txt 2>&1 || true"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "python3 - <<'PY'\nimport re, sys\nbase = '/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke'\nts_re = re.compile(r'^\\[\\s*([0-9]+(?:\\.[0-9]+)?)\\]')\ndef read_lines(name):\n with open(base + '/' + name, encoding='utf-8', errors='replace') as f:\n return f.read().splitlines()\ndef ts(line):\n m = ts_re.match(line)\n return float(m.group(1)) if m else None\nbefore = read_lines('dmesg.before.txt')\nafter = read_lines('dmesg.after.txt')\nbefore_ts = [v for v in (ts(line) for line in before) if v is not None]\nif before_ts:\n cutoff = max(before_ts)\n new = [line for line in after if (ts(line) is not None and ts(line) > cutoff)]\nelse:\n i = 0\n while i < len(before) and i < len(after) and before[i] == after[i]:\n i += 1\n new = after[i:]\nwith open(base + '/dmesg.new.txt', 'w', encoding='utf-8') as f:\n f.write('\\n'.join(new))\n if new:\n f.write('\\n')\nbad = re.compile(r'DID_BAD_TARGET|I/O error|Buffer I/O|rejecting I/O|blk_update_request|connection.*failed', re.I)\nhits = [line for line in new if bad.search(line)]\nif hits:\n print('\\n'.join(hits), file=sys.stderr)\n sys.exit(1)\nPY"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke/run.log"
|
||||
pattern: "\\[iscsi-os\\] PASS:"
|
||||
save_as: os_pass_count
|
||||
- action: assert_greater
|
||||
actual: "{{ os_pass_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke/mkfs.iter1.log"
|
||||
pattern: "Writing superblocks and filesystem accounting information"
|
||||
save_as: mkfs_success_count
|
||||
- action: assert_greater
|
||||
actual: "{{ mkfs_success_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke/sha256-check.iter1.log"
|
||||
pattern: "payload.iter1.bin: OK"
|
||||
save_as: checksum_success_count
|
||||
- action: assert_greater
|
||||
actual: "{{ checksum_success_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat/os_smoke/fio.iter1.log"
|
||||
pattern: "err= 0"
|
||||
save_as: fio_success_count
|
||||
- action: assert_greater
|
||||
actual: "{{ fio_success_count }}"
|
||||
threshold: "0"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-os-compat"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -7,11 +7,8 @@
|
||||
#
|
||||
# Expected invocation from sw-test-runner-standalone:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/node-a \
|
||||
# -env ssh_key=/path/to/ssh/key/on/controller \
|
||||
# -env node_host=192.0.2.10 \
|
||||
# -env node_user=tester \
|
||||
# -env artifact_root=/path/to/shared/artifacts \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/iscsi-p6-alua-failover-chain.yaml
|
||||
|
||||
name: iscsi-p6-alua-failover-chain
|
||||
@@ -19,50 +16,46 @@ timeout: 25m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "" # private key for node_user; set with -env ssh_key=<path>
|
||||
node_host: "" # address of the test node; set with -env node_host=<address>
|
||||
node_user: "" # ssh user on the test node; set with -env node_user=<user>
|
||||
artifact_root: "" # shared artifact directory; set with -env artifact_root=<path>
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
node-a:
|
||||
host: "{{ node_host }}"
|
||||
user: "{{ node_user }}"
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: node-a
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
unmount: "/tmp/sw-block-iscsi-failover/mnt,/tmp/sw-block-iscsi-mpath/mnt"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: node-a
|
||||
cmd: "case \"$SW_BLOCK_ARTIFACT_ROOT\" in /?*) ;; *) echo 'artifact_root must be an absolute path other than /' >&2; exit 2;; esac; case \"$SW_BLOCK_ARTIFACT_ROOT\" in *[!A-Za-z0-9._/-]*) echo 'artifact_root may use only A-Za-z0-9._/-' >&2; exit 2;; esac; rm -rf $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p6-chain && mkdir -p $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover"
|
||||
env.SW_BLOCK_ARTIFACT_ROOT: "{{ artifact_root }}"
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: pin_build
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && go build -o {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin/blockmaster ./cmd/blockmaster && go build -o {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin/blockvolume ./cmd/blockvolume"
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin/blockmaster ./cmd/blockmaster && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin/blockvolume ./cmd/blockvolume"
|
||||
- action: exec
|
||||
node: node-a
|
||||
cmd: "cd {{ product_root }} && git rev-parse HEAD > {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/git.sha && git status --short > {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/git.status && {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin/blockmaster --version > {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/blockmaster.version.txt && {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin/blockvolume --version > {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/blockvolume.version.txt"
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && git rev-parse HEAD > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/git.sha && git status --short > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/git.status && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin/blockmaster --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/blockmaster.version.txt && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin/blockvolume --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/blockvolume.version.txt"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/blockvolume.version.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/pin_build/blockvolume.version.txt"
|
||||
pattern: "blockvolume revision="
|
||||
save_as: blockvolume_version_count
|
||||
- action: assert_greater
|
||||
@@ -72,16 +65,16 @@ phases:
|
||||
- name: alua_multipath
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-iscsi-alua-multipath-smoke.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath"
|
||||
env.SW_BLOCK_BIN_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath"
|
||||
env.SW_BLOCK_BIN_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin"
|
||||
|
||||
# Bash-level gate: smoke's own PASS line ran.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/run.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/run.log"
|
||||
pattern: "\\[iscsi-mpath\\] PASS:"
|
||||
save_as: alua_pass_count
|
||||
- action: assert_greater
|
||||
@@ -90,8 +83,8 @@ phases:
|
||||
|
||||
# Field-level gate: one path reports Active/Optimized.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/run.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/run.log"
|
||||
pattern: "rtpg_state_r1=0x00"
|
||||
save_as: r1_active_optimized_count
|
||||
- action: assert_greater
|
||||
@@ -100,8 +93,8 @@ phases:
|
||||
|
||||
# Field-level gate: standby path reports ALUA standby, not unavailable.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/run.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/run.log"
|
||||
pattern: "rtpg_state_r2=0x02"
|
||||
save_as: r2_standby_count
|
||||
- action: assert_greater
|
||||
@@ -110,16 +103,16 @@ phases:
|
||||
|
||||
# Field-level gate: VPD 0x83 contains path-distinguishing identity.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/sg_inq.r1.vpd83.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/sg_inq.r1.vpd83.txt"
|
||||
pattern: "Target port group"
|
||||
save_as: r1_vpd83_identity_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_vpd83_identity_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/sg_inq.r2.vpd83.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/sg_inq.r2.vpd83.txt"
|
||||
pattern: "Target port group"
|
||||
save_as: r2_vpd83_identity_count
|
||||
- action: assert_greater
|
||||
@@ -128,8 +121,8 @@ phases:
|
||||
|
||||
# Field-level gate: standby raw writes are rejected and surfaced as I/O errors.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/standby-write.stderr"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/standby-write.stderr"
|
||||
pattern: "Input/output error"
|
||||
save_as: standby_write_reject_count
|
||||
- action: assert_greater
|
||||
@@ -138,16 +131,16 @@ phases:
|
||||
|
||||
# Field-level gate: multipath groups both paths as one ALUA-handled map.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/multipath-map-name.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/multipath-map-name.txt"
|
||||
pattern: "mpath"
|
||||
save_as: multipath_map_name_count
|
||||
- action: assert_greater
|
||||
actual: "{{ multipath_map_name_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/multipath.ll.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/alua_multipath/multipath.ll.txt"
|
||||
pattern: "hwhandler='1 alua'"
|
||||
save_as: alua_handler_count
|
||||
- action: assert_greater
|
||||
@@ -155,25 +148,25 @@ phases:
|
||||
threshold: "0"
|
||||
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: mounted_failover
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-iscsi-alua-mounted-failover-smoke.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover"
|
||||
env.SW_BLOCK_BIN_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover"
|
||||
env.SW_BLOCK_BIN_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/bin"
|
||||
|
||||
# Bash-level gate: smoke's own PASS line ran.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/run.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/run.log"
|
||||
pattern: "\\[iscsi-failover\\] PASS:"
|
||||
save_as: failover_pass_count
|
||||
- action: assert_greater
|
||||
@@ -182,16 +175,16 @@ phases:
|
||||
|
||||
# Mounted workload survived the primary kill.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/pre-check-after-failover.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/pre-check-after-failover.log"
|
||||
pattern: "/pre.bin: OK"
|
||||
save_as: pre_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pre_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/post-check.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/post-check.log"
|
||||
pattern: "/post.bin: OK"
|
||||
save_as: post_checksum_count
|
||||
- action: assert_greater
|
||||
@@ -200,24 +193,24 @@ phases:
|
||||
|
||||
# Field-level gate: r2 promoted at epoch 2 and is frontend-ready.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/status-r2-healthy.json"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/status-r2-healthy.json"
|
||||
pattern: "\"Epoch\":2"
|
||||
save_as: r2_epoch2_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_epoch2_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/status-r2-healthy.json"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/status-r2-healthy.json"
|
||||
pattern: "\"AuthorityRole\":\"primary\""
|
||||
save_as: r2_role_primary_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_role_primary_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/status-r2-healthy.json"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/status-r2-healthy.json"
|
||||
pattern: "\"FrontendPrimaryReady\":true"
|
||||
save_as: r2_frontend_ready_count
|
||||
- action: assert_greater
|
||||
@@ -226,8 +219,8 @@ phases:
|
||||
|
||||
# Field-level gate: r2's ALUA state becomes Active/Optimized after failover.
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/sg_rtpg.r2.after.txt"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/mounted_failover/sg_rtpg.r2.after.txt"
|
||||
pattern: "asymmetric access state"
|
||||
save_as: r2_after_active_optimized_count
|
||||
- action: assert_greater
|
||||
@@ -235,35 +228,35 @@ phases:
|
||||
threshold: "0"
|
||||
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: final_asserts
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
cmd: "sudo iscsiadm -m session > {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/iscsi-sessions.final.txt 2>&1 || true; sudo multipath -ll > {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain/multipath.final.txt 2>&1 || true"
|
||||
node: m02
|
||||
cmd: "sudo iscsiadm -m session > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/iscsi-sessions.final.txt 2>&1 || true; sudo multipath -ll > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain/multipath.final.txt 2>&1 || true"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: node-a
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
unmount: "/tmp/sw-block-iscsi-failover/mnt,/tmp/sw-block-iscsi-mpath/mnt"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: collect_path
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p6-chain"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p6-chain"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -6,11 +6,8 @@
|
||||
#
|
||||
# Expected invocation from sw-test-runner-standalone:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/node-a \
|
||||
# -env ssh_key=/path/to/ssh/key/on/controller \
|
||||
# -env node_host=192.0.2.10 \
|
||||
# -env node_user=tester \
|
||||
# -env artifact_root=/path/to/shared/artifacts \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/iscsi-p8-compat-soak-chain.yaml
|
||||
|
||||
name: iscsi-p8-compat-soak-chain
|
||||
@@ -18,10 +15,7 @@ timeout: 35m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "" # private key for node_user; set with -env ssh_key=<path>
|
||||
node_host: "" # address of the test node; set with -env node_host=<address>
|
||||
node_user: "" # ssh user on the test node; set with -env node_user=<user>
|
||||
artifact_root: "" # shared artifact directory; set with -env artifact_root=<path>
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
os_iterations: "2"
|
||||
os_fio_runtime: "120"
|
||||
os_fio_size: "128m"
|
||||
@@ -29,48 +23,47 @@ env:
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
node-a:
|
||||
host: "{{ node_host }}"
|
||||
user: "{{ node_user }}"
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: node-a
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: node-a
|
||||
cmd: "case \"$SW_BLOCK_ARTIFACT_ROOT\" in /?*) ;; *) echo 'artifact_root must be an absolute path other than /' >&2; exit 2;; esac; case \"$SW_BLOCK_ARTIFACT_ROOT\" in *[!A-Za-z0-9._/-]*) echo 'artifact_root may use only A-Za-z0-9._/-' >&2; exit 2;; esac; rm -rf $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p8-chain && mkdir -p $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p8-chain/os_fio_repeat $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_fio $SW_BLOCK_ARTIFACT_ROOT/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_attach_detach"
|
||||
env.SW_BLOCK_ARTIFACT_ROOT: "{{ artifact_root }}"
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/os_fio_repeat /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_fio /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_attach_detach"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: pin_build
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && go build -o {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin/blockmaster ./cmd/blockmaster && go build -o {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin/blockvolume ./cmd/blockvolume"
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin/blockmaster ./cmd/blockmaster && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin/blockvolume ./cmd/blockvolume"
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.SW_BLOCK_IMPORT_K3S: "1"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build"
|
||||
- action: exec
|
||||
node: node-a
|
||||
cmd: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin/blockmaster --version > {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/blockmaster.version.txt && {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin/blockvolume --version > {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/blockvolume.version.txt"
|
||||
node: m02
|
||||
cmd: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin/blockmaster --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/blockmaster.version.txt && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin/blockvolume --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/blockvolume.version.txt"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/alpha-images.env"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE_ID="
|
||||
save_as: pin_image_id_count
|
||||
- action: assert_greater
|
||||
@@ -80,86 +73,86 @@ phases:
|
||||
- name: os_fio_repeat
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 12m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-iscsi-os-smoke.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/os_fio_repeat"
|
||||
env.SW_BLOCK_BIN_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/os_fio_repeat"
|
||||
env.SW_BLOCK_BIN_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/bin"
|
||||
env.SW_BLOCK_ISCSI_ITERATIONS: "{{ os_iterations }}"
|
||||
env.SW_BLOCK_ISCSI_STRESS: "fio"
|
||||
env.SW_BLOCK_ISCSI_FIO_RUNTIME: "{{ os_fio_runtime }}"
|
||||
env.SW_BLOCK_ISCSI_FIO_SIZE: "{{ os_fio_size }}"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/os_fio_repeat/run.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/os_fio_repeat/run.log"
|
||||
pattern: "\\[iscsi-os\\] PASS:"
|
||||
save_as: os_pass_count
|
||||
- action: assert_greater
|
||||
actual: "{{ os_pass_count }}"
|
||||
threshold: "0"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: k8s_fio
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-k8s-alpha-fio.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ALPHA_IMAGES_ENV: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/alpha-images.env"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_fio"
|
||||
env.SW_BLOCK_ALPHA_IMAGES_ENV: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/alpha-images.env"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_fio"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_fio/run.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_fio/run.log"
|
||||
pattern: "\\[alpha-fio\\] PASS:"
|
||||
save_as: k8s_fio_pass_count
|
||||
- action: assert_greater
|
||||
actual: "{{ k8s_fio_pass_count }}"
|
||||
threshold: "0"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: k8s_attach_detach
|
||||
actions:
|
||||
- action: exec
|
||||
node: node-a
|
||||
node: m02
|
||||
timeout: 12m
|
||||
cmd: "cd {{ product_root }} && set -a && . {{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/alpha-images.env && set +a && bash scripts/run-k8s-attach-detach-loop.sh {{ product_root }}"
|
||||
cmd: "cd {{ product_root }} && set -a && . /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/pin_build/alpha-images.env && set +a && bash scripts/run-k8s-attach-detach-loop.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ATTACH_DETACH_ITERATIONS: "{{ attach_iterations }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_attach_detach"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_attach_detach"
|
||||
- action: grep_log
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_attach_detach/summary.log"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain/k8s_attach_detach/summary.log"
|
||||
pattern: "\\[attach-loop\\] PASS:"
|
||||
save_as: attach_pass_count
|
||||
- action: assert_greater
|
||||
actual: "{{ attach_pass_count }}"
|
||||
threshold: "0"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: node-a
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: node-a
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: node-a
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: collect_path
|
||||
node: node-a
|
||||
path: "{{ artifact_root }}/g15d-k8s/{{ run_id }}-iscsi-p8-chain"
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-p8-chain"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,408 @@
|
||||
# Runner-native iSCSI returned-replica reintegration chain.
|
||||
#
|
||||
# Goal:
|
||||
# Exercise a real RF=2 iSCSI ALUA mounted failover, then restart the old
|
||||
# primary and assert it returns as a non-frontend replica while r2 remains
|
||||
# primary. This is the integration companion to returned-replica-component-gate.
|
||||
#
|
||||
# Expected invocation:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/iscsi-returned-replica-chain.yaml
|
||||
|
||||
name: iscsi-returned-replica-chain
|
||||
timeout: 18m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
unmount: "/tmp/sw-block-iscsi-returned/mnt"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/pin_build /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: pin_build
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin/blockmaster ./cmd/blockmaster && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin/blockvolume ./cmd/blockvolume && go build -o /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin/sw-block ./cmd/sw-block"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && git rev-parse HEAD > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/pin_build/git.sha && git status --short > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/pin_build/git.status && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin/blockmaster --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/pin_build/blockmaster.version.txt && /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin/blockvolume --version > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/pin_build/blockvolume.version.txt"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/pin_build/blockvolume.version.txt"
|
||||
pattern: "blockvolume revision="
|
||||
save_as: blockvolume_version_count
|
||||
- action: assert_greater
|
||||
actual: "{{ blockvolume_version_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: returned_failover
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash scripts/run-iscsi-alua-mounted-failover-smoke.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover"
|
||||
env.SW_BLOCK_BIN_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin"
|
||||
env.SW_BLOCK_ISCSI_FAILOVER_WORK_DIR: "/tmp/sw-block-iscsi-returned"
|
||||
env.SW_BLOCK_RETURN_R1_AFTER_FAILOVER: "1"
|
||||
env.SW_BLOCK_DEGRADED_PROBE_INTERVAL: "1s"
|
||||
env.SW_BLOCK_DEGRADED_PROBE_COOLDOWN_BASE: "1s"
|
||||
env.SW_BLOCK_DEGRADED_PROBE_COOLDOWN_CAP: "3s"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/run.log"
|
||||
pattern: "\\[iscsi-failover\\] PASS:"
|
||||
save_as: failover_pass_count
|
||||
- action: assert_greater
|
||||
actual: "{{ failover_pass_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/run.log"
|
||||
pattern: "restart returned r1 after r2 promotion"
|
||||
save_as: r1_return_phase_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_return_phase_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/pre-check-after-failover.log"
|
||||
pattern: "/pre.bin: OK"
|
||||
save_as: pre_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ pre_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/post-check.log"
|
||||
pattern: "/post.bin: OK"
|
||||
save_as: post_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ post_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-healthy.json"
|
||||
pattern: "\"AuthorityRole\":\"primary\""
|
||||
save_as: r2_primary_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_primary_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r1-returned.summary"
|
||||
pattern: "^authority_non_primary=true$"
|
||||
save_as: r1_nonprimary_summary_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_nonprimary_summary_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r1-returned.summary"
|
||||
pattern: "^frontend_primary_ready=false$"
|
||||
save_as: r1_frontend_not_ready_summary_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_frontend_not_ready_summary_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r1-returned.summary"
|
||||
pattern: "^healthy=false$"
|
||||
save_as: r1_not_healthy_summary_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_not_healthy_summary_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-after-r1-return.json"
|
||||
pattern: "\"AuthorityRole\":\"primary\""
|
||||
save_as: r2_still_primary_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_still_primary_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-after-r1-return.json"
|
||||
pattern: "\"FrontendPrimaryReady\":true"
|
||||
save_as: r2_still_frontend_ready_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_still_frontend_ready_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-after-r1-return.json"
|
||||
pattern: "\"Healthy\":true"
|
||||
save_as: r2_still_healthy_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_still_healthy_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-peers-after-r1-return.json"
|
||||
pattern: "\"ReplicaID\":\"r1\""
|
||||
save_as: r1_peer_present_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_peer_present_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-peers-after-r1-return.json"
|
||||
pattern: "\"State\":\"healthy\""
|
||||
save_as: r1_peer_healthy_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_peer_healthy_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-peers-after-r1-return.json"
|
||||
pattern: "\"Epoch\":2"
|
||||
save_as: r1_peer_epoch_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_peer_epoch_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-peers-after-r1-return.json"
|
||||
pattern: "\"ProbeInFlight\":false"
|
||||
save_as: r1_peer_probe_idle_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_peer_probe_idle_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-r2-peers-after-r1-return.json"
|
||||
pattern: "\"Closed\":false"
|
||||
save_as: r1_peer_open_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_peer_open_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/blockvolume-r1-returned.log"
|
||||
pattern: "durable recovered: recovered LSN="
|
||||
save_as: r1_returned_local_recovery_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_returned_local_recovery_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/blockvolume-r1-returned.log"
|
||||
pattern: "admitted as SUPPORTING replica r1"
|
||||
save_as: r1_returned_supersede_observed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r1_returned_supersede_observed_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-durable-r2-primary-after-r1-return.summary"
|
||||
pattern: "^replica=r2$"
|
||||
save_as: r2_durable_replica_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_durable_replica_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-durable-r2-primary-after-r1-return.summary"
|
||||
pattern: "^epoch_gte_2=true$"
|
||||
save_as: r2_durable_epoch_gte_2_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_durable_epoch_gte_2_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/status-durable-r2-primary-after-r1-return.summary"
|
||||
pattern: "^operational=true$"
|
||||
save_as: r2_durable_operational_count
|
||||
- action: assert_greater
|
||||
actual: "{{ r2_durable_operational_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 2m
|
||||
cmd: |
|
||||
ROOT=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover
|
||||
mkdir -p "$ROOT/product-observation" "$ROOT/report"
|
||||
python3 - "$ROOT" <<'PY'
|
||||
import datetime, json, pathlib, sys
|
||||
root = pathlib.Path(sys.argv[1])
|
||||
r1 = json.loads((root / 'status-r1-returned.json').read_text())
|
||||
r2 = json.loads((root / 'status-r2-after-r1-return.json').read_text())
|
||||
dr1 = json.loads((root / 'status-durable-r1-returned.json').read_text())['Volumes'][0]
|
||||
dr2 = json.loads((root / 'status-durable-r2-primary-after-r1-return.json').read_text())['Volumes'][0]
|
||||
required = int(dr2.get('DurableLSN') or 0)
|
||||
r1_durable = int(dr1.get('DurableLSN') or 0)
|
||||
cluster = {
|
||||
'schema_version': '1.0',
|
||||
'captured_at': datetime.datetime.now(datetime.timezone.utc).isoformat().replace('+00:00', 'Z'),
|
||||
'product_revision': 'returned-replica-live-gate',
|
||||
'status': 'recovering',
|
||||
'volumes': [{
|
||||
'volume_id': 'v1',
|
||||
'namespace': 'testops',
|
||||
'pvc_name': 'iscsi-returned-replica-chain',
|
||||
'replication_factor': 2,
|
||||
'ack_profile': 'sync-quorum',
|
||||
'status': 'recovering',
|
||||
'reason': 'returned_replica_frontend_fenced',
|
||||
'primary_replica': 'r2',
|
||||
'primary_node': 'm02',
|
||||
'publish_target': '127.0.0.1:3281',
|
||||
'epoch': int(r2.get('Epoch') or 0),
|
||||
'endpoint_version': int(r2.get('EndpointVersion') or 0),
|
||||
'required_frontier_known': required > 0,
|
||||
'required_frontier_lsn': required,
|
||||
'replicas': [{
|
||||
'replica_id': 'r1',
|
||||
'server_id': 's1',
|
||||
'kubernetes_node': 'm02',
|
||||
'observed': True,
|
||||
'role': 'returned',
|
||||
'replication_role': str(r1.get('ReplicationRole') or 'replica_ready'),
|
||||
'durable_latched': bool(dr1.get('Latched')),
|
||||
'durable_frontier_known': bool(dr1.get('FrontierKnown')),
|
||||
'durable_frontier_lsn': r1_durable,
|
||||
'healthy': bool(r1.get('Healthy')),
|
||||
'frontend_primary_ready': bool(r1.get('FrontendPrimaryReady')),
|
||||
'frontend_protocol': 'iscsi',
|
||||
'frontend_addr': '127.0.0.1:3280',
|
||||
'status_addr': '127.0.0.1:19603',
|
||||
'stale_primary_fenced': True,
|
||||
'support_bundle_path': 'status-r1-returned.json'
|
||||
}, {
|
||||
'replica_id': 'r2',
|
||||
'server_id': 's2',
|
||||
'kubernetes_node': 'm02',
|
||||
'observed': True,
|
||||
'role': 'primary',
|
||||
'replication_role': str(r2.get('ReplicationRole') or 'none'),
|
||||
'durable_latched': bool(dr2.get('Latched')),
|
||||
'durable_frontier_known': bool(dr2.get('FrontierKnown')),
|
||||
'durable_frontier_lsn': required,
|
||||
'healthy': bool(r2.get('Healthy')),
|
||||
'frontend_primary_ready': bool(r2.get('FrontendPrimaryReady')),
|
||||
'frontend_protocol': 'iscsi',
|
||||
'frontend_addr': '127.0.0.1:3281',
|
||||
'status_addr': '127.0.0.1:19613'
|
||||
}]
|
||||
}],
|
||||
'non_claims': ['no automatic returned-replica failback or rebuild mutation executed']
|
||||
}
|
||||
(root / 'product-observation' / 'cluster-evidence.json').write_text(json.dumps(cluster, indent=2) + '\n')
|
||||
(root / 'returned-replica-live-evidence-summary.txt').write_text('\n'.join([
|
||||
'returned_replica_live_evidence_status=ok',
|
||||
f'required_frontier_lsn={required}',
|
||||
f'r1_durable_lsn={r1_durable}',
|
||||
f'r2_durable_lsn={required}',
|
||||
f'frontier_covered={str(r1_durable >= required).lower()}',
|
||||
]) + '\n')
|
||||
PY
|
||||
/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin/sw-block ops report --from-bundle "$ROOT" --out "$ROOT/report" > "$ROOT/report.stdout.txt" 2> "$ROOT/report.stderr.txt"
|
||||
/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin/sw-block ops explain volume --from-bundle "$ROOT" v1 > "$ROOT/explain.txt" 2> "$ROOT/explain.stderr.txt"
|
||||
port=19487
|
||||
/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/bin/sw-block ops dashboard --from-bundle "$ROOT" --listen "127.0.0.1:${port}" --serve-duration 8s > "$ROOT/dashboard.stdout.txt" 2> "$ROOT/dashboard.stderr.txt" &
|
||||
dashboard_pid=$!
|
||||
for _ in $(seq 1 80); do
|
||||
if curl -fsS "http://127.0.0.1:${port}/operator-snapshot.json" > "$ROOT/dashboard-operator-snapshot.json" 2> "$ROOT/dashboard-curl.stderr.txt"; then
|
||||
break
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
test -s "$ROOT/dashboard-operator-snapshot.json"
|
||||
wait "$dashboard_pid" || true
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/returned-replica-live-evidence-summary.txt"
|
||||
pattern: "^frontier_covered=true$"
|
||||
save_as: returned_live_frontier_covered_count
|
||||
- action: assert_greater
|
||||
actual: "{{ returned_live_frontier_covered_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/report/summary.txt"
|
||||
pattern: "managed_volume_returned_replica=v1 replica=r1 state=fenced reason=returned_replica_frontend_fenced"
|
||||
save_as: returned_live_projection_count
|
||||
- action: assert_greater
|
||||
actual: "{{ returned_live_projection_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/report/summary.txt"
|
||||
pattern: "managed_volume_action=authority.reintegrate_returned_replica mode=dry_run side_effect=authority_mutating executor=authority_recovery_executor decision=allowed"
|
||||
save_as: returned_live_action_allowed_count
|
||||
- action: assert_greater
|
||||
actual: "{{ returned_live_action_allowed_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/explain.txt"
|
||||
pattern: "managed_volume_action authority.reintegrate_returned_replica mode=dry_run"
|
||||
save_as: returned_live_explain_action_count
|
||||
- action: assert_greater
|
||||
actual: "{{ returned_live_explain_action_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain/returned_failover/dashboard-operator-snapshot.json"
|
||||
pattern: "\"type\": \"authority.reintegrate_returned_replica\""
|
||||
save_as: returned_live_dashboard_action_count
|
||||
- action: assert_greater
|
||||
actual: "{{ returned_live_dashboard_action_count }}"
|
||||
threshold: "0"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: final_asserts
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|^blockmaster |^blockvolume "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,iscsi-target"
|
||||
unmount: "/tmp/sw-block-iscsi-returned/mnt"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-iscsi-returned-chain"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,304 @@
|
||||
# Runner-native real-cluster gate for the content-named layout.
|
||||
#
|
||||
# One scenario for the layout's real-process tests. Each entry is one tagged Go
|
||||
# test that owns its stock filer, block processes and NVMe frontend; the
|
||||
# scenario builds an exact product commit, runs the selected entries, and
|
||||
# passes an entry only on that test's own top-level "--- PASS" line together
|
||||
# with exit code 0. A test that is skipped, renamed, or not compiled in by its
|
||||
# tags prints no such line, so it fails the entry.
|
||||
#
|
||||
# Parameters never enter shell source: every value reaches the commands as an
|
||||
# environment variable (the runner single-quotes env.* params), and each is
|
||||
# validated before use. The verified product commit and weed digest are
|
||||
# recorded in result.json (emit_provenance) whether or not the entries pass.
|
||||
#
|
||||
# Entries (all six by default; select a subset with -env tests="..."):
|
||||
# move TestIntegrationWorkspaceLayoutMove (clean and forced move)
|
||||
# lease TestBinaryWorkspaceLeaseOptInOwnsCLEANShutdown
|
||||
# systemd TestSystemdExpiredStartupExits75ThenRegrantServes
|
||||
# (system systemd; run as a user allowed to systemd-run)
|
||||
# catalog TestIntegration_CatalogRestoreAndDelete
|
||||
# cutover-e2e TestCutoverWriteSnapshotKillRestartRestore (write, snapshot,
|
||||
# kill, restart, restore)
|
||||
# cutover-create TestCutoverCreateFromSnapshot (the master creates the
|
||||
# target identity and its restored image in one request)
|
||||
# fence-heal TestFencingRoundHealContinuesThePrimary (a failed fencing
|
||||
# round heals by continuing the primary). Not in the default
|
||||
# set until the promotion fence is on the base.
|
||||
# fence-rejoin TestFencingRoundSurvivorRejoins (the fence-heal scenario
|
||||
# carried on: the survivor that could not fence rejoins the
|
||||
# healed primary). Not in the default set until the promotion
|
||||
# fence is on the base.
|
||||
# double-failover TestDoubleFailoverReadsBackEveryAckedWrite (RF3
|
||||
# sync_quorum: two failovers, the first primary rejoining in
|
||||
# between; every acknowledged write reads back on the last
|
||||
# primary). Not in the default set until the promotion fence
|
||||
# is on the base.
|
||||
#
|
||||
# Expected invocation (on the Linux host):
|
||||
# swblock run \
|
||||
# -env product_repo=/path/to/seaweed-block -env head=<40-hex commit> \
|
||||
# -env weed_binary=/path/to/weed -env weed_sha256=<sha256> \
|
||||
# -env go_bin=/path/to/go/bin \
|
||||
# -env tests="move lease systemd catalog cutover-e2e cutover-create" \
|
||||
# testops/scenarios/layout-realcluster-integration-gate.yaml
|
||||
|
||||
name: layout-realcluster-integration-gate
|
||||
timeout: 120m
|
||||
always_timeout: 5m
|
||||
|
||||
env:
|
||||
product_repo: "/path/to/seaweed-block"
|
||||
head: ""
|
||||
weed_binary: "/path/to/weed"
|
||||
weed_sha256: ""
|
||||
go_bin: "/usr/local/go/bin"
|
||||
tests: "move lease systemd catalog cutover-e2e cutover-create"
|
||||
scratch_root: "/tmp/sw-layout-gate"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
host:
|
||||
is_local: true
|
||||
|
||||
phases:
|
||||
- name: prepare
|
||||
actions:
|
||||
- action: exec
|
||||
node: host
|
||||
timeout: 2m
|
||||
env.GATE_RUN: "{{ run_id }}"
|
||||
env.GATE_ROOT: "{{ scratch_root }}"
|
||||
env.GATE_HEAD: "{{ head }}"
|
||||
env.GATE_TESTS: "{{ tests }}"
|
||||
env.GATE_REPO: "{{ product_repo }}"
|
||||
env.GATE_WEED: "{{ weed_binary }}"
|
||||
env.GATE_WEED_SHA: "{{ weed_sha256 }}"
|
||||
env.GATE_GO: "{{ go_bin }}"
|
||||
save_as: gate_token
|
||||
cmd: |
|
||||
set -euf
|
||||
fail() { echo "$1" >&2; exit 2; }
|
||||
case "$GATE_HEAD" in *[!0-9a-f]*|'') fail 'head must be a full lowercase hexadecimal commit' ;; esac
|
||||
[ ${#GATE_HEAD} -eq 40 ] || fail 'head must be 40 characters'
|
||||
case "$GATE_WEED_SHA" in *[!0-9a-f]*|'') fail 'weed_sha256 must be lowercase hexadecimal' ;; esac
|
||||
[ ${#GATE_WEED_SHA} -eq 64 ] || fail 'weed_sha256 must be 64 characters'
|
||||
case "$GATE_RUN" in *[!0-9A-Za-z_-]*|'') fail 'run_id has unexpected characters' ;; esac
|
||||
case "$GATE_ROOT" in /*) ;; *) fail 'scratch_root must be absolute' ;; esac
|
||||
case "$GATE_ROOT" in *[!0-9A-Za-z_./-]*|*..*) fail 'scratch_root has unexpected characters' ;; esac
|
||||
case "$GATE_TESTS" in *[!0-9a-z\ -]*|'') fail 'tests must be entry names separated by spaces' ;; esac
|
||||
n=0
|
||||
for t in $GATE_TESTS; do
|
||||
case "$t" in move|lease|systemd|catalog|cutover-e2e|cutover-create|fence-heal|fence-rejoin|double-failover) ;; *) fail "unknown entry: $t" ;; esac
|
||||
n=$((n + 1))
|
||||
done
|
||||
[ "$n" -gt 0 ] || fail 'tests names no entry'
|
||||
[ -x "$GATE_GO/go" ] || fail 'go_bin/go is not executable'
|
||||
[ -f "$GATE_WEED" ] || fail 'weed_binary is not a file'
|
||||
[ "$(sha256sum < "$GATE_WEED" | cut -d' ' -f1)" = "$GATE_WEED_SHA" ] || fail 'weed_binary does not match weed_sha256'
|
||||
[ "$(git -C "$GATE_REPO" rev-parse --verify "$GATE_HEAD^{commit}")" = "$GATE_HEAD" ] || fail 'head is not that commit in product_repo'
|
||||
d="$GATE_ROOT/$GATE_RUN"
|
||||
mkdir -p "$GATE_ROOT"
|
||||
# Created here, atomically, or refused: cleanup removes only a
|
||||
# directory whose marker holds this run's token.
|
||||
mkdir "$d" 2>/dev/null || fail 'run directory already exists'
|
||||
token=$(od -An -tx1 -N16 /dev/urandom | tr -d ' \n')
|
||||
printf '%s\n' "$token" > "$d/.layout-gate-owned"
|
||||
printf '%s\n' "$token"
|
||||
- action: exec
|
||||
node: host
|
||||
timeout: 2m
|
||||
env.GATE_DIR: "{{ scratch_root }}/{{ run_id }}"
|
||||
env.GATE_HEAD: "{{ head }}"
|
||||
env.GATE_TESTS: "{{ tests }}"
|
||||
env.GATE_REPO: "{{ product_repo }}"
|
||||
env.GATE_WEED_SHA: "{{ weed_sha256 }}"
|
||||
env.GATE_GO: "{{ go_bin }}"
|
||||
cmd: |
|
||||
set -euf
|
||||
d="$GATE_DIR"
|
||||
mkdir "$d/source" "$d/bin" "$d/tmp" "$d/evidence"
|
||||
git -C "$GATE_REPO" archive "$GATE_HEAD" | tar -xf - -C "$d/source"
|
||||
printf '%s\n' "$GATE_HEAD" > "$d/evidence/product.sha"
|
||||
printf '%s weed\n' "$GATE_WEED_SHA" > "$d/evidence/weed.sha256"
|
||||
"$GATE_GO/go" version > "$d/evidence/go.version"
|
||||
printf '%s\n' $GATE_TESTS > "$d/evidence/selected.txt"
|
||||
# Pins, recorded before any entry runs; gate_pass stays 0 unless run_tests passes.
|
||||
- action: emit_provenance
|
||||
product: seaweed-block
|
||||
tested_sha: "{{ head }}"
|
||||
gate_pass: "0"
|
||||
gate_status: "pinned"
|
||||
__weed_sha256: "{{ weed_sha256 }}"
|
||||
__entries: "{{ tests }}"
|
||||
|
||||
- name: build
|
||||
actions:
|
||||
- action: exec
|
||||
node: host
|
||||
timeout: 20m
|
||||
env.GATE_DIR: "{{ scratch_root }}/{{ run_id }}"
|
||||
env.GATE_GO: "{{ go_bin }}"
|
||||
env.GATE_TESTS: "{{ tests }}"
|
||||
cmd: |
|
||||
set -eu
|
||||
d="$GATE_DIR"
|
||||
export PATH="$GATE_GO:$PATH"
|
||||
cd "$d/source"
|
||||
for b in blockmaster blockvolume sw-block; do go build -o "$d/bin/$b" "./cmd/$b"; done
|
||||
# Only the test binaries the selected entries run: a package that
|
||||
# no selected entry uses cannot fail the build of the others.
|
||||
bv=0 sd=0 cs=0
|
||||
for t in $GATE_TESTS; do
|
||||
case "$t" in
|
||||
systemd) sd=1 ;;
|
||||
catalog) cs=1 ;;
|
||||
*) bv=1 ;;
|
||||
esac
|
||||
done
|
||||
[ "$bv" = 0 ] || go test -c -tags 'subprocess chunkstore_integration' -o "$d/bin/blockvolume.test" ./cmd/blockvolume
|
||||
[ "$sd" = 0 ] || go test -c -tags 'subprocess chunkstore_integration systemd_integration' -o "$d/bin/blockvolume-systemd.test" ./cmd/blockvolume
|
||||
[ "$cs" = 0 ] || go test -c -tags 'chunkstore_integration' -o "$d/bin/chunkstore.test" ./core/frontend/chunkstore
|
||||
sha256sum "$d/bin/"* > "$d/evidence/binaries.sha256"
|
||||
|
||||
- name: run_tests
|
||||
actions:
|
||||
- action: exec
|
||||
node: host
|
||||
timeout: 95m
|
||||
env.GATE_DIR: "{{ scratch_root }}/{{ run_id }}"
|
||||
env.GATE_GO: "{{ go_bin }}"
|
||||
env.GATE_WEED: "{{ weed_binary }}"
|
||||
env.GATE_TESTS: "{{ tests }}"
|
||||
receipt_path: "{{ bundle_dir }}/run_tests.receipt.json"
|
||||
cmd: |
|
||||
set -f
|
||||
d="$GATE_DIR"
|
||||
export PATH="$GATE_GO:$PATH" TMPDIR="$d/tmp" CHUNKSTORE_WEED="$GATE_WEED" SWBLOCK_TEST_BINS="$d/bin"
|
||||
: > "$d/evidence/verdicts.txt"
|
||||
failed=0
|
||||
n=0
|
||||
for t in $GATE_TESTS; do
|
||||
n=$((n + 1))
|
||||
extra=
|
||||
case "$t" in
|
||||
move) pkg=cmd/blockvolume bin=blockvolume.test name=TestIntegrationWorkspaceLayoutMove to=14m ;;
|
||||
lease) pkg=cmd/blockvolume bin=blockvolume.test name=TestBinaryWorkspaceLeaseOptInOwnsCLEANShutdown to=9m ;;
|
||||
systemd) pkg=cmd/blockvolume bin=blockvolume-systemd.test name=TestSystemdExpiredStartupExits75ThenRegrantServes to=14m extra=GAP1_SYSTEMD_AUTHORIZED=1 ;;
|
||||
catalog) pkg=core/frontend/chunkstore bin=chunkstore.test name=TestIntegration_CatalogRestoreAndDelete to=9m ;;
|
||||
cutover-e2e) pkg=cmd/blockvolume bin=blockvolume.test name=TestCutoverWriteSnapshotKillRestartRestore to=40m ;;
|
||||
cutover-create) pkg=cmd/blockvolume bin=blockvolume.test name=TestCutoverCreateFromSnapshot to=20m ;;
|
||||
fence-heal) pkg=cmd/blockvolume bin=blockvolume.test name=TestFencingRoundHealContinuesThePrimary to=10m ;;
|
||||
fence-rejoin) pkg=cmd/blockvolume bin=blockvolume.test name=TestFencingRoundSurvivorRejoins to=10m ;;
|
||||
double-failover) pkg=cmd/blockvolume bin=blockvolume.test name=TestDoubleFailoverReadsBackEveryAckedWrite to=15m ;;
|
||||
*) echo "unknown entry: $t" >&2; exit 2 ;;
|
||||
esac
|
||||
log="$d/evidence/$t.log"
|
||||
# A failed test keeps its daemons' whole logs here (collected).
|
||||
(cd "$d/source/$pkg" && env $extra SWBLOCK_TEST_LOG_DIR="$d/evidence/$t-daemons" "$d/bin/$bin" -test.run "^$name\$" -test.v -test.count 1 -test.timeout "$to") > "$log" 2>&1
|
||||
rc=$?
|
||||
if [ "$rc" -eq 0 ] && grep -qE "^--- PASS: $name \(" "$log"; then
|
||||
echo "PASS $t $name" >> "$d/evidence/verdicts.txt"
|
||||
else
|
||||
echo "FAIL $t $name rc=$rc" >> "$d/evidence/verdicts.txt"
|
||||
tail -40 "$log" >&2
|
||||
failed=1
|
||||
fi
|
||||
done
|
||||
passes=$(grep -c '^PASS ' "$d/evidence/verdicts.txt" 2>/dev/null) || passes=0
|
||||
if [ "$n" -eq 0 ] || [ "$passes" -ne "$n" ]; then
|
||||
echo "verdicts: $passes PASS of $n selected entries" >&2
|
||||
failed=1
|
||||
fi
|
||||
cat "$d/evidence/verdicts.txt" >&2
|
||||
exit "$failed"
|
||||
|
||||
- name: collect
|
||||
always: true
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: host
|
||||
path: "{{ scratch_root }}/{{ run_id }}/evidence"
|
||||
name: "layout-gate"
|
||||
|
||||
# Runs only when every earlier ordinary phase passed (the runner runs the
|
||||
# always phases after them). The pass is read back from a collected copy of
|
||||
# the evidence: a failed collection fails the gate, and the archive must
|
||||
# hold one PASS verdict per selected entry and no other line.
|
||||
- name: mark_pass
|
||||
actions:
|
||||
- action: collect_path
|
||||
node: host
|
||||
path: "{{ scratch_root }}/{{ run_id }}/evidence"
|
||||
name: "layout-gate-pass"
|
||||
- action: exec
|
||||
node: host
|
||||
timeout: 1m
|
||||
env.GATE_ARCHIVE: "{{ artifacts_dir }}/layout-gate-pass.tgz"
|
||||
env.GATE_TESTS: "{{ tests }}"
|
||||
cmd: |
|
||||
set -euf
|
||||
v=$(tar -xzOf "$GATE_ARCHIVE" evidence/verdicts.txt)
|
||||
n=0
|
||||
for t in $GATE_TESTS; do
|
||||
n=$((n + 1))
|
||||
printf '%s\n' "$v" | grep -qE "^PASS $t Test[A-Za-z0-9_]+\$" || { echo "collected verdicts lack PASS for $t" >&2; exit 1; }
|
||||
done
|
||||
lines=$(printf '%s\n' "$v" | grep -c .)
|
||||
[ "$n" -gt 0 ] && [ "$lines" -eq "$n" ] || { echo "collected verdicts: $lines lines for $n entries" >&2; exit 1; }
|
||||
- action: emit_provenance
|
||||
product: seaweed-block
|
||||
tested_sha: "{{ head }}"
|
||||
gate_pass: "1"
|
||||
gate_status: "ok"
|
||||
__weed_sha256: "{{ weed_sha256 }}"
|
||||
__entries: "{{ tests }}"
|
||||
|
||||
# Always runs and ends with the zero-residue assertion: no process whose cwd,
|
||||
# executable or command line is inside this run's directory (the tests build
|
||||
# and start every binary there, systemd units included), and no gap1-* unit.
|
||||
# The run directory is removed only after that holds.
|
||||
- name: cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: host
|
||||
timeout: 3m
|
||||
env.GATE_RUN: "{{ run_id }}"
|
||||
env.GATE_ROOT: "{{ scratch_root }}"
|
||||
env.GATE_TOKEN: "{{ gate_token }}"
|
||||
receipt_path: "{{ bundle_dir }}/cleanup.receipt.json"
|
||||
cmd: |
|
||||
set -u
|
||||
case "$GATE_RUN" in *[!0-9A-Za-z_-]*|'') echo 'run_id has unexpected characters' >&2; exit 2 ;; esac
|
||||
case "$GATE_ROOT" in /*) ;; *) echo 'scratch_root must be absolute' >&2; exit 2 ;; esac
|
||||
d="$GATE_ROOT/$GATE_RUN"
|
||||
[ -e "$d" ] || exit 0
|
||||
# No token: prepare created nothing; whatever is there is not ours.
|
||||
case "$GATE_TOKEN" in *[!0-9a-f]*|'') echo "this run created no directory; left untouched: $d" >&2; exit 0 ;; esac
|
||||
[ ${#GATE_TOKEN} -eq 32 ] || { echo "this run created no directory; left untouched: $d" >&2; exit 0; }
|
||||
[ "$(cat "$d/.layout-gate-owned" 2>/dev/null)" = "$GATE_TOKEN" ] || { echo "not created by this run; left untouched: $d" >&2; exit 2; }
|
||||
residue() {
|
||||
n=0
|
||||
for p in /proc/[0-9]*; do
|
||||
[ "${p##*/}" = "$$" ] && continue
|
||||
cwd=$(readlink "$p/cwd" 2>/dev/null || true)
|
||||
exe=$(readlink "$p/exe" 2>/dev/null || true)
|
||||
cmd=$(tr '\0' ' ' < "$p/cmdline" 2>/dev/null || true)
|
||||
case "$cwd|$exe|$cmd" in *"$d"/*) echo "residue process ${p##*/}: $exe" >&2; n=$((n + 1)) ;; esac
|
||||
done
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
units=$(systemctl list-units --all --plain --no-legend 'gap1-*' 2>/dev/null | awk '{print $1}')
|
||||
[ -z "$units" ] || { echo "residue units: $units" >&2; n=$((n + 1)); }
|
||||
fi
|
||||
[ "$n" -eq 0 ]
|
||||
}
|
||||
i=0
|
||||
until residue; do
|
||||
i=$((i + 1))
|
||||
[ "$i" -lt 30 ] || { echo "residue remains after 60s; run directory kept: $d" >&2; exit 1; }
|
||||
sleep 2
|
||||
done
|
||||
rm -rf -- "$d"
|
||||
[ ! -e "$d" ] || { echo "run directory not removed: $d" >&2; exit 1; }
|
||||
echo "zero residue: $d"
|
||||
@@ -0,0 +1,97 @@
|
||||
# Runner-native Phase 42 D1 gate: live lifecycle-owner API/admission boundary.
|
||||
|
||||
name: lifecycle-owner-admission-gate-chain
|
||||
description: >
|
||||
Runs the live Kubernetes ValidatingAdmissionPolicy gate that proves the
|
||||
lifecycle-owner identity can only issue finalizer-shaped SwBlockVolume main
|
||||
object patches. This is the real API/admission successor to the Phase 41
|
||||
schema-aware boundary gate.
|
||||
|
||||
vars:
|
||||
product_root: "{{ env.PRODUCT_ROOT | default('/mnt/c/work/seaweed_block') }}"
|
||||
|
||||
phases:
|
||||
- name: admission_gate
|
||||
actions:
|
||||
- type: exec
|
||||
name: run_phase42_admission_gate
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate bash scripts/run-phase42-lifecycle-owner-admission-gate.sh {{ product_root }}"
|
||||
|
||||
- name: asserts
|
||||
actions:
|
||||
- type: grep_log
|
||||
name: admission_gate_ok
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^phase42_lifecycle_owner_admission_status=ok$"
|
||||
- type: grep_log
|
||||
name: operator_status_no_main_patch
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^operator_status_main_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: admission_policy_propagated
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^admission_policy_propagated=true$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_finalizer_add_allowed
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_finalizer_add_allowed=true$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_finalizer_add_idempotent
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_finalizer_add_idempotent=true$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_finalizer_remove_allowed
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_finalizer_remove_allowed=true$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_finalizer_remove_idempotent
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_finalizer_remove_idempotent=true$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_spec_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_spec_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_label_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_label_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_annotation_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_annotation_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_ownerreferences_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_ownerreferences_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_deletiontimestamp_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_deletiontimestamp_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_foreign_finalizer_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_foreign_finalizer_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_mixed_patch_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_mixed_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_mixed_metadata_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_mixed_metadata_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_main_status_not_mutated
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_main_status_mutated=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_status_subresource_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_status_subresource_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: finalizers_endpoint_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^finalizers_endpoint_allowed=false$"
|
||||
- type: grep_log
|
||||
name: object_integrity_preserved
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-lifecycle-owner-admission-gate/phase42-lifecycle-owner-admission-gate-summary.txt"
|
||||
pattern: "^object_integrity_preserved=true$"
|
||||
@@ -0,0 +1,44 @@
|
||||
# Runner-native Phase 41 D2 gate: lifecycle-owner API/RBAC boundary.
|
||||
|
||||
name: lifecycle-owner-api-boundary-chain
|
||||
description: >
|
||||
Proves that the released operator-status boundary remains status/events-only
|
||||
while the future lifecycle-owner boundary permits only finalizer-shaped main
|
||||
SwBlockVolume patches and rejects spec/unrelated metadata mutation.
|
||||
|
||||
vars:
|
||||
product_root: "{{ env.PRODUCT_ROOT | default('/mnt/c/work/seaweed_block') }}"
|
||||
|
||||
phases:
|
||||
- name: api_boundary
|
||||
actions:
|
||||
- type: exec
|
||||
name: run_phase41_api_boundary
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary bash scripts/run-phase41-lifecycle-owner-api-boundary.sh {{ product_root }}"
|
||||
|
||||
- name: asserts
|
||||
actions:
|
||||
- type: grep_log
|
||||
name: api_boundary_ok
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary/phase41-lifecycle-owner-api-boundary-summary.txt"
|
||||
pattern: "^phase41_lifecycle_owner_api_boundary_status=ok$"
|
||||
- type: grep_log
|
||||
name: operator_status_no_main_patch
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary/phase41-lifecycle-owner-api-boundary-summary.txt"
|
||||
pattern: "^operator_status_main_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_finalizer_only_allowed
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary/phase41-lifecycle-owner-api-boundary-summary.txt"
|
||||
pattern: "^lifecycle_owner_finalizer_patch_allowed=true$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_spec_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary/phase41-lifecycle-owner-api-boundary-summary.txt"
|
||||
pattern: "^lifecycle_owner_spec_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: lifecycle_owner_unrelated_metadata_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary/phase41-lifecycle-owner-api-boundary-summary.txt"
|
||||
pattern: "^lifecycle_owner_unrelated_metadata_patch_allowed=false$"
|
||||
- type: grep_log
|
||||
name: finalizers_endpoint_forbidden
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase41-lifecycle-owner-api-boundary/phase41-lifecycle-owner-api-boundary-summary.txt"
|
||||
pattern: "^finalizers_endpoint_allowed=false$"
|
||||
@@ -0,0 +1,62 @@
|
||||
# Runner-native Phase 42 D5/D6 gate: delete-safety decisions stay external and
|
||||
# isolated per volume.
|
||||
|
||||
name: lifecycle-owner-delete-safety-decision-chain
|
||||
description: >
|
||||
Runs the Phase 42 delete-safety decision gate. This complements the live
|
||||
admission gate: admission proves the lifecycle-owner can only patch the
|
||||
approved finalizer shape; this gate proves finalizer-release decisions still
|
||||
come from cleanup evidence and remain dry-run/status-only until Phase 43.
|
||||
|
||||
vars:
|
||||
product_root: "{{ env.PRODUCT_ROOT | default('/mnt/c/work/seaweed_block') }}"
|
||||
|
||||
phases:
|
||||
- name: delete_safety_decision
|
||||
actions:
|
||||
- type: exec
|
||||
name: run_phase42_delete_safety_decision
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision && cd {{ product_root }} && SW_BLOCK_ARTIFACT_DIR=/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision bash scripts/run-phase42-delete-safety-decision-gate.sh {{ product_root }}"
|
||||
|
||||
- name: asserts
|
||||
actions:
|
||||
- type: grep_log
|
||||
name: gate_ok
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^phase42_delete_safety_decision_status=ok$"
|
||||
- type: grep_log
|
||||
name: clean_allowed
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^clean_delete_safety_decision=allowed$"
|
||||
- type: grep_log
|
||||
name: blocked_rejected
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^blocked_delete_safety_decision=rejected$"
|
||||
- type: grep_log
|
||||
name: missing_unknown
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^missing_delete_safety_decision=unknown$"
|
||||
- type: grep_log
|
||||
name: stale_unknown
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^stale_delete_safety_decision=unknown$"
|
||||
- type: grep_log
|
||||
name: dry_run_action
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_action_mode=dry_run$"
|
||||
- type: grep_log
|
||||
name: no_action_mutation
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^lifecycle_owner_action_mutation_allowed=false$"
|
||||
- type: grep_log
|
||||
name: no_finalizer_patch
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^finalizer_patch_count=0$"
|
||||
- type: grep_log
|
||||
name: no_finalizer_events
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^no_finalizer_mutation_events=true$"
|
||||
- type: grep_log
|
||||
name: multi_volume_isolated
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-phase42-delete-safety-decision/phase42-delete-safety-decision-gate-summary.txt"
|
||||
pattern: "^multi_volume_delete_safety_isolation=true$"
|
||||
@@ -0,0 +1,190 @@
|
||||
# Runner-native HG-10 adversarial break-class chain.
|
||||
#
|
||||
# Goal:
|
||||
# Exercise the three close-gate break classes from
|
||||
# internal/docs/qa-assignments/light-use-mvp-close-hard-gate.md and prove
|
||||
# each failure leaves actionable evidence instead of a silent timeout.
|
||||
|
||||
name: light-use-first-volume-breaks-chain
|
||||
timeout: 25m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/preflight-missing-iscsiadm /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/attach-failure /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/pin_build"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/pre_clean_uninstall"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "pkill -f 'kubectl.*port-forward.*svc/blockmaste[r]' >/dev/null 2>&1 || true"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |[/]kubectl .*port-forward .*svc/blockmaste[r]|^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: break_preflight_missing_iscsiadm
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && bash -lc 'set +e; SW_BLOCK_PREFLIGHT_FORCE_MISSING=iscsiadm bash scripts/preflight-k8s-alpha.sh --local-k3s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/preflight-missing-iscsiadm/preflight.txt 2>&1; rc=$?; echo $rc > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/preflight-missing-iscsiadm/exit_code.txt; test \"$rc\" -eq 2'"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/preflight-missing-iscsiadm/preflight.txt"
|
||||
pattern: "checked name=iscsiadm status=FAIL"
|
||||
save_as: missing_iscsiadm_count
|
||||
- action: assert_greater
|
||||
actual: "{{ missing_iscsiadm_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/preflight-missing-iscsiadm/preflight.txt"
|
||||
pattern: "Install open-iscsi/iscsiadm"
|
||||
save_as: missing_iscsiadm_remediation_count
|
||||
- action: assert_greater
|
||||
actual: "{{ missing_iscsiadm_remediation_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: pin_build_alpha_images
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.SW_BLOCK_IMPORT_K3S: "1"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/pin_build"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE_ID="
|
||||
save_as: sw_block_image_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sw_block_image_id_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: break_mid_install_bad_image
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 5m
|
||||
cmd: "cd {{ product_root }} && bash -lc 'set +e; SW_BLOCK_IMAGE=ghcr.io/seaweedfs/does-not-exist:no-such-tag SW_BLOCK_CSI_IMAGE=ghcr.io/seaweedfs/does-not-exist:no-such-tag SW_BLOCK_DEMO_COLLECT_OPS_STATUS=1 bash scripts/run-k8s-demo.sh {{ product_root }}; rc=$?; echo $rc > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure/exit_code.txt; test \"$rc\" -ne 0'"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure/controlled-stop.txt"
|
||||
pattern: "ops-status-unavailable: no volume id reached"
|
||||
save_as: image_ops_unavailable_count
|
||||
- action: assert_greater
|
||||
actual: "{{ image_ops_unavailable_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "grep -E 'ImagePullBackOff|ErrImagePull|does-not-exist|no-such-tag' /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure/kube-system-pods-deploys.txt /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure/*.describe.txt > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure/image-pull-evidence.txt 2>&1"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure/image-pull-evidence.txt"
|
||||
pattern: "no-such-tag"
|
||||
save_as: image_failure_evidence_count
|
||||
- action: assert_greater
|
||||
actual: "{{ image_failure_evidence_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/image-failure-cleanup"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
|
||||
- name: break_mid_app_attach
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 6m
|
||||
cmd: "cd {{ product_root }} && bash -lc 'set -a; source /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/pin_build/alpha-images.env; set +a; set +e; SW_BLOCK_DEMO_COLLECT_OPS_STATUS=1 SW_BLOCK_DEMO_WRITER_TIMEOUT=45 SW_BLOCK_DEMO_BREAK_AFTER_BLOCKVOLUME_READY=delete-generated-blockvolume bash scripts/run-k8s-demo.sh {{ product_root }}; rc=$?; echo $rc > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/attach-failure/exit_code.txt; test \"$rc\" -ne 0'"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/attach-failure"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/attach-failure/run.log"
|
||||
pattern: "\\[app-demo\\] delete generated blockvolume after ready"
|
||||
save_as: attach_hook_count
|
||||
- action: assert_greater
|
||||
actual: "{{ attach_hook_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/attach-failure/run.log"
|
||||
pattern: "\\[app-demo\\] collect ops status after failure"
|
||||
save_as: attach_collect_count
|
||||
- action: assert_greater
|
||||
actual: "{{ attach_collect_count }}"
|
||||
threshold: "0"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "test -s /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/attach-failure/ops-status/ops-status-bundle.json"
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/attach-failure-cleanup"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
|
||||
- name: final_asserts
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |[/]kubectl .*port-forward .*svc/blockmaste[r]|^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks/uninstall"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "pkill -f 'kubectl.*port-forward.*svc/blockmaste[r]' >/dev/null 2>&1 || true"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |[/]kubectl .*port-forward .*svc/blockmaste[r]|^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume-breaks"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
@@ -0,0 +1,194 @@
|
||||
# Runner-native light-use first-volume chain.
|
||||
#
|
||||
# Goal:
|
||||
# Prove the documented Kubernetes quickstart path as a user-facing product
|
||||
# loop, not just as an internal smoke:
|
||||
# build/import -> launch alpha stack -> create PVC/app -> write/read ->
|
||||
# delete -> verify cleanup attribution -> collect artifacts.
|
||||
#
|
||||
# Expected invocation:
|
||||
# swblock run \
|
||||
# -env product_root=/path/to/seaweed_block/on/m02 \
|
||||
# -env ssh_key=/path/to/testdev_key/on/controller \
|
||||
# testops/scenarios/light-use-first-volume-chain.yaml
|
||||
|
||||
name: light-use-first-volume-chain
|
||||
timeout: 18m
|
||||
|
||||
env:
|
||||
product_root: "/tmp/seaweed_block"
|
||||
ssh_key: "C:\\work\\dev_server\\testdev_key"
|
||||
|
||||
topology:
|
||||
nodes:
|
||||
m02:
|
||||
host: 192.168.1.184
|
||||
user: testdev
|
||||
key: "{{ ssh_key }}"
|
||||
|
||||
phases:
|
||||
- name: pre_clean
|
||||
actions:
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "rm -rf /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume && mkdir -p /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/pin_build /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo"
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: preflight
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "cd {{ product_root }} && bash scripts/preflight-k8s-alpha.sh --local-k3s > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/preflight.txt 2>&1"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/preflight.txt"
|
||||
pattern: "summary status=PASS"
|
||||
save_as: preflight_count
|
||||
- action: assert_greater
|
||||
actual: "{{ preflight_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: pin_build_alpha_images
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 8m
|
||||
cmd: "cd {{ product_root }} && bash scripts/build-alpha-images.sh {{ product_root }}"
|
||||
env.SW_BLOCK_IMPORT_K3S: "1"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/pin_build"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_IMAGE_ID="
|
||||
save_as: sw_block_image_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sw_block_image_id_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/pin_build/alpha-images.env"
|
||||
pattern: "SW_BLOCK_CSI_IMAGE_ID="
|
||||
save_as: sw_block_csi_image_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ sw_block_csi_image_id_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: first_volume_demo
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 10m
|
||||
cmd: "cd {{ product_root }} && bash -lc 'set -a; source /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/pin_build/alpha-images.env; set +a; bash scripts/run-k8s-demo.sh {{ product_root }}'"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo/run.log"
|
||||
pattern: "\\[app-demo\\] PASS: app pod wrote data, replacement app pod read it back through the same PVC, cleanup complete"
|
||||
save_as: first_volume_pass_count
|
||||
- action: assert_greater
|
||||
actual: "{{ first_volume_pass_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: boundary_asserts
|
||||
actions:
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo/writer.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: writer_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ writer_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo/reader.log"
|
||||
pattern: "/data/demo.bin: OK"
|
||||
save_as: reader_checksum_count
|
||||
- action: assert_greater
|
||||
actual: "{{ reader_checksum_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo/generated-blockvolume.yaml"
|
||||
pattern: "--volume-id="
|
||||
save_as: generated_volume_id_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generated_volume_id_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo/generated-blockvolume.yaml"
|
||||
pattern: "--iscsi-listen="
|
||||
save_as: generated_iscsi_count
|
||||
- action: assert_greater
|
||||
actual: "{{ generated_iscsi_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo/iscsi-sessions.after-delete.txt"
|
||||
pattern: "No active sessions"
|
||||
save_as: no_iscsi_session_count
|
||||
- action: assert_greater
|
||||
actual: "{{ no_iscsi_session_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: cleanup_attribution
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
cmd: "sudo -n iscsiadm -m node > /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/iscsi-nodes.after-demo.txt 2>&1 || true; cd {{ product_root }} && bash scripts/summarize-alpha-demo-cleanup.sh /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/demo /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/cleanup-attribution.txt /mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/iscsi-nodes.after-demo.txt"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/cleanup-attribution.txt"
|
||||
pattern: "^pvc:sw-block-demo-pvc state=deleted"
|
||||
save_as: product_cleanup_count
|
||||
- action: assert_greater
|
||||
actual: "{{ product_cleanup_count }}"
|
||||
threshold: "0"
|
||||
- action: grep_log
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/cleanup-attribution.txt"
|
||||
pattern: "cleaned_by=testops-guardrail"
|
||||
save_as: testops_cleanup_count
|
||||
- action: assert_greater
|
||||
actual: "{{ testops_cleanup_count }}"
|
||||
threshold: "0"
|
||||
|
||||
- name: final_asserts
|
||||
actions:
|
||||
- action: assert_no_active_iscsi_sessions
|
||||
node: m02
|
||||
iqn_substr: "io.seaweedfs"
|
||||
- action: assert_no_processes
|
||||
node: m02
|
||||
pattern: "[/]blockmaster --|[/]blockvolume --|[/]blockcsi |[/]iscsi-target |^blockmaster |^blockvolume |^blockcsi |^iscsi-target "
|
||||
|
||||
- name: collect_and_cleanup
|
||||
always: true
|
||||
actions:
|
||||
- action: exec
|
||||
node: m02
|
||||
timeout: 3m
|
||||
cmd: "cd {{ product_root }} && bash scripts/uninstall-k8s-alpha.sh {{ product_root }}"
|
||||
env.SW_BLOCK_ARTIFACT_DIR: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume/uninstall"
|
||||
env.SW_BLOCK_UNINSTALL_DELETE_ALL_BLOCKVOLUMES: "1"
|
||||
- action: pre_run_cleanup
|
||||
node: m02
|
||||
kill_patterns: "blockmaster,blockvolume,blockcsi,iscsi-target"
|
||||
nvme_disconnect: "true"
|
||||
iscsi_logout_prefix: "iqn.2026-05.io.seaweedfs"
|
||||
- action: collect_path
|
||||
node: m02
|
||||
path: "/mnt/smb/work/share/g15d-k8s/{{ run_id }}-first-volume"
|
||||
name: "remote-phases"
|
||||
ignore_error: true
|
||||
Loaded 100 of 233 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user