From e760e62a1fcbc114251032bd3e01a37c9d28b63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E7=8E=AE=E6=96=87?= Date: Mon, 11 Mar 2024 18:19:19 +0800 Subject: [PATCH] describe what if topology not match exactly Describe what to expect when the accessible_topology of node and volume does not match exactly. --- csi.proto | 16 +++++++++++++++- lib/go/csi/csi.pb.go | 19 ++++++++++++++++++- spec.md | 16 +++++++++++++++- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/csi.proto b/csi.proto index eecceeed..c359f9b5 100644 --- a/csi.proto +++ b/csi.proto @@ -579,6 +579,11 @@ message Volume { // COs MAY use this information along with the topology information // returned by NodeGetInfo to ensure that a given volume is accessible // from a given node when scheduling workloads. + // The volume is accessible from all locations in the specified + // topology. + // The volume is accessible from a node if the union of volume's + // accessible_topology is a superset of the node's + // accessible_topology. // This field is OPTIONAL. If it is not specified, the CO MAY assume // the volume is equally accessible from all nodes in the cluster and // MAY schedule workloads referencing the volume on any available @@ -1677,6 +1682,10 @@ message NodeGetInfoResponse { // COs MAY use this information along with the topology information // returned in CreateVolumeResponse to ensure that a given volume is // accessible from a given node when scheduling workloads. + // The node can access some of the locations in the specified + // topology. + // The node can access a volume if the node's accessible_topology + // is a subset of the union of volume's accessible_topology. // This field is OPTIONAL. If it is not specified, the CO MAY assume // the node is not subject to any topological constraint, and MAY // schedule workloads that reference any volume V, such that there are @@ -1686,7 +1695,12 @@ message NodeGetInfoResponse { // accessible_topology = // {"region": "R1", "zone": "Z2"} // Indicates the node exists within the "region" "R1" and the "zone" - // "Z2". + // "Z2". And it can access the following volumes: + // Volume 1: accessible_topology = {"region": "R1", "zone": "Z2"} + // Volume 2: accessible_topology = {"region": "R1"} + // But can not access the following volume: + // Volume 3: accessible_topology = + // {"region": "R1", "zone": "Z2", "rack": "R3"} Topology accessible_topology = 3; } message NodeExpandVolumeRequest { diff --git a/lib/go/csi/csi.pb.go b/lib/go/csi/csi.pb.go index b8e6b828..727c2d28 100644 --- a/lib/go/csi/csi.pb.go +++ b/lib/go/csi/csi.pb.go @@ -1476,6 +1476,11 @@ type Volume struct { // COs MAY use this information along with the topology information // returned by NodeGetInfo to ensure that a given volume is accessible // from a given node when scheduling workloads. + // The volume is accessible from all locations in the specified + // topology. + // The volume is accessible from a node if the union of volume's + // accessible_topology is a superset of the node's + // accessible_topology. // This field is OPTIONAL. If it is not specified, the CO MAY assume // the volume is equally accessible from all nodes in the cluster and // MAY schedule workloads referencing the volume on any available @@ -4793,6 +4798,10 @@ type NodeGetInfoResponse struct { // COs MAY use this information along with the topology information // returned in CreateVolumeResponse to ensure that a given volume is // accessible from a given node when scheduling workloads. + // The node can access some of the locations in the specified + // topology. + // The node can access a volume if the node's accessible_topology + // is a subset of the union of volume's accessible_topology. // This field is OPTIONAL. If it is not specified, the CO MAY assume // the node is not subject to any topological constraint, and MAY // schedule workloads that reference any volume V, such that there are @@ -4804,7 +4813,15 @@ type NodeGetInfoResponse struct { // {"region": "R1", "zone": "Z2"} // // Indicates the node exists within the "region" "R1" and the "zone" - // "Z2". + // "Z2". And it can access the following volumes: + // + // Volume 1: accessible_topology = {"region": "R1", "zone": "Z2"} + // Volume 2: accessible_topology = {"region": "R1"} + // + // But can not access the following volume: + // + // Volume 3: accessible_topology = + // {"region": "R1", "zone": "Z2", "rack": "R3"} AccessibleTopology *Topology `protobuf:"bytes,3,opt,name=accessible_topology,json=accessibleTopology,proto3" json:"accessible_topology,omitempty"` } diff --git a/spec.md b/spec.md index 82906174..a134e6df 100644 --- a/spec.md +++ b/spec.md @@ -1050,6 +1050,11 @@ message Volume { // COs MAY use this information along with the topology information // returned by NodeGetInfo to ensure that a given volume is accessible // from a given node when scheduling workloads. + // The volume is accessible from all locations in the specified + // topology. + // The volume is accessible from a node if the union of volume's + // accessible_topology is a superset of the node's + // accessible_topology. // This field is OPTIONAL. If it is not specified, the CO MAY assume // the volume is equally accessible from all nodes in the cluster and // MAY schedule workloads referencing the volume on any available @@ -2767,6 +2772,10 @@ message NodeGetInfoResponse { // COs MAY use this information along with the topology information // returned in CreateVolumeResponse to ensure that a given volume is // accessible from a given node when scheduling workloads. + // The node can access some of the locations in the specified + // topology. + // The node can access a volume if the node's accessible_topology + // is a subset of the union of volume's accessible_topology. // This field is OPTIONAL. If it is not specified, the CO MAY assume // the node is not subject to any topological constraint, and MAY // schedule workloads that reference any volume V, such that there are @@ -2776,7 +2785,12 @@ message NodeGetInfoResponse { // accessible_topology = // {"region": "R1", "zone": "Z2"} // Indicates the node exists within the "region" "R1" and the "zone" - // "Z2". + // "Z2". And it can access the following volumes: + // Volume 1: accessible_topology = {"region": "R1", "zone": "Z2"} + // Volume 2: accessible_topology = {"region": "R1"} + // But can not access the following volume: + // Volume 3: accessible_topology = + // {"region": "R1", "zone": "Z2", "rack": "R3"} Topology accessible_topology = 3; } ```