Bug 1525431 - [3.5]dynamic pvc should be controlled by openshift_logging_es_pvc_dynamic rather than openshift_logging_es_pvc_size
Summary: [3.5]dynamic pvc should be controlled by openshift_logging_es_pvc_dynamic r...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 3.5.1
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 3.5.z
Assignee: Jeff Cantrill
QA Contact: Anping Li
URL:
Whiteboard:
Depends On: 1463081
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-13 10:27 UTC by Anping Li
Modified: 2018-01-09 09:32 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1463081
Environment:
Last Closed: 2018-01-04 15:41:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Anping Li 2017-12-13 10:29:32 UTC
I hit similar issue when use openshift-ansible-3.5.146

Comment 2 Anping Li 2017-12-13 11:33:27 UTC
When openshift_logging_es_pvc_size is set, no matter what value openshift_logging_es_pvc_dynamic is, the dynamic PV will be created.

When openshift_logging_es_pvc_size isn't set, no matter what value openshift_logging_es_pvc_dynamic is, the dynamic pv won't be created.

Comment 4 Anping Li 2017-12-14 02:48:57 UTC
The dynamic pvc still be created with the following inventory variables.
openshift_logging_es_pvc_dynamic=false
openshift_logging_es_pvc_size=5Gi

It is not related to storageclass. If I remove all storageclass, the pvc is still be created with the above variables

# oc get storageclass
No resources found.

# oc get pvc -o yaml
apiVersion: v1
items:
- apiVersion: v1
  kind: PersistentVolumeClaim
  metadata:
    creationTimestamp: 2017-12-13T11:23:57Z
    labels:
      logging-infra: support
    name: logging-es-0
    namespace: logging
    resourceVersion: "20028"
    selfLink: /api/v1/namespaces/logging/persistentvolumeclaims/logging-es-0
    uid: 1c3b3f35-dff8-11e7-b7de-fa163e4c98be
  spec:
    accessModes:
    - ReadWriteOnce
    resources:
      requests:
        storage: 5Gi
  status:
    phase: Pending
kind: List
metadata: {}
resourceVersion: ""
selfLink: ""

Comment 5 ewolinet 2017-12-14 16:50:45 UTC
Can you confirm what version of OCP and K8S is installed on the server with oc version?

With later versions for a PVC to not be dynamic it should have a spec entry of storageClassName: "" (a dynamic PVC would not have a storageClassName entry at all).

At the time 3.5 was released a PVC was denoted as being dynamic if it had the annotation volume.alpha.kubernetes.io/storage-class: "dynamic" (and PVCs that didn't have this annotation were not dynamic)

Comment 6 Anping Li 2018-01-02 03:30:54 UTC
[root@qe-anli35master-1 ~]# oc version
oc v3.5.5.31.53
kubernetes v1.5.2+43a9be4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://qe-anli35master-1:8443
openshift v3.5.5.31.53
kubernetes v1.5.2+43a9be4
[root@qe-anli35master-1 ~]# openshift version
openshift v3.5.5.31.53
kubernetes v1.5.2+43a9be4
etcd 3.1.0

openshift-ansible-3.5.151

Comment 7 ewolinet 2018-01-02 22:19:36 UTC
I think this is a non-issue. 

Given that we are installing using 3.5 and we expect that for 3.5 a dynamic PVC will be created with the annotation in https://bugzilla.redhat.com/show_bug.cgi?id=1525431#c5 . The flag to not create dynamic PVC is being provided to the inventory. I believe the reason that we don't see the PVC binding is because there isn't a PV to back it. That is something that can be configured in the inventory.

Comment 8 Anping Li 2018-01-03 02:04:47 UTC
@ewolinet,
I think when openshift_logging_es_pvc_dynamic=false, the openshift-ansible should create PVC for us. That is what it is in v3.6, v3.7. we should consider if it worth to backport to v3.5.


Note You need to log in before you can comment on or make changes to this bug.