Bug 1953674

Summary: [RFE] Add resize to ovirt CSI driver
Product: OpenShift Container Platform Reporter: Gal Zaidman <gzaidman>
Component: StorageAssignee: Gal Zaidman <gzaidman>
Storage sub component: oVirt CSI Driver QA Contact: michal <mgold>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: anowak, aos-bugs, jpasztor, lleistne, mburman, scuppett
Version: 4.8   
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: Adding resize capability to the ovirt csi driver. Reason: Sometimes users will want to increase the size of their existing PVCs. Before this feature, the user would need to create a new PVC with the increased size, move all the content of the old PV to the new PV and delete the old PVC. This is a painful process since it can cause data loss and can be a problem if there is not enough space for both PVCs. Result: Now a use can just edit an existing PVC and the ovirt csi driver will resize the underlying oVirt disk, resulting in a much better user experience
Story Points: ---
Clone Of:
: 1980340 (view as bug list) Environment:
Last Closed: 2021-10-18 17:30:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1964266, 1983933    
Bug Blocks: 1980340    

Description Gal Zaidman 2021-04-26 15:50:35 UTC
User story:

As an OCP user, I want to increase the size of the persistent volume claim after it is created.

Description:

The CSI resize side container is now stable enough to be added to the oVirt CSI driver.

The CSI external-resizer is a sidecar container that watches the Kubernetes API server for PersistentVolumeClaim object edits and triggers ControllerExpandVolume operations against a CSI endpoint if user requested more storage on PersistentVolumeClaim object.

See implementing CSI notes:
- Volume Expansion[1]
- CSI Spec[2]
- Controller Expand (Volume Resize) Secret[3]

Volume Expansion

CSI Spec

Controller Expand (Volume Resize) Secret

** Other platforms CSI Drivers already support resizing the persistent volume.

Acceptance criteria:

- CSI Tests suite passes with `nodeExpansion=true`
- Users can easily expand the PVC they created after creation.
- Everything is deployed by default by the CSI Opearator

Verification steps:

- Create a PVC
- After PVC is created, edit the PVC Object and increase the size
- Check that the PVC disk in RHV is attached and have the correct size.

Repeat the process for each storage class configuration (block, xfs,ext4 ...)

Notes:
See https://kubernetes-csi.github.io/docs/external-resizer.html for more info on the external resizer

[1] https://kubernetes-csi.github.io/docs/volume-expansion.html?highlight=ControllerExpandVolume#volume-expansion
[2] https://github.com/container-storage-interface/spec/blob/master/spec.md
[3] https://kubernetes-csi.github.io/docs/secrets-and-credentials-storage-class.html?highlight=ControllerExpandVolume#controller-expand-volume-resize-secret

Comment 1 Gal Zaidman 2021-06-10 11:28:09 UTC
*** Bug 1931805 has been marked as a duplicate of this bug. ***

Comment 4 michal 2021-08-08 11:49:38 UTC
ocp: 4.9.0-0.nightly-2021-08-04-131508

check resize of PVC after creation.

Comment 7 errata-xmlrpc 2021-10-18 17:30:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:3759