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

proposal: Expand the PVC's initial capacity based on the largest capacity in specified PVCs. #174

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

llamerada-jp
Copy link
Contributor

Signed-off-by: Yuji Ito [email protected]

@llamerada-jp llamerada-jp requested a review from a team as a code owner January 31, 2023 08:30
@llamerada-jp llamerada-jp force-pushed the proposal-resize-by-group branch 3 times, most recently from 872b1b0 to 29a2339 Compare January 31, 2023 08:49
@toshipp toshipp requested review from peng225 and satoru-takeuchi and removed request for pluser and satoru-takeuchi February 1, 2023 01:39
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved

Rules for grouping & initial sizing

- If creating a PVC has a `resize.topolvm.io/pre-resize-group-by` annotation and the label specified in the annotation exists, existing PVCs with matching values are determined to be in the same group.
Copy link
Contributor

Choose a reason for hiding this comment

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

IMHO, the name resize.topolvm.io/pre-resize-group-by is ambiguous because it is not clear what pre refers to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@peng225 @daichimukai @satoru-takeuchi

How about resize.topolvm.io/init-resize-group-by or resize.topolvm.io/initial-resize-group-by ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer resize.topolvm.io/initial-resize-group-by.

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

Choose a reason for hiding this comment

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

I agree with @peng225 and @daichimukai

docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved
docs/proposals/resize-when-creating-by-group.md Outdated Show resolved Hide resolved

Rules for grouping & initial sizing

- If creating a PVC has a `resize.topolvm.io/pre-resize-group-by` annotation and the label specified in the annotation exists, existing PVCs with matching values are determined to be in the same group.
Copy link
Contributor

Choose a reason for hiding this comment

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

I prefer resize.topolvm.io/initial-resize-group-by.

@llamerada-jp llamerada-jp force-pushed the proposal-resize-by-group branch from ed4dd6a to 8474139 Compare February 9, 2023 09:01
@llamerada-jp llamerada-jp requested a review from peng225 February 9, 2023 09:03
Signed-off-by: Yuji Ito <[email protected]>
Co-authored-by: Shinya Hayashi <[email protected]>
@llamerada-jp llamerada-jp force-pushed the proposal-resize-by-group branch from 9dc212f to 539ece4 Compare February 13, 2023 09:41
@llamerada-jp llamerada-jp requested a review from peng225 February 13, 2023 09:41
peng225
peng225 previously approved these changes Feb 14, 2023
Comment on lines 9 to 12
One use case for pvc-autoresizer is automatically expanding a PV/PVC for multiple Pod/PV pairs, such as a MySQL cluster.
In such a cluster, if a Pod/PV fails and a PV/PVC is rebuilt by the restore process, a PV is created based on the PVC template. Even if a PV of the same size as the others is actually needed, a PV of the template's capacity is created. As a result, the restore process stops due to insufficient capacity.

To solve this problem, we are planning to add a new feature to create a PV/PVC with sufficient capacity when PVCs of the same group already exist.
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
One use case for pvc-autoresizer is automatically expanding a PV/PVC for multiple Pod/PV pairs, such as a MySQL cluster.
In such a cluster, if a Pod/PV fails and a PV/PVC is rebuilt by the restore process, a PV is created based on the PVC template. Even if a PV of the same size as the others is actually needed, a PV of the template's capacity is created. As a result, the restore process stops due to insufficient capacity.
To solve this problem, we are planning to add a new feature to create a PV/PVC with sufficient capacity when PVCs of the same group already exist.
Sometimes we needs to resize multiple PVCs at once. It typicall happens in StatefulSet. Here is the examples in MySQL clusters created by [moco](https://github.com/cybozu-go/moco).
1. Moco creates a StatefulSet to manage a MySQL cluster. In addition, a PVC is consumed per one instance(pod). Let assume the initial volume size, which is written in VolumeClaimTemplate, is 100GiB.
2. These PVCs has expanded to 200GiB according to the growth of DB.
3. One instance dies. Then a new pod and the corresponding instance is created to fill a vacancy.
4. The new PVC, which is consumed by the new instance is created. In this case, the size of the new PVC is not 200GiB, but 100GiB.
5. The data clone to the existing instances to the new instance might fail due to the lack of volume size.
This proposal is to resolve the above-mentioend problem.

daichimukai
daichimukai previously approved these changes Feb 16, 2023
@llamerada-jp llamerada-jp dismissed stale reviews from daichimukai and peng225 via 2fbeaf0 February 17, 2023 04:53
Signed-off-by: Yuji Ito <[email protected]>
Co-authored-by: Satoru Takeuchi <[email protected]>
@llamerada-jp llamerada-jp requested a review from peng225 February 17, 2023 04:56
@llamerada-jp llamerada-jp merged commit f158a7d into main Feb 20, 2023
@llamerada-jp llamerada-jp deleted the proposal-resize-by-group branch February 20, 2023 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants