-
Notifications
You must be signed in to change notification settings - Fork 48
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
Per workspace PVC size calculation can abort early and miss some volumes #1162
Milestone
Comments
AObuchow
added a commit
to AObuchow/devworkspace-operator
that referenced
this issue
Aug 9, 2023
Fix devfile#1162 The following rules are supposed to be used when computing the per-workspace PVC size: 1. If all volumes in a devworkspace specify their size, the computed PVC size will be used. 2. If all volumes in a devworkspace either specify their size or are ephemeral, the computed PVC size will be used. 3. If at least one volume in a devworkspace specifies its size, and the computed PVC size is greater than the default per-workspace PVC size, the computed PVC size will be used. Prior to this commit, rule 3 was not being respected in cases where a volume did not define it's size, but later volumes (in the volume array) did define their sizes. This commit prevents aborting the PVC size calculation too early, and modifies the test case that was relevant to rule 3 to ensure this case is accounted for. Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
AObuchow
added a commit
to AObuchow/devworkspace-operator
that referenced
this issue
Aug 9, 2023
Fix devfile#1162 The following rules are supposed to be used when computing the per-workspace PVC size: 1. If all volumes in a devworkspace specify their size, the computed PVC size will be used. 2. If all volumes in a devworkspace either specify their size or are ephemeral, the computed PVC size will be used. 3. If at least one volume in a devworkspace specifies its size, and the computed PVC size is greater than the default per-workspace PVC size, the computed PVC size will be used. Prior to this commit, rule 3 was not being respected in cases where a volume did not define its size, but later volumes (in the volume array) did define their sizes. This commit prevents aborting the PVC size calculation too early, and modifies the test case that was relevant to rule 3 to ensure this case is accounted for. Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
3 tasks
AObuchow
added a commit
that referenced
this issue
Aug 10, 2023
Fix #1162 The following rules are supposed to be used when computing the per-workspace PVC size: 1. If all volumes in a devworkspace specify their size, the computed PVC size will be used. 2. If all volumes in a devworkspace either specify their size or are ephemeral, the computed PVC size will be used. 3. If at least one volume in a devworkspace specifies its size, and the computed PVC size is greater than the default per-workspace PVC size, the computed PVC size will be used. Prior to this commit, rule 3 was not being respected in cases where a volume did not define its size, but later volumes (in the volume array) did define their sizes. This commit prevents aborting the PVC size calculation too early, and modifies the test case that was relevant to rule 3 to ensure this case is accounted for. Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
In computing the per-workspace PVC size, the following rules are supposed to be used
However, in some cases, the third option is followed, as collecting all defined PVC sizes exits early after encountering a volume that does not define a size.
How To Reproduce
It depends on iteration order for PVC volumes, though the following DevWorkspace should reproduce
(we would expect the per-workspace PVC to be 10Gi instead of the default 5Gi here)
Additional context
Original PR: #1020
Related issue: https://issues.redhat.com/browse/CRW-4609
The text was updated successfully, but these errors were encountered: