Skip to content

Commit 3c23d41

Browse files
committed
Add error conditions and expand the wording
1 parent 1d55980 commit 3c23d41

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

csi.proto

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,7 +1227,9 @@ message NodeStageVolumeRequest {
12271227

12281228
// If SP has VOLUME_MOUNT_GROUP node capability and CO provides
12291229
// this field then SP MUST ensure that volume is mounted with
1230-
// provided volume_mount_group.
1230+
// provided volume_mount_group and all files and directories
1231+
// within the volume are readable and writable by the provided
1232+
// volume_mount_group.
12311233
// This is a OPTIONAL field.
12321234
string volume_mount_group = 7;
12331235
}
@@ -1304,7 +1306,12 @@ message NodePublishVolumeRequest {
13041306

13051307
// If SP has VOLUME_MOUNT_GROUP node capability and CO provides
13061308
// this field then SP MUST ensure that volume is mounted with
1307-
// provided volume_mount_group.
1309+
// provided volume_mount_group and all files and directories
1310+
// within the volume are readable and writable by the provided
1311+
// volume_mount_group.
1312+
// If NodeStageVolume was previously called with volume_mount_group
1313+
// CO must ensure that NodePublishVolume does not get called
1314+
// with different volume_mount_group for same volume_id.
13081315
// This is a OPTIONAL field.
13091316
string volume_mount_group = 9;
13101317
}

lib/go/csi/csi.pb.go

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,7 +2094,9 @@ message NodeStageVolumeRequest {
20942094
20952095
// If SP has VOLUME_MOUNT_GROUP node capability and CO provides
20962096
// this field then SP MUST ensure that volume is mounted with
2097-
// provided volume_mount_group.
2097+
// provided volume_mount_group and all files and directories
2098+
// within the volume are readable and writable by the provided
2099+
// volume_mount_group.
20982100
// This is a OPTIONAL field.
20992101
string volume_mount_group = 7;
21002102
}
@@ -2250,7 +2252,12 @@ message NodePublishVolumeRequest {
22502252
22512253
// If SP has VOLUME_MOUNT_GROUP node capability and CO provides
22522254
// this field then SP MUST ensure that volume is mounted with
2253-
// provided volume_mount_group.
2255+
// provided volume_mount_group and all files and directories
2256+
// within the volume are readable and writable by the provided
2257+
// volume_mount_group.
2258+
// If NodeStageVolume was previously called with volume_mount_group
2259+
// CO must ensure that NodePublishVolume does not get called
2260+
// with different volume_mount_group for same volume_id.
22542261
// This is a OPTIONAL field.
22552262
string volume_mount_group = 9;
22562263
}
@@ -2272,6 +2279,7 @@ The CO MUST implement the specified error recovery behavior when it encounters t
22722279
| Volume published but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified `volume_id` has already been published at the specified `target_path` but is incompatible with the specified `volume_capability` or `readonly` flag. | Caller MUST fix the arguments before retrying. |
22732280
| Exceeds capabilities | 9 FAILED_PRECONDITION | Indicates that the CO has exceeded the volume's capabilities because the volume does not have MULTI_NODE capability. | Caller MAY choose to call `ValidateVolumeCapabilities` to validate the volume capabilities, or wait for the volume to be unpublished on the node. |
22742281
| Staging target path not set | 9 FAILED_PRECONDITION | Indicates that `STAGE_UNSTAGE_VOLUME` capability is set but no `staging_target_path` was set. | Caller MUST make sure call to `NodeStageVolume` is made and returns success before retrying with valid `staging_target_path`. |
2282+
| Volume staged with different volume_mount_group | 9 FAILED_PRECONDITION | Indicates that volume with specified `volume_id` was node staged using different `volume_mount_group` on this node and hence can not be node published. | Caller MUST make sure that `NodePublishVolume` is called with same `volume_mount_group` which was used in `NodeStageVolume`. |
22752283

22762284

22772285
#### `NodeUnpublishVolume`

0 commit comments

Comments
 (0)