Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gnufied
Copy link
Contributor

@gnufied gnufied commented May 7, 2020

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.

@gnufied
Copy link
Contributor Author

gnufied commented May 13, 2020

cc @jdef @saad-ali

@gnufied
Copy link
Contributor Author

gnufied commented May 14, 2020

cc @xing-yang

spec.md Show resolved Hide resolved
spec.md Outdated
@@ -644,6 +644,7 @@ message PluginCapability {
oneof type {
// Service that the plugin supports.
Service service = 1;
// deprecated
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@gnufied gnufied changed the title Support online and offline expansion without requiring them to be declared Deprecates volume plugin’s ability to declare offline/online expansion capability May 14, 2020
@@ -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.

Copy link
Contributor

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.

Copy link
Member

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):
Copy link
Contributor

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;
Copy link
Member

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Member

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):
Copy link
Member

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?

Copy link
Contributor

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. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 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. |

@saad-ali
Copy link
Member

Also, please add a

 ```release-note

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants