TQ: Support for ZFS Key Rotation #9737
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When Trust Quorum commits a new epoch, all encrypted U.2 datasets need their encryption keys rotated. This change implements that flow:
trust-quorum: Add watch channel to broadcast committed epoch changes fromNodeTaskto subscriberssled-agent: Wirecommitted_epoch_rxto the config reconcilerconfig-reconciler:KeyRotationError,RekeyRequesttypes for the rekey APIrekey_datasetsbatch operation onDatasetTaskHandledatasets_rekeytoDatasetTaskin the ZFS operation serializer task for key rotationrekey_for_epochtoOmicronDatasetsto coordinate rekeying all managed disks when an epoch is committedmanaged_disksiterator toExternalDisksillumos-utils:Zfs::change_keyusingzfs-atomic-change-keycrate (temporarily) to rotate keys atomically with the change of theoxide:epochpropertyChangeKeyErrortypeepochfield toDatasetPropertiesand includeoxide:epochin ZFS property querieskey-manager: Add Debug derives to key typesThe rekey operation is idempotent: datasets already at the target epoch are skipped. On startup, we process the initial epoch to catch any missed rekeys from crashes.
Fixes #9587