Skip to content

v0.5.0

Latest

Choose a tag to compare

@JSYoo5B JSYoo5B released this 08 Nov 13:40
649fc9a

v0.5.0 adds observation and fault-injection APIs for tests that need to follow a live Ceph cluster through a state change, verify recovery and retain evidence after cleanup. It includes breaking Go API changes for v0.4.0 consumers.

go get github.com/JSYoo5B/ceph-testcontainers-go/ceph@v0.5.0

What changed

  • Watch OSD and placement-group transitions, CephFS client sessions and mirror state, RBD mirror receivers and images, and RGW multisite sync. A polling Watch can miss intermediate states. Use the selected resource identity and verify data through the client when a test needs proof of delivery.
  • Model availability zones with separate network paths. Apply delay or loss to a selected peer, override PG primary placement and inject block-device faults to test the SUT's behavior during failure and after restoration.
  • Run the Ceph Dashboard as an HTTPS fixture with an owned account and an optional RGW backend. RGW fixtures also support S3 key rotation, roles, rate limits and notification queue observations.
  • Retain bounded verification-window logs in failure archives. Interrupted fixture mutations now have stronger ownership and recovery checks, including CephFS mirror registration, subvolume pin restoration and RGW placement activation. Preserve a non-nil handle returned with an error and follow its documented cleanup contract.

Package guide · Go API · Full diff from v0.4.0

Migrating from v0.4.0

The following changes came up in a real consumer migration. Import cephfs/session, ceph/diagnostics and override from the module root. All public packages share the same module tag.

v0.4.0 v0.5.0
cephfs.Session, fs.Sessions(ctx) session.Session, session.List(ctx, fs)
cephfs.SessionTimeouts, fs.SessionTimeouts(ctx) session.Limits, session.Timeouts(ctx, fs)
fs.OverrideSessionTimeouts(ctx, limits), cephfs.SessionTimeoutsOverrideHandle session.OverrideTimeouts(ctx, fs, limits), session.TimeoutsOverrideHandle
ceph.DebugLevelSetting, DebugLevelReceipt, DebugLevelState, state constants and DebugLevelTransition Import those names from override
cluster.CollectDiagnostics(ctx, cfg), ceph.DiagnosticsConfig, ceph.DiagnosticsContainer diagnostics.Collect(ctx, cluster, cfg), diagnostics.Config, diagnostics.Target
cluster.CollectCrashMetadata(ctx, cfg) and its ceph config and report types diagnostics.CollectCrashMetadata(ctx, cluster, cfg), diagnostics.CrashMetadataConfig, diagnostics.CrashMetadataReport
cluster.RedactSecrets(ctx, data, values...) diagnostics.Redact(ctx, cluster, data, values...)
cluster.WaitForClean(ctx) observer.WaitForClean(ctx) after ceph.Observe(cluster)
cluster.ServiceContainers() observer.ServiceContainers(ctx) now takes a context and returns a slice and an error
user.Credentials() user.CreationKey().Credentials()

A cleanup helper can pass its own context to the observer and propagate the inventory error to its caller:

func serviceContainers(ctx context.Context, cluster *ceph.Container) ([]testcontainers.Container, error) {
    observer, err := ceph.Observe(cluster)
    if err != nil {
        return nil, err
    }
    return observer.ServiceContainers(ctx)
}

The minimum Go version remains 1.26.0. The repository selects toolchain go1.26.10. Consumers select their own patched toolchain. Dependency updates include OpenTelemetry 1.47.0, golang.org/x/crypto 0.58.0 and testify 1.12.1. The module now uses go.yaml.in/yaml/v3. The Go fixtures build with cgo disabled. Native scenarios require a Docker engine running Linux containers, with additional host requirements for some scenarios.

Ceph support and validation

The release commit is 649fc9a75ee78c385d33fa5de9c2254098f5eec0. All six required code checks passed. In the full runtime matrix, Tentacle 20.2.4 (default) and Squid 19.2.5 each passed all 160 profiles. The three common environment profiles passed. All 483 profiles passed their owned-resource cleanup checks. Code checks · Full runtime matrix · Validation record

Umbrella 21.2.0 has limited support in v0.5.0. It passed 126 of 160 profiles. The 34 failures affect CephFS mirror readiness, MGR module discovery, Prometheus configuration and advertisement, OSD admin-socket cancellation, encrypted GET after replacing the Vault CA, and multisite bucket policy import on bridge.

The ceph-msgr-go consumer reported successful candidate builds of its integration fixture and capture provider. Six representative scenarios passed on linux/arm64 Docker and cleanup left no containers, networks or volumes. The two Linux-runner-only RGW scenarios had compile coverage. Host-runtime, amd64 and live packet capture were outside that consumer run.