Skip to content

Commit 0294da9

Browse files
committed
Add staging_path to NodeExpand/GetStats calls
Allow COs to explicitly pass the staging path to node plugins when invoking NodeGetVolumeStats and NodeExpandVolume. Previously the CO could choose to pass either the staging or publish path, but there was no way for the node plugin to easily know which path it was. This change allows COs to pass both paths (if it wishes) or just the staging path, and in either case, the node plugin can easily figure out what it's being given. This makes its significantly easier for node plugins to implement the NodeGetVolumeStats and NodeExpandVolume RPCs, in particular it relieves the need to store some state on the node. For backwards compatibility, the field is not required, but it should be trivially easy for any CO to populate the field, so we encourage clients to set it. Release Note: ``` Added optional staging_target_path field to NodeExpandVolume() and NodeGetVolumeStats(). CO implementers should populate this new field if possible when calling these RPCs. ```
1 parent 9e773d2 commit 0294da9

File tree

3 files changed

+280
-215
lines changed

3 files changed

+280
-215
lines changed

csi.proto

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,13 @@ message NodeGetVolumeStatsRequest {
12131213
// the process serving this request.
12141214
// This is a REQUIRED field.
12151215
string volume_path = 2;
1216+
1217+
// The path where the volume is staged, if the plugin has the
1218+
// STAGE_UNSTAGE_VOLUME capability, otherwise empty.
1219+
// If not empty, it MUST be an absolute path in the root
1220+
// filesystem of the process serving this request.
1221+
// This field is OPTIONAL.
1222+
string staging_path = 3;
12161223
}
12171224

12181225
message NodeGetVolumeStatsResponse {
@@ -1327,6 +1334,13 @@ message NodeExpandVolumeRequest {
13271334
// plugin MAY expand the volume to its maximum capacity.
13281335
// This field is OPTIONAL.
13291336
CapacityRange capacity_range = 3;
1337+
1338+
// The path where the volume is staged, if the plugin has the
1339+
// STAGE_UNSTAGE_VOLUME capability, otherwise empty.
1340+
// If not empty, it MUST be an absolute path in the root
1341+
// filesystem of the process serving this request.
1342+
// This field is OPTIONAL.
1343+
string staging_path = 4;
13301344
}
13311345

13321346
message NodeExpandVolumeResponse {

0 commit comments

Comments
 (0)