Repository navigation
Releases
v0.5.0
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.0What 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.
v0.4.0
- Code written for v0.3.0 does not compile against v0.4.0 because of extensive refactoring, but every v0.3.0 feature is still available.
- OSD data retained across container replacement.
- MON replacement with a different image, for mixed-version rolling upgrades.
- Packet capture of fixture containers.
- Post-test finalization and verification.
- Messenger network faults selected by peer, direction and phase.
- Temporary daemon debug levels, MGR metrics, CephFS snapshot schedules and the RBD immutable object cache.
v0.3.0
- Bounded, binary-safe input for
RunNativeCommandthroughNativeInput, with delivery counts, EOF reporting and cancellation. - MGR session and failover observation recipes that correlate beacon sessions, global IDs and daemon instances.
- Authentication first-failure bundles that preserve rejection details and bounded observations without including keys.
- MDS session, failover, capability handoff, eviction and unsafe-to-safe request observation recipes.
- Native receipts for daemon-to-daemon paths, replication, log recovery and backfill, including erasure-coded pools.
v0.2.0
- Messenger v2-only profiles with configurable CRC, secure and per-daemon connection policies.
- IPv6 public and cluster networks with separate network-plane interruption.
- Classified errors for invalid requests, unsupported features, image capabilities, environment limits and native failures.
- Temporary network delay with netem capability checks, status reporting and scoped cleanup.
- Supervised native commands with bounded execution and output, cancellation and confirmed process cleanup.
- Redacted crash metadata collection and server-side fixtures for Messenger client tests.
v0.1.0
- Disposable Ceph clusters with MON, MGR and OSD containers, using the official Ceph images.
- Go packages for core cluster management, RBD, CephFS and RGW.
- Typed APIs for topology, pools, Cephx identities, configuration, fault injection and diagnostics.
- RBD mirroring and backup, CephFS snapshots and mirroring, and RGW multisite fixtures.
- Pure Go fixture control with
CGO_ENABLED=0, without privileged containers, host disks, LVM or systemd.