-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecates volume plugin’s ability to declare offline/online expansion capability #429
base: master
Are you sure you want to change the base?
Deprecates volume plugin’s ability to declare offline/online expansion capability #429
Conversation
6eb7c8c
to
027e794
Compare
027e794
to
df3747d
Compare
cc @xing-yang |
spec.md
Outdated
@@ -644,6 +644,7 @@ message PluginCapability { | |||
oneof type { | |||
// Service that the plugin supports. | |||
Service service = 1; | |||
// deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"deprecated" should also be added in front of the "message VolumeExpansion" on line 598 as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -1930,24 +1945,15 @@ This RPC allows the CO to expand the size of a volume. | |||
This operation MUST be idempotent. | |||
If a volume corresponding to the specified volume ID is already larger than or equal to the target capacity of the expansion request, the plugin SHOULD reply 0 OK. | |||
|
|||
This call MAY be made by the CO during any time in the lifecycle of the volume after creation if plugin has `VolumeExpansion.ONLINE` capability. | |||
This call MAY be made by the CO during any time in the lifecycle of the volume after creation but an SP may not permit controller expansion of volumes which are controller published or available on a node. In which case - the plugin may return gRPC error code `FAILED_PRECONDITION` (Volume in use) and CO SHOULD ensure that volume is not published before retrying with exponential backoff. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 659 says "published and available volumes on a node". Here it says "published or available on a node". Is it "and" or "or"? Should be consistent in both places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or makes more sense I think
|
||
Examples: | ||
* Offline Volume Expansion: | ||
* Offline Volume Expansion(SP does not permit controller expansion of controller published volume): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Add a space before (
// Deprecated - Ability for a plugin to delcare online and offline | ||
// controller expansion capabilities via PluginCapability | ||
// is deprecated. A plugin may support either mode of operation | ||
// without having to declare them in PluginCapability. | ||
message VolumeExpansion { | ||
enum Type { | ||
UNKNOWN = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also remove the comments on ONLINE = 1;
and OFFLINE = 2;
below and replace them with // Deprecated
+ [deprecated=true]
annotation?
@@ -1930,24 +1945,15 @@ This RPC allows the CO to expand the size of a volume. | |||
This operation MUST be idempotent. | |||
If a volume corresponding to the specified volume ID is already larger than or equal to the target capacity of the expansion request, the plugin SHOULD reply 0 OK. | |||
|
|||
This call MAY be made by the CO during any time in the lifecycle of the volume after creation if plugin has `VolumeExpansion.ONLINE` capability. | |||
This call MAY be made by the CO during any time in the lifecycle of the volume after creation but an SP may not permit controller expansion of volumes which are controller published or available on a node. In which case - the plugin may return gRPC error code `FAILED_PRECONDITION` (Volume in use) and CO SHOULD ensure that volume is not published before retrying with exponential backoff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This call MAY be made by the CO during any time in the lifecycle of the volume after creation but an SP may not permit controller expansion of volumes which are controller published or available on a node. In which case - the plugin may return gRPC error code `FAILED_PRECONDITION` (Volume in use) and CO SHOULD ensure that volume is not published before retrying with exponential backoff. | |
This call MAY be made by the CO during any time in the lifecycle of the volume after creation. If an SP does not permit controller expansion of volumes which are controller published or available on a node, the SP may return a gRPC error code `FAILED_PRECONDITION` (Volume in use) and the CO SHOULD ensure that volume is not published on controller or node before retrying with exponential backoff. |
@@ -1930,24 +1945,15 @@ This RPC allows the CO to expand the size of a volume. | |||
This operation MUST be idempotent. | |||
If a volume corresponding to the specified volume ID is already larger than or equal to the target capacity of the expansion request, the plugin SHOULD reply 0 OK. | |||
|
|||
This call MAY be made by the CO during any time in the lifecycle of the volume after creation if plugin has `VolumeExpansion.ONLINE` capability. | |||
This call MAY be made by the CO during any time in the lifecycle of the volume after creation but an SP may not permit controller expansion of volumes which are controller published or available on a node. In which case - the plugin may return gRPC error code `FAILED_PRECONDITION` (Volume in use) and CO SHOULD ensure that volume is not published before retrying with exponential backoff. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or makes more sense I think
|
||
Examples: | ||
* Offline Volume Expansion: | ||
* Offline Volume Expansion(SP does not permit controller expansion of controller published volume): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove the offline example altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this example is very important for CSI drivers that support offline volume expansion. It clearly explains how this case would work.
@@ -2003,7 +2009,7 @@ message ControllerExpandVolumeResponse { | |||
|-----------|-----------|-------------|-------------------| | |||
| Exceeds capabilities | 3 INVALID_ARGUMENT | Indicates that CO has specified capabilities not supported by the volume. | Caller MAY verify volume capabilities by calling ValidateVolumeCapabilities and retry with matching capabilities. | | |||
| Volume does not exist | 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. | | |||
| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be expanded because it is currently published on a node but the plugin does not have ONLINE expansion capability. | Caller SHOULD ensure that volume is not published and retry with exponential back off. | | |||
| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be expanded because it is currently published on a node. | Caller SHOULD ensure that volume is not published and retry with exponential back off. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be expanded because it is currently published on a node. | Caller SHOULD ensure that volume is not published and retry with exponential back off. | | |
| Volume in use | 9 FAILED_PRECONDITION | Indicates that the volume corresponding to the specified `volume_id` could not be expanded because it is currently published on a controller or node and the SP does not support expansion while published. | Caller SHOULD ensure that volume is not published to controller or node before retrying with exponential back off. | |
Also, please add a
block with a draft of the intended release note so we can all review and agree on that in this PR as well. |
…lared in plugin capabilities. Ability for a plugin to delcare online and offline controller expansion capabilities via GetPluginCapabilities is deprecated. A plugin may support either mode of operation without having to declare them in GetPluginCapabilities call. If a plugin can not support controller expansion of published volume it may return Volume-in-use error and CO should ensure that volume is not published before retrying with exponential backoff.
5523a1b
to
226ec73
Compare
Ability for a plugin to delcare online and offline controller expansion
capabilities via GetPluginCapabilities is deprecated. A plugin may
support either mode of operation without having to declare them
in GetPluginCapabilities call.
If a plugin can not support controller expansion of published volume
it may return Volume-in-use error and CO should ensure that volume is
not published before retrying with exponential backoff.