You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarifies that `NodePublishVolume` can only be called multiple times on
a node for a volume if that volume can be published on multiple nodes
(i.e., has MULTI_NODE capability).
If a volume cannot be published on multiple node, it's weird that we
allow it to be publish multiple times on a single node. In other words,
it's weird that we allow two workloads to share a volume if they are on
the same node, but don't have a way to do that if they are on different
nodes.
Copy file name to clipboardExpand all lines: spec.md
+17-3Lines changed: 17 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -523,10 +523,12 @@ message VolumeCapability {
523
523
enum Mode {
524
524
UNKNOWN = 0;
525
525
526
-
// Can be published as read/write at one node at a time.
526
+
// Can only be published once as read/write on a single node, at
527
+
// any given time.
527
528
SINGLE_NODE_WRITER = 1;
528
529
529
-
// Can be published as readonly at one node at a time.
530
+
// Can only be published once as readonly on a single node, at
531
+
// any given time.
530
532
SINGLE_NODE_READER_ONLY = 2;
531
533
532
534
// Can be published as readonly at multiple nodes simultaneously.
@@ -1016,12 +1018,22 @@ It is NOT REQUIRED for a controller plugin to implement the `LIST_VOLUMES` capab
1016
1018
1017
1019
This RPC is called by the CO when a workload that wants to use the specified volume is placed (scheduled) on a node.
1018
1020
The Plugin SHALL assume that this RPC will be executed on the node where the volume will be used.
1019
-
This RPC MAY be called by the CO multiple times on the same node for the same volume with possibly different `target_path` and/or auth credentials.
1021
+
1020
1022
If the corresponding Controller Plugin has `PUBLISH_UNPUBLISH_VOLUME` controller capability, the CO MUST guarantee that this RPC is called after `ControllerPublishVolume` is called for the given volume on the given node and returns a success.
1021
1023
1022
1024
This operation MUST be idempotent.
1023
1025
If this RPC failed, or the CO does not know if it failed or not, it MAY choose to call `NodePublishVolume` again, or choose to call `NodeUnpublishVolume`.
1024
1026
1027
+
This RPC MAY be called by the CO multiple times on the same node for the same volume with possibly different `target_path` and/or auth credentials if the volume has MULTI_NODE capability (i.e., `access_mode` is either `MULTI_NODE_READER_ONLY`, `MULTI_NODE_SINGLE_WRITER` or `MULTI_NODE_MULTI_WRITER`).
1028
+
The following table shows what the Plugin SHOULD return when receiving a second `NodePublishVolume` on the same volume on the same node:
| Volume does not exists | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. |
1087
1099
| Operation pending for volume | 9 FAILED_PRECONDITION | Indicates that there is a already an operation pending for the specified volume. In general the Cluster Orchestrator (CO) is responsible for ensuring that there is no more than one call "in-flight" per volume at a given time. However, in some circumstances, the CO MAY lose state (for example when the CO crashes and restarts), and MAY issue multiple calls simultaneously for the same volume. The Plugin, SHOULD handle this as gracefully as possible, and MAY return this error code to reject secondary calls. | Caller SHOULD ensure that there are no other calls pending for the specified volume, and then retry with exponential back off. |
1100
+
| Exceeds capabilities | 10 ABORTED | Indicates that the CO has exceeded the volume's capabilities because the volume does not have MULTI_NODE capability. | Caller MAY retry at a higher-level by calling `ValidateVolumeCapabilities` to validate the volume capabilities, or wait for the volume to be unpublished on the node. |
0 commit comments