You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Trust Quorum commits a new epoch, all U.2 crypt datasets must have
their encryption keys rotated to use the new epoch's derived key. This
change implements the key rotation flow triggered by epoch commits.
## Trust Quorum Integration
- Add watch channel to `NodeTaskHandle` for epoch change notifications
- Initialize channel with current committed epoch on startup
- Notify subscribers via `send_if_modified()` when epoch changes
## Config Reconciler Integration
- Accept `committed_epoch_rx` watch channel from trust quorum
- Trigger reconciliation when epoch changes
- Track per-disk encryption epoch in `ExternalDisks`
- Add `rekey_for_epoch()` to coordinate key rotation:
- Filter disks needing rekey (cached epoch < target OR unknown)
- Derive keys for each disk via `StorageKeyRequester`
- Send batch request to dataset task
- Update cached epochs on success
- Retry on failure via normal reconciliation retry logic
## Dataset Task Changes
- Add `RekeyRequest`/`RekeyResult` types for batch rekey operations
- Add `datasets_rekey()` with idempotency check (skip if already at
target)
- Use `Zfs::change_key()` for atomic key + epoch property update
## ZFS Utilities
- Add `Zfs::change_key()` using native `-o user:property=value` support
recently added to Illumos ZFS
- Add `Zfs::load_key()`, `unload_key()`, `dataset_exists()`
- Add `epoch` field to `DatasetProperties`
- Add structured error types for key operations
## Crash Recovery
- Add trial decryption recovery in `sled-storage` for datasets with
missing epoch property (e.g., crash during initial creation)
- Unload key before each trial attempt to handle crash-after-load-key
- Set epoch property after successful recovery
---------
Co-authored-by: Andrew J. Stone <andrew@oxidecomputer.com>
0 commit comments