Skip to content

Commit 24a5785

Browse files
committed
Introducing Snapshot Topology
1 parent cd9e7ad commit 24a5785

3 files changed

Lines changed: 306 additions & 165 deletions

File tree

csi.proto

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,16 @@ message PluginCapability {
256256
// The presence of this capability determines whether the CO will
257257
// attempt to invoke the OPTIONAL SnapshotMetadata service RPCs.
258258
SNAPSHOT_METADATA_SERVICE = 4 [(alpha_enum_value) = true];
259+
260+
// SNAPSHOT_ACCESSIBILITY_CONSTRAINTS indicates that the snapshots
261+
// for this plugin MAY NOT be equally usable from all
262+
// topologies in the cluster. A snapshot is usable from a location
263+
// if volumes created from that snapshot are guaranteed to be
264+
// accessible from that location. The CO MUST use the topology
265+
// information returned in the CreateSnapshotResponse to ensure
266+
// that a desired volume can be provisioned from a given snapshot
267+
// when scheduling workloads.
268+
SNAPSHOT_ACCESSIBILITY_CONSTRAINTS = 5 [(alpha_enum_value) = true];
259269
}
260270
Type type = 1;
261271
}
@@ -1382,6 +1392,21 @@ message CreateSnapshotRequest {
13821392
// - Specify primary or secondary for replication systems that
13831393
// support snapshotting only on primary.
13841394
map<string, string> parameters = 4;
1395+
1396+
// Specifies where (regions, zones, racks, etc.) the provisioned
1397+
// snapshot MUST be usable from. A snapshot is usable from a location
1398+
// if volumes created from that snapshot are guaranteed to be
1399+
// accessible from that location.
1400+
// An SP SHALL advertise the requirements for topological
1401+
// accessibility information in documentation. COs SHALL only specify
1402+
// topological accessibility information supported by the SP.
1403+
// This field is OPTIONAL.
1404+
// This field SHALL NOT be specified unless the SP has the
1405+
// SNAPSHOT_ACCESSIBILITY_CONSTRAINTS plugin capability.
1406+
// If this field is not specified and the SP has the
1407+
// SNAPSHOT_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
1408+
// choose where the provisioned snapshot is usable from.
1409+
TopologyRequirement accessibility_requirements = 5 [(alpha_field) = true];
13851410
}
13861411

13871412
message CreateSnapshotResponse {
@@ -1441,6 +1466,22 @@ message Snapshot {
14411466
// If this message is inside a VolumeGroupSnapshot message, the value
14421467
// MUST be the same as the group_snapshot_id in that message.
14431468
string group_snapshot_id = 6;
1469+
1470+
// Specifies where (regions, zones, racks, etc.) the provisioned
1471+
// snapshot is usable from. A snapshot is usable from a location if
1472+
// volumes created from that snapshot are guaranteed to be accessible
1473+
// from that location.
1474+
// A plugin that returns this field MUST also set the
1475+
// SNAPSHOT_ACCESSIBILITY_CONSTRAINTS plugin capability.
1476+
// An SP MAY specify multiple topologies to indicate the snapshot is
1477+
// usable from multiple locations.
1478+
// COs MAY use this information to ensure that a desired volume can
1479+
// be provisioned from a given snapshot when scheduling workloads.
1480+
// This field is OPTIONAL. If it is not specified, the CO MAY assume
1481+
// the snapshot is equally usable from all topologies in the
1482+
// cluster and MAY provision volumes referencing the snapshot as a
1483+
// source without topology constraints.
1484+
repeated Topology accessible_topology = 7 [(alpha_field) = true];
14441485
}
14451486
message DeleteSnapshotRequest {
14461487
// The ID of the snapshot to be deleted.

0 commit comments

Comments
 (0)