Bug 1385824

Summary: es-pvc-dynamic: "false" generates dynamic pvcs
Product: OpenShift Container Platform Reporter: Scott Dodson <sdodson>
Component: LoggingAssignee: ewolinet
Status: CLOSED ERRATA QA Contact: Xia Zhao <xiazhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.3.1CC: aos-bugs, tdawson, wsun
Target Milestone: ---   
Target Release: 3.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: When generating pvcs with the deployer, specifying 'false' for the es-pvc-dynamic and es-ops-pvc-dynamic parameters would still generate a pvc with the dynamic annotation. Consequence: No matter what the generated pvcs would have the dynamic annotation on them, which may be undesired. Fix: The way that we checked the value of the es-pvc-dynamic and es-ops-pvc-dynamic parameter was changed to correctly evaluate if it was 'true' or 'false'. Result: When generating pvcs with the deployer, only if es-pvc-dynamic and es-ops-pvc-dynamic are set as true will we generate pvcs with the annotation 'volume.alpha.kubernetes.io/storage-class: dynamic'.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-27 15:43:24 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 Scott Dodson 2016-10-17 18:35:35 UTC
Any non empty string triggers dynamic pvc creation which is unexpected. Probably the same of ops vars too.

https://github.com/openshift/origin-aggregated-logging/blob/release-1.3/deployer/scripts/install.sh#L393


[root@ose3-master ~]# oc get configmap/logging-deployer -o yaml
    apiVersion: v1
    data:
      es-cluster-size: "1"
      es-ops-cluster-size: "1"
      es-ops-pvc-dynamic: "false"
      es-ops-pvc-prefix: ""
      es-ops-pvc-size: 10Gi
      es-pvc-dynamic: "false"
      es-pvc-prefix: ""
      es-pvc-size: 10Gi
      kibana-hostname: kibana.router.default.svc.cluster.local
      kibana-ops-hostname: kibana-ops.router.default.svc.cluster.local
      public-master-url: https://ose3-master.example.com:8443
    kind: ConfigMap
    metadata:
      creationTimestamp: 2016-10-17T17:51:56Z
      name: logging-deployer
      namespace: logging
      resourceVersion: "971"
      selfLink: /api/v1/namespaces/logging/configmaps/logging-deployer
      uid: 64ef83c8-9492-11e6-b17a-5254009cc19a
     
[root@ose3-master ~]# oc get pvc/logging-es-1 -o yaml
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      annotations:
        openshift.io/generated-by: OpenShiftNewApp
        volume.alpha.kubernetes.io/storage-class: dynamic
      creationTimestamp: 2016-10-17T17:52:19Z
      labels:
        app: logging-pvc-dynamic-template
        component: support
        logging-infra: support
        provider: openshift
      name: logging-es-1
      namespace: logging
      resourceVersion: "1053"
      selfLink: /api/v1/namespaces/logging/persistentvolumeclaims/logging-es-1
      uid: 72c24e96-9492-11e6-b17a-5254009cc19a
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 10Gi
    status:
      phase: Pending
     
     
[root@ose3-master ~]# oc get pv
NAME              CAPACITY   ACCESSMODES   STATUS      CLAIM                     REASON    AGE
logging-es-1      10Gi       RWO           Available                                       29m
registry-volume   5Gi        RWX           Bound       default/registry-volume             29m

Comment 8 errata-xmlrpc 2016-10-27 15:43:24 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-2016:2085