-
Notifications
You must be signed in to change notification settings - Fork 20
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
Conversation
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.
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.
volumegroup/README.md
Outdated
@@ -0,0 +1,455 @@ | |||
# Container Storage Interface (CSI) |
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 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.
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.
done
d0f8038
to
3d178bf
Compare
volumegroup/README.md
Outdated
// 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; |
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.
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.
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.
done removed method/message alpha
90455fb
to
bd35954
Compare
volumegroup/README.md
Outdated
|
||
## Container Storage Interface | ||
|
||
This section describes the interface between COs and Plugins. |
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.
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.
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.
done
15d6023
to
9736cbe
Compare
identity/README.md
Outdated
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; |
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.
LIMIT_VOLUME_TO_ONE_VG to LIMIT_VOLUME_TO_ONE_VOLUME_GROUP
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.
Expand VG in all other places 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.
done
identity/README.md
Outdated
// 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. |
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.
nodifying
to modifying
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.
done
identity/README.md
Outdated
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; |
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.
it should be called MODIFY_VOLUME_GROUP
why this is called MODIFY_GROUP_MEMBERSHIP?
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.
because the RPC call that it will enable, is ModifyVolumeGroupMembershipResponse
, what do you think better? MODIFY_VOLUME_GROUP
or MODIFY_VOLUME_GROUP_Membership
?
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.
MODIFY_VOLUME_GROUP looks good to me.
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.
done
volumegroup/volumegroup.proto
Outdated
|
||
option go_package = ".;volumegroup"; | ||
|
||
// Controller holds the RPC methods for replication and all the methods it |
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 is not about replication, comment need to be updated
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.
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; |
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.
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.
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.
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.
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.
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
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.
sounds good 👍🏻
message ModifyVolumeGroupMembershipResponse { | ||
// Contains all attributes of the modified volume group. | ||
// This field is REQUIRED. | ||
VolumeGroup volume_group = 1; |
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.
we we need to send the group detail in response?
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.
yes, because we can know by this field which volumeID were changed/ which one are now in the volumeGroup in the storage
931309d
to
2c3666f
Compare
532ff7b
to
c7e2717
Compare
identity/identity.proto
Outdated
// 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 |
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.
CI fails on this line:
[identity/identity.proto:181:1] The line length is 88, but it must be shorter than 80
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.
done
6f01613
to
d8d7817
Compare
@Mergifyio rebase |
Signed-off-by: matancarmeli7 <[email protected]>
✅ Branch has been successfully rebased |
d8d7817
to
662a996
Compare
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.
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. |
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) 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. |
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 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.
No description provided.