@@ -130,13 +130,21 @@ message PluginCapability {
130
130
// as specific RPCs as indicated by ControllerGetCapabilities.
131
131
CONTROLLER_SERVICE = 1 ;
132
132
133
- // ACCESSIBILITY_CONSTRAINTS indicates that the volumes for this
134
- // plugin may not be equally accessible by all nodes in the
133
+ // VOLUME_ACCESSIBILITY_CONSTRAINTS indicates that the volumes for
134
+ // this plugin may not be equally accessible by all nodes in the
135
135
// cluster. The CO MUST use the topology information returned by
136
136
// CreateVolumeRequest along with the topology information
137
137
// returned by NodeGetInfo to ensure that a given volume is
138
138
// accessible from a given node when scheduling workloads.
139
- ACCESSIBILITY_CONSTRAINTS = 2 ;
139
+ VOLUME_ACCESSIBILITY_CONSTRAINTS = 2 ;
140
+
141
+ // SNAPSHOT_ACCESSIBILITY_CONSTRAINTS indicates that the snapshots
142
+ // for this plugin may not be equally accessible by all nodes in
143
+ // the cluster. The CO MUST use the topology information returned
144
+ // by CreateSnapshotRequest along with the topology information
145
+ // returned by NodeGetInfo to ensure that a given snapshot is
146
+ // accessible from a given node when scheduling workloads.
147
+ SNAPSHOT_ACCESSIBILITY_CONSTRAINTS = 3 ;
140
148
}
141
149
Type type = 1 ;
142
150
}
@@ -231,10 +239,10 @@ message CreateVolumeRequest {
231
239
// topological accessibility information supported by the SP.
232
240
// This field is OPTIONAL.
233
241
// This field SHALL NOT be specified unless the SP has the
234
- // ACCESSIBILITY_CONSTRAINTS plugin capability.
242
+ // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability.
235
243
// If this field is not specified and the SP has the
236
- // ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY choose
237
- // where the provisioned volume is accessible from.
244
+ // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
245
+ // choose where the provisioned volume is accessible from.
238
246
TopologyRequirement accessibility_requirements = 7 ;
239
247
}
240
248
@@ -368,7 +376,7 @@ message Volume {
368
376
// Specifies where (regions, zones, racks, etc.) the provisioned
369
377
// volume is accessible from.
370
378
// A plugin that returns this field MUST also set the
371
- // ACCESSIBILITY_CONSTRAINTS plugin capability.
379
+ // VOLUME_ACCESSIBILITY_CONSTRAINTS plugin capability.
372
380
// An SP MAY specify multiple topologies to indicate the volume is
373
381
// accessible from multiple locations.
374
382
// COs MAY use this information along with the topology information
@@ -394,99 +402,109 @@ message Volume {
394
402
}
395
403
396
404
message TopologyRequirement {
397
- // Specifies the list of topologies the provisioned volume MUST be
398
- // accessible from.
405
+ // Specifies the list of topologies the provisioned volume or
406
+ // snapshot MUST be accessible from.
399
407
// This field is OPTIONAL. If TopologyRequirement is specified either
400
408
// requisite or preferred or both MUST be specified.
401
409
//
402
- // If requisite is specified, the provisioned volume MUST be
403
- // accessible from at least one of the requisite topologies.
410
+ // If requisite is specified, the provisioned volume or snapshot MUST
411
+ // be accessible from at least one of the requisite topologies.
404
412
//
405
413
// Given
406
- // x = number of topologies provisioned volume is accessible from
414
+ // x = number of topologies provisioned volume or snapshot is
415
+ // accessible from
407
416
// n = number of requisite topologies
408
417
// The CO MUST ensure n >= 1. The SP MUST ensure x >= 1
409
- // If x==n, than the SP MUST make the provisioned volume available to
410
- // all topologies from the list of requisite topologies. If it is
411
- // unable to do so, the SP MUST fail the CreateVolume call.
412
- // For example, if a volume should be accessible from a single zone,
413
- // and requisite =
418
+ // If x==n, than the SP MUST make the provisioned volume or snapshot
419
+ // available to all topologies from the list of requisite topologies.
420
+ // If it is unable to do so, the SP MUST fail the CreateVolume or
421
+ // CreateSnapshot call. For example, if a volume or snapshot should be
422
+ // accessible from a single zone, and
423
+ // requisite =
414
424
// {"region": "R1", "zone": "Z2"}
415
- // then the provisioned volume MUST be accessible from the "region"
416
- // "R1" and the "zone" "Z2".
417
- // Similarly, if a volume should be accessible from two zones, and
425
+ // then the provisioned volume or snapshot MUST be accessible from
426
+ // the "region" "R1" and the "zone" "Z2".
427
+ // Similarly, if a volume or snapshot should be accessible from two
428
+ // zones, and
418
429
// requisite =
419
430
// {"region": "R1", "zone": "Z2"},
420
431
// {"region": "R1", "zone": "Z3"}
421
- // then the provisioned volume MUST be accessible from the "region"
422
- // "R1" and both "zone" "Z2" and "zone" "Z3".
432
+ // then the provisioned volume or snapshot MUST be accessible from the
433
+ // "region" " R1" and both "zone" "Z2" and "zone" "Z3".
423
434
//
424
435
// If x<n, than the SP SHALL choose x unique topologies from the list
425
436
// of requisite topologies. If it is unable to do so, the SP MUST fail
426
- // the CreateVolume call.
427
- // For example, if a volume should be accessible from a single zone,
437
+ // the CreateVolume or CreateSnapshot call.
438
+ // For example, if a volume or snapshot should be accessible from a
439
+ // single zone,
428
440
// and requisite =
429
441
// {"region": "R1", "zone": "Z2"},
430
442
// {"region": "R1", "zone": "Z3"}
431
- // then the SP may choose to make the provisioned volume available in
432
- // either the "zone" "Z2" or the "zone" "Z3" in the "region" "R1".
433
- // Similarly, if a volume should be accessible from two zones, and
443
+ // then the SP may choose to make the provisioned volume or snapshot
444
+ // available in either the "zone" "Z2" or the "zone" "Z3" in the
445
+ // "region" "R1".
446
+ // Similarly, if a volume or snapshot should be accessible from two
447
+ // zones, and
434
448
// requisite =
435
449
// {"region": "R1", "zone": "Z2"},
436
450
// {"region": "R1", "zone": "Z3"},
437
451
// {"region": "R1", "zone": "Z4"}
438
- // then the provisioned volume MUST be accessible from any combination
439
- // of two unique topologies: e.g. "R1/Z2" and "R1/Z3", or "R1/Z2" and
440
- // "R1/Z4", or "R1/Z3" and "R1/Z4".
452
+ // then the provisioned volume or snapshot MUST be accessible from any
453
+ // combination of two unique topologies: e.g. "R1/Z2" and "R1/Z3", or
454
+ // "R1/Z2" and "R1/Z4", or "R1/Z3" and "R1/Z4".
441
455
//
442
- // If x>n, than the SP MUST make the provisioned volume available from
443
- // all topologies from the list of requisite topologies and MAY choose
444
- // the remaining x-n unique topologies from the list of all possible
445
- // topologies. If it is unable to do so, the SP MUST fail the
446
- // CreateVolume call.
447
- // For example, if a volume should be accessible from two zones, and
456
+ // If x>n, than the SP MUST make the provisioned volume or snapshot
457
+ // available from all topologies from the list of requisite topologies
458
+ // and MAY choose the remaining x-n unique topologies from the list of
459
+ // all possible topologies. If it is unable to do so, the SP MUST fail
460
+ // the CreateVolume or CreateSnapshot call.
461
+ // For example, if a volume or snapshot should be accessible from two
462
+ // zones, and
448
463
// requisite =
449
464
// {"region": "R1", "zone": "Z2"}
450
- // then the provisioned volume MUST be accessible from the "region"
451
- // "R1" and the "zone" "Z2" and the SP may select the second zone
452
- // independently, e.g. "R1/Z4".
465
+ // then the provisioned volume or snapshot MUST be accessible from the
466
+ // "region" " R1" and the "zone" "Z2" and the SP may select the second
467
+ // zone independently, e.g. "R1/Z4".
453
468
repeated Topology requisite = 1 ;
454
469
455
- // Specifies the list of topologies the CO would prefer the volume to
456
- // be provisioned in.
470
+ // Specifies the list of topologies the CO would prefer the volume or
471
+ // snapshot to be provisioned in.
457
472
//
458
473
// This field is OPTIONAL. If TopologyRequirement is specified either
459
474
// requisite or preferred or both MUST be specified.
460
475
//
461
- // An SP MUST attempt to make the provisioned volume available using
462
- // the preferred topologies in order from first to last.
476
+ // An SP MUST attempt to make the provisioned volume or snapshot
477
+ // available using the preferred topologies in order from first to
478
+ // last.
463
479
//
464
480
// If requisite is specified, all topologies in preferred list MUST
465
481
// also be present in the list of requisite topologies.
466
482
//
467
- // If the SP is unable to to make the provisioned volume available
468
- // from any of the preferred topologies, the SP MAY choose a topology
469
- // from the list of requisite topologies.
483
+ // If the SP is unable to to make the provisioned volume or snapshot
484
+ // available from any of the preferred topologies, the SP MAY choose
485
+ // a topology from the list of requisite topologies.
470
486
// If the list of requisite topologies is not specified, then the SP
471
487
// MAY choose from the list of all possible topologies.
472
488
// If the list of requisite topologies is specified and the SP is
473
- // unable to to make the provisioned volume available from any of the
474
- // requisite topologies it MUST fail the CreateVolume call.
489
+ // unable to to make the provisioned volume or snapshot available from
490
+ // any of the requisite topologies it MUST fail the CreateVolume or
491
+ // CreateSnapshot call.
475
492
//
476
493
// Example 1:
477
- // Given a volume should be accessible from a single zone, and
478
- // requisite =
494
+ // Given a volume or snapshot should be accessible from a single zone,
495
+ // and requisite =
479
496
// {"region": "R1", "zone": "Z2"},
480
497
// {"region": "R1", "zone": "Z3"}
481
498
// preferred =
482
499
// {"region": "R1", "zone": "Z3"}
483
500
// then the the SP SHOULD first attempt to make the provisioned volume
484
- // available from "zone" "Z3" in the "region" "R1" and fall back to
485
- // "zone" "Z2" in the "region" "R1" if that is not possible.
501
+ // or snapshot available from "zone" "Z3" in the "region" "R1" and
502
+ // fall back to "zone" "Z2" in the "region" "R1" if that is not
503
+ // possible.
486
504
//
487
505
// Example 2:
488
- // Given a volume should be accessible from a single zone, and
489
- // requisite =
506
+ // Given a volume or snapshot should be accessible from a single zone,
507
+ // and requisite =
490
508
// {"region": "R1", "zone": "Z2"},
491
509
// {"region": "R1", "zone": "Z3"},
492
510
// {"region": "R1", "zone": "Z4"},
@@ -495,17 +513,20 @@ message TopologyRequirement {
495
513
// {"region": "R1", "zone": "Z4"},
496
514
// {"region": "R1", "zone": "Z2"}
497
515
// then the the SP SHOULD first attempt to make the provisioned volume
498
- // accessible from "zone" "Z4" in the "region" "R1" and fall back to
499
- // "zone" "Z2" in the "region" "R1" if that is not possible. If that
500
- // is not possible, the SP may choose between either the "zone"
501
- // "Z3" or "Z5" in the "region" "R1".
516
+ // or snapshot accessible from "zone" "Z4" in the "region" "R1" and
517
+ // fall back to "zone" "Z2" in the "region" "R1" if that is not
518
+ // possible. If that is not possible, the SP may choose between either
519
+ // the "zone" "Z3" or "Z5" in the "region" "R1".
502
520
//
503
521
// Example 3:
504
- // Given a volume should be accessible from TWO zones (because an
505
- // opaque parameter in CreateVolumeRequest, for example, specifies
506
- // the volume is accessible from two zones, aka synchronously
507
- // replicated), and
508
- // requisite =
522
+ // A volume or snapshot MAY be required to be accessible from TWO
523
+ // zones. This MAY be indicated by an opaque parameter in
524
+ // CreateVolumeRequest that specifies the volume to be accessible from
525
+ // two zones, aka synchronously replicated. While accessibility
526
+ // requirements MAY be satisfied by replication, CO MUST NOT assume
527
+ // accessibility requires replication.
528
+ // Given a volume or snapshot should be accessible from TWO zone,
529
+ // and requisite =
509
530
// {"region": "R1", "zone": "Z2"},
510
531
// {"region": "R1", "zone": "Z3"},
511
532
// {"region": "R1", "zone": "Z4"},
@@ -514,10 +535,10 @@ message TopologyRequirement {
514
535
// {"region": "R1", "zone": "Z5"},
515
536
// {"region": "R1", "zone": "Z3"}
516
537
// then the the SP SHOULD first attempt to make the provisioned volume
517
- // accessible from the combination of the two "zones" "Z5" and "Z3" in
518
- // the "region" "R1". If that's not possible, it should fall back to
519
- // a combination of "Z5" and other possibilities from the list of
520
- // requisite. If that's not possible, it should fall back to a
538
+ // or snapshot accessible from the combination of the two "zones" "Z5"
539
+ // and "Z3" in the "region" "R1". If that's not possible, it should
540
+ // fall back to a combination of "Z5" and other possibilities from the
541
+ // list of requisite. If that's not possible, it should fall back to a
521
542
// combination of "Z3" and other possibilities from the list of
522
543
// requisite. If that's not possible, it should fall back to a
523
544
// combination of other possibilities from the list of requisite.
@@ -642,7 +663,7 @@ message ValidateVolumeCapabilitiesRequest {
642
663
// A caller MAY specify multiple topologies to indicate they believe
643
664
// the volume to be accessible from multiple locations.
644
665
// This field is OPTIONAL. This field SHALL NOT be set unless the
645
- // plugin advertises the ACCESSIBILITY_CONSTRAINTS capability.
666
+ // plugin advertises the VOLUME_ACCESSIBILITY_CONSTRAINTS capability.
646
667
repeated Topology accessible_topology = 4 ;
647
668
}
648
669
@@ -708,7 +729,7 @@ message GetCapacityRequest {
708
729
// `accessible_topology`. This is the same as the
709
730
// `accessible_topology` the CO returns in a `CreateVolumeResponse`.
710
731
// This field is OPTIONAL. This field SHALL NOT be set unless the
711
- // plugin advertises the ACCESSIBILITY_CONSTRAINTS capability.
732
+ // plugin advertises the VOLUME_ACCESSIBILITY_CONSTRAINTS capability.
712
733
Topology accessible_topology = 3 ;
713
734
}
714
735
@@ -785,6 +806,19 @@ message CreateSnapshotRequest {
785
806
// - Specify primary or secondary for replication systems that
786
807
// support snapshotting only on primary.
787
808
map <string , string > parameters = 4 ;
809
+
810
+ // Specifies where (regions, zones, racks, etc.) the provisioned
811
+ // snapshot MUST be accessible from.
812
+ // An SP SHALL advertise the requirements for topological
813
+ // accessibility information in documentation. COs SHALL only specify
814
+ // topological accessibility information supported by the SP.
815
+ // This field is OPTIONAL.
816
+ // This field SHALL NOT be specified unless the SP has the
817
+ // SNAPSHOT_ACCESSIBILITY_CONSTRAINTS plugin capability.
818
+ // If this field is not specified and the SP has the
819
+ // SNAPSHOT_ACCESSIBILITY_CONSTRAINTS plugin capability, the SP MAY
820
+ // choose where the provisioned snapshot is accessible from.
821
+ TopologyRequirement accessibility_requirements = 5 ;
788
822
}
789
823
790
824
message CreateSnapshotResponse {
@@ -825,6 +859,33 @@ message Snapshot {
825
859
826
860
// The status of a snapshot.
827
861
SnapshotStatus status = 5 ;
862
+
863
+ // Specifies where (regions, zones, racks, etc.) the provisioned
864
+ // snapshot is accessible from.
865
+ // A plugin that returns this field MUST also set the
866
+ // SNAPSHOT_ACCESSIBILITY_CONSTRAINTS plugin capability.
867
+ // An SP MAY specify multiple topologies to indicate the snapshot is
868
+ // accessible from multiple locations.
869
+ // COs MAY use this information along with the topology information
870
+ // returned by NodeGetInfo to ensure that a given snapshot is
871
+ // accessible from a given node when scheduling workloads.
872
+ // This field is OPTIONAL. If it is not specified, the CO MAY assume
873
+ // the snapshot is equally accessible from all nodes in the cluster
874
+ // and may schedule workloads referencing the snapshot on any
875
+ // available node.
876
+ //
877
+ // Example 1:
878
+ // accessible_topology = {"region": "R1", "zone": "Z2"}
879
+ // Indicates a snapshot accessible only from the "region" "R1" and the
880
+ // "zone" "Z2".
881
+ //
882
+ // Example 2:
883
+ // accessible_topology =
884
+ // {"region": "R1", "zone": "Z2"},
885
+ // {"region": "R1", "zone": "Z3"}
886
+ // Indicates a snapshot accessible from both "zone" "Z2" and "zone"
887
+ // "Z3" in the "region" "R1".
888
+ repeated Topology accessible_topology = 6 ;
828
889
}
829
890
830
891
// The status of a snapshot.
@@ -1120,10 +1181,12 @@ message NodeGetInfoResponse {
1120
1181
// Specifies where (regions, zones, racks, etc.) the node is
1121
1182
// accessible from.
1122
1183
// A plugin that returns this field MUST also set the
1123
- // ACCESSIBILITY_CONSTRAINTS plugin capability.
1184
+ // VOLUME_ACCESSIBILITY_CONSTRAINTS or
1185
+ // SNAPSHOT_ACCESSIBILITY_CONSTRAINTS plugin capability.
1124
1186
// COs MAY use this information along with the topology information
1125
- // returned in CreateVolumeResponse to ensure that a given volume is
1126
- // accessible from a given node when scheduling workloads.
1187
+ // returned in CreateVolumeResponse CreateSnapshotResponse to ensure
1188
+ // that a given volume or snapshot is accessible from a given node
1189
+ // when scheduling workloads.
1127
1190
// This field is OPTIONAL. If it is not specified, the CO MAY assume
1128
1191
// the node is not subject to any topological constraint, and MAY
1129
1192
// schedule workloads that reference any volume V, such that there are
0 commit comments