-
Notifications
You must be signed in to change notification settings - Fork 571
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
[BUG] FileSystemResizePending event is not emited on PVC resizing #2749
Comments
To clarify the expectation, AFAIK there are 3 phases for PVC expansion in order: Normal -> Resizing -> FileSystemResizePending. Base on how K8s implements support for the external resize controller, Longhorn has intentionally stopped before the FileSystemResizePending phase here because currently Longhorn only supports offline expansion.
Therefore, I am not sure if this case is still valid even if the FileSystemResizePending condition is there. Because Longhorn requires the volume to be in the detached state - To prevent the frontend expansion from interference by unexpected data R/W. Thus, there shouldn't be a pod waiting to be restart... |
I did not know that Resizing comes before FileSystemResizePending.
So you mean that there is no way for Longhorn to proceed to FileSystemResizePending state while pod is running, right? And it seems like simple pod deletion does not trigger resizing because the volume does not have enough time to detach before pod is restarted. |
Longhorn does not support volume expansion while the pod is running. |
But can Longhorn wait for volume detach in |
The volume needs to be in the detached state before the Longhorn controller server calls for volume expansion. And this is when the Resizing condition will be added to the PVC indicating the resizing had started. And because the volume is not detached, the PVC event then shows |
If I got it right you mean that Try this
|
AFAIK it will be added when the ControllerExpandVolume RPC is called.
I believe that is expected according to the KEP.
You can try to detach the volume and wait for a while (depends on the exponential backoff time), the condition should get removed. |
I see, so there is nothing that could be done in Longhorn to help such operators that handles pvc expansion and waits for
Yeah, you right |
AFAIK and there is online volume expansion in planning. |
Can you please take a look at a comment in strimzi/strimzi-kafka-operator#5234 (comment)? |
ATM, Longhorn does not support auto detection on whether a volume needs to be resized. You can create a Feature request for this. |
@almorgv @c3y1huang FSRezizePending is only set on the PVC, if the csi driver implements NodeExpandVolume. We currently don't use the csi driver for filesystem expansion, we are planning to transition to that though. The other issue is that we use an old resizer side car which does not check for volumes in use and always tries to call ControllerExpandVolume. We are planning on updating this as part of #2388 |
I'm having the same problem right now. I wouldn't even mind restarting the pods manually after updating the PVC but in the current state it's really hard to expand volumes for stateful sets without tearing down the whole STS. Can longhorn maybe check if the volume is supposed to be resized before attaching it again and instead do the resizing? Currently when the pvc is changed and the pod is stopped the sts controller recreates it so quickly that a resize isn't possible. I have to delete the sts (with cascade= orphan) then delete the pod, wait 4-5 minutes for it to be resized and then create the sts again, then continue with the other pods of the sts the same way. I'd expect it to be in a pending state and when I restart the pod it will wait until the resize happened. |
Describe the bug
FileSystemResizePending
event is not emited on pvc resizing.We use strimzi-kafka-operator that handles volume resizing and waiting for
FileSystemResizePending
condition to restart pods:But once PVC requested size is modified it status changes to
Resizing
.PVC events:
To Reproduce
Steps to reproduce the behavior:
Resizing
and noFileSystemResizePending
in eventsExpected behavior
FileSystemResizePending
status beforeResizing
Environment:
The text was updated successfully, but these errors were encountered: