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

add volumeGroup spec #54

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Conversation

matancarmeli7
Copy link
Contributor

No description provided.

@mergify mergify bot added the design Adds or updates an operation or service label Jun 28, 2023
Copy link
Contributor

@nixpanic nixpanic left a comment

Choose a reason for hiding this comment

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

Looks pretty complete at a first glance. Make sure you use existing CSI messages/options where you can, it will prevent duplicate type definitions and special handling (like not logging secrets) in CSI-drivers that implement this feature.

identity/README.md Outdated Show resolved Hide resolved
@@ -0,0 +1,455 @@
# Container Storage Interface (CSI)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not CSI directly, call it CSI-Addons instead?

As this is heavlly based on CSI and Kubernetes proposals for VolumeGroups, it would be nice to mention that and maybe provide links to the abandoned/rejected PRs/issues.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

volumegroup/README.md Outdated Show resolved Hide resolved
volumegroup/README.md Outdated Show resolved Hide resolved
@matancarmeli7 matancarmeli7 force-pushed the add_volume_group_spec branch 4 times, most recently from d0f8038 to 3d178bf Compare June 29, 2023 13:05
// Indicates that this message is OPTIONAL and part of an experimental
// API that may be deprecated and eventually removed between minor
// releases.
bool vg_alpha_message = 1102;
Copy link
Contributor

Choose a reason for hiding this comment

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

The alpha notations are not needed, we don't use them for other operations/messages/.. in csi-addons either. If you want to use this, use the defined values that are in csi.proto and drop the definitions from this file.

Leaving them out has my preference, there is currently no plan to handle alpha annotation specially.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done removed method/message alpha

volumegroup/README.md Outdated Show resolved Hide resolved
@matancarmeli7 matancarmeli7 force-pushed the add_volume_group_spec branch 2 times, most recently from 90455fb to bd35954 Compare July 3, 2023 06:37

## Container Storage Interface

This section describes the interface between COs and Plugins.
Copy link
Contributor

Choose a reason for hiding this comment

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

A description of what VolumeGroups are, and how users can benefit from them would be good to have here. Some hints are in the CreateVolumeGroup section, but more practical examples should be added here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@matancarmeli7 matancarmeli7 force-pushed the add_volume_group_spec branch 2 times, most recently from 15d6023 to 9736cbe Compare July 6, 2023 14:21
nixpanic
nixpanic previously approved these changes Jul 6, 2023
VOLUME_GROUP = 1;
// LIMIT_VOLUME_TO_ONE_VG indicates that the CSI-driver does not support
// that one volume will be in multiple VGs, so it can be in only one VG.
LIMIT_VOLUME_TO_ONE_VG = 2;
Copy link
Member

Choose a reason for hiding this comment

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

LIMIT_VOLUME_TO_ONE_VG to LIMIT_VOLUME_TO_ONE_VOLUME_GROUP

Copy link
Member

Choose a reason for hiding this comment

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

Expand VG in all other places 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.

done

// won't delete the volumes under it.
DO_NOT_ALLOW_VG_TO_DELETE_VOLUMES = 3;
// MODIFY_GROUP_MEMBERSHIP indicates that the CSI-driver
// supports that nodifying the VG.
Copy link
Member

Choose a reason for hiding this comment

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

nodifying to modifying

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

DO_NOT_ALLOW_VG_TO_DELETE_VOLUMES = 3;
// MODIFY_GROUP_MEMBERSHIP indicates that the CSI-driver
// supports that nodifying the VG.
MODIFY_GROUP_MEMBERSHIP = 4;
Copy link
Member

Choose a reason for hiding this comment

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

it should be called MODIFY_VOLUME_GROUP why this is called MODIFY_GROUP_MEMBERSHIP?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because the RPC call that it will enable, is ModifyVolumeGroupMembershipResponse, what do you think better? MODIFY_VOLUME_GROUP or MODIFY_VOLUME_GROUP_Membership?

Copy link
Member

Choose a reason for hiding this comment

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

MODIFY_VOLUME_GROUP looks good to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


option go_package = ".;volumegroup";

// Controller holds the RPC methods for replication and all the methods it
Copy link
Member

Choose a reason for hiding this comment

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

this is not about replication, comment need to be updated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, changed it

// If no volume_ids are provided, all existing volumes will
// be removed from the group.
// This field is OPTIONAL.
repeated string volume_ids = 2;
Copy link
Member

Choose a reason for hiding this comment

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

Can you please explain why this is an optional, not required?

all existing volumes will be removed from the group.

What is the difference between this and Deleting a volumeGroup. Giving more flexibility to the users might create a problem.

Copy link
Contributor

Choose a reason for hiding this comment

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

Some storage systems can have empty VolumeGroups, or the VolumeGroup needs to be created before volumes can be added to it. Possibly VolumeGroups can not be created dynamically, only by storage admins (with super powers 🦸). For these cases, the GetVolumeGroup RPC can be used, after which volumes can be added.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree with @nixpanic, and we need the volume_ids in the modify call, because the driver needs to know which volumes to add and which to remove. In delete call, we just deleting the VG we don't care about the volumes in it

Copy link
Member

Choose a reason for hiding this comment

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

sounds good 👍🏻

message ModifyVolumeGroupMembershipResponse {
// Contains all attributes of the modified volume group.
// This field is REQUIRED.
VolumeGroup volume_group = 1;
Copy link
Member

Choose a reason for hiding this comment

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

we we need to send the group detail in response?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, because we can know by this field which volumeID were changed/ which one are now in the volumeGroup in the storage

@mergify mergify bot dismissed nixpanic’s stale review July 9, 2023 06:46

Pull request has been modified.

// plugin can invoke RPCs that require access to the storage system,
// similar to the CSI Controller (provisioner).
VOLUME_GROUP = 1;
// LIMIT_VOLUME_TO_ONE_VOLUME_GROUP indicates that the CSI-driver does not support
Copy link
Contributor

Choose a reason for hiding this comment

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

CI fails on this line:

[identity/identity.proto:181:1] The line length is 88, but it must be shorter than 80

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@Madhu-1
Copy link
Member

Madhu-1 commented Jul 12, 2023

@Mergifyio rebase

Signed-off-by: matancarmeli7 <[email protected]>
@mergify
Copy link

mergify bot commented Jul 12, 2023

rebase

✅ Branch has been successfully rebased

@mergify mergify bot merged commit cc24a2c into csi-addons:main Jul 12, 2023
6 checks passed
Copy link
Contributor

@ShyamsundarR ShyamsundarR left a comment

Choose a reason for hiding this comment

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

Late, but as this is a design noting comments here for the future.

// ListVolumeGroups RPC call to list volume groups.
rpc ListVolumeGroups(ListVolumeGroupsRequest)
returns (ListVolumeGroupsResponse) {}
// CreateVolumeGroup RPC call to get a volume group.
Copy link
Contributor

Choose a reason for hiding this comment

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

(nit) comment needs update based on the function declaration below

which might not be a physical group on the storage backend. In this case, an empty group can still be created by the CO
to hold volumes. After the empty group is created, create a new volume, specifying the group name in the volume.

At restore time, create a single volume from individual snapshot and then join an existing group. Create an empty group.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is currently just a definition of the group CRUD APIs, so some doubt remains on how these other functionalities (like restore) would be provided in the future. Which I assume would come in later, but just noting it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Adds or updates an operation or service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants