Bug 1554675

Summary: Add "FileSystemResizePending" event to oc describe pvc cmd for cinder volume expand
Product: OpenShift Container Platform Reporter: Qin Ping <piqin>
Component: StorageAssignee: Hemant Kumar <hekumar>
Status: CLOSED ERRATA QA Contact: Liang Xia <lxia>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.9.0CC: aos-bugs, aos-storage-staff, lxia
Target Milestone: ---   
Target Release: 3.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-20 08:46:56 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:

Description Qin Ping 2018-03-13 06:56:50 UTC
Description of problem:
For cinder volume expand, only when the pvc condition is FileSystemResizePending, user can create a pod using the pvc to perform filesystem resizing.
So, if we can add a event to oc describe pvc cmd, it will make user more easily to know when to create pod.


Version-Release number of selected component (if applicable):
openshift v3.9.4
kubernetes v1.9.1+a0ce1bc657

How reproducible:
always

Steps to Reproduce:
1. Enable feature gates:ExpandPersistentVolumes and admission controller:PersistentVolumeClaimResize.
2. Create a storageclass with allowVolumeExpansion=true
3. Create a dynamic provisioning PVC using the storageclass created before
4. Modify PVC spec.resources.requests.storage to expand PVC
5. oc get pvc -o yaml will see the pvc conditions
6. oc describe pvc

Actual results:
oc describe pvc will not report event for pvc conditions changing to "FileSystemResizePending".

Expected results:
Report the event to user.

Master Log:

Node Log (of failed PODs):

PV Dump:

PVC Dump:

StorageClass Dump (if StorageClass used by PV/PVC):

Additional info:

    conditions:
    - lastProbeTime: null
      lastTransitionTime: 2018-03-12T08:24:31Z
      message: Waiting for user to (re-)start a pod to finish file system resize of
        volume on node.
      status: "True"
      type: FileSystemResizePending

Comment 2 Hemant Kumar 2018-04-04 02:07:11 UTC
To be honest this is not exactly a bug. We always knew that "oc describe" command for PVC does not display conditions yet because it is an alpha feature.

Comment 3 Liang Xia 2018-12-11 02:35:34 UTC
The PR in #comment 1 already merged, move to QA to check whether the issue is fixed or not.

Comment 4 Liang Xia 2018-12-14 06:17:46 UTC
Checked on below 3.9 OCP,
# oc version
oc v3.9.58
kubernetes v1.9.1+a0ce1bc657
features: Basic-Auth GSSAPI Kerberos SPNEGO
Server https://preserve-qe-lxia-39-master-etcd-1:8443
openshift v3.9.58
kubernetes v1.9.1+a0ce1bc657


# oc describe pvc mypvc
Name:          mypvc
Namespace:     default
StorageClass:  standard
Status:        Bound
Volume:        pvc-945f5017-ff66-11e8-bb66-fa163ef30df0
Labels:        name=dynamic-pvc
Annotations:   pv.kubernetes.io/bind-completed=yes
               pv.kubernetes.io/bound-by-controller=yes
               volume.beta.kubernetes.io/storage-provisioner=kubernetes.io/cinder
Finalizers:    []
Capacity:      1Gi
Access Modes:  RWO
Conditions:
  Type                      Status  LastProbeTime                     LastTransitionTime                Reason  Message
  ----                      ------  -----------------                 ------------------                ------  -------
  FileSystemResizePending   True    Mon, 01 Jan 0001 00:00:00 +0000   Fri, 14 Dec 2018 01:14:33 -0500           Waiting for user to (re-)start a pod to finish file system resize of volume on node.
Events:
  Type    Reason                 Age   From                         Message
  ----    ------                 ----  ----                         -------
  Normal  ProvisioningSucceeded  8m    persistentvolume-controller  Successfully provisioned volume pvc-945f5017-ff66-11e8-bb66-fa163ef30df0 using kubernetes.io/cinder

Comment 6 errata-xmlrpc 2019-02-20 08:46:56 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, 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/RHBA-2019:0331