Skip to content

Commit c0c7d33

Browse files
authored
Merge pull request #5670 from carlbraganza/kep3314-k8s-snapshot-metadata-api-update
KEP-3314: updated to reflect the latest state
2 parents 6d3210f + 65460ae commit c0c7d33

File tree

1 file changed

+20
-1
lines changed
  • keps/sig-storage/3314-csi-changed-block-tracking

1 file changed

+20
-1
lines changed

keps/sig-storage/3314-csi-changed-block-tracking/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@ The following conditions are well defined:
769769
|-----------|-----------|-------------|-------------------|
770770
| Missing or otherwise invalid argument | 3 INVALID_ARGUMENT | Indicates that a required argument field was not specified or an argument value is invalid | The caller should correct the error and resubmit the call. |
771771
| Invalid `base_snapshot` or `target_snapshot` | 5 NOT_FOUND | Indicates that the snapshots specified were not found. | The caller should re-check that these objects exist. |
772+
| Changed block tracking is not enabled | 9 FAILED_PRECONDITION | Changed block tracking has not been enabled in the underlying storage subsystem. | The caller should perform a full backup instead. The operation would proceed if changed block tracking was enabled in the storage subsystem, but how this is to be accomplished is beyond the scope of this specification. |
772773
| Invalid `starting_offset` | 11 OUT_OF_RANGE | The starting offset exceeds the volume size. | The caller should specify a `starting_offset` less than the volume's size. |
773774

774775
### Kubernetes Components
@@ -858,12 +859,30 @@ message GetMetadataAllocatedRequest {
858859
message GetMetadataDeltaRequest {
859860
string security_token = 1;
860861
string namespace = 2;
861-
string base_snapshot_name = 3;
862+
string base_snapshot_id = 3;
862863
string target_snapshot_name = 4;
863864
int64 starting_offset = 5;
864865
int32 max_results = 6;
865866
}
866867
```
868+
The `GetMetadataDeltaRequest` requires that the invoking backup
869+
application provide the **CSI snapshot handle** of the base snapshot
870+
against which changes are to be computed, and **not the name** of the base
871+
`VolumeSnapshot` object.
872+
The invoking backup application should fetch this value from the
873+
`Status.SnapshotHandle` field of the `VolumeSnapshotContent` object
874+
associated with the base `VolumeSnapshot` object.
875+
This supports storage infrastructures that do not require that
876+
the base `VolumeSnapshot` object exist in the cluster in order to generate
877+
changed block metadata against a later `VolumeSnapshot`.
878+
879+
> Note: It is the backup application's responsibility to determine if the
880+
underlying CSI driver provides this support.
881+
If it does, the backup application should take that into consideration in
882+
its snapshot retention policy, and should save the CSI snapshot handle
883+
somewhere for future use if it deletes the `VolumeSnapshot` object
884+
immediately after it has performed a backup.
885+
867886
The full specification of the Kubernetes SnapshotMetadata API will be
868887
published in the source code repository of the
869888
[external-snapshot-metadata sidecar](#the-external-snapshot-metadata-sidecar).

0 commit comments

Comments
 (0)