Bug 1508150 - If an existing PVC used by an Elasticsearch DC is not labeled with logging-infra=support a new PVC is created
Summary: If an existing PVC used by an Elasticsearch DC is not labeled with logging-in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Logging
Version: 3.6.1
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
: 3.6.z
Assignee: ewolinet
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-31 21:26 UTC by Peter Portante
Modified: 2017-12-14 21:02 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-12-14 21:02:32 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:3438 normal SHIPPED_LIVE OpenShift Container Platform 3.6 and 3.5 bug fix and enhancement update 2017-12-15 01:58:11 UTC

Description Peter Portante 2017-10-31 21:26:23 UTC
If an existing PVC used by an Elasticsearch DC is not labeled with logging-infra=support a new PVC is created.

If we start with existing PVCs:

[root@engint-master-39a9e ~]# oc get pvc --show-labels
NAME                  STATUS    VOLUME                                     CAPACITY   ACCESSMODES   STORAGECLASS   AGE       LABELS
logging-es-ek5tsdfc   Bound     pvc-618dd908-0da6-11e7-9c90-126ee6b1d97f   187Gi      RWO           ebs            225d      <none>
logging-es-tdxh1mh5   Bound     pvc-623b50a4-0da6-11e7-afc1-123dee44c1c5   187Gi      RWO           ebs            225d      <none>

After running the logging playbook on an existing cluster, the old PVCs are no longer used, and new PVCs are created:

[root@engint-master-39a9e ~]# oc get pvc --show-labels
NAME                  STATUS    VOLUME                                     CAPACITY   ACCESSMODES   STORAGECLASS   AGE       LABELS
logging-es-0          Bound     pvc-746e794c-bb4b-11e7-b58e-126ee6b1d97f   200Gi      RWO           gp2            4d        logging-infra=support
logging-es-1          Bound     pvc-7d3d6054-bb4b-11e7-a660-123dee44c1c5   200Gi      RWO           gp2            4d        logging-infra=support
logging-es-ek5tsdfc   Bound     pvc-618dd908-0da6-11e7-9c90-126ee6b1d97f   187Gi      RWO           ebs            225d      <none>
logging-es-tdxh1mh5   Bound     pvc-623b50a4-0da6-11e7-afc1-123dee44c1c5   187Gi      RWO           ebs            225d      <none>

Comment 1 Peter Portante 2017-10-31 21:27:15 UTC
Using openshift-ansible v3.6.173.0.59.

Comment 2 ewolinet 2017-10-31 21:45:39 UTC
This is stemming from the fact that in 3.5 we pulled this information from the DC to populate the PVC name, in 3.6 we try to abstract that using logging_facts which requires a label instead of walking the DC to get the PVC name.

Comment 5 Anping Li 2017-11-16 11:17:03 UTC
@peter,  How could we create a pvc named like logging-es-ek5tsdfc?  What are the openshift-ansible version and inventory variables?

Comment 6 Anping Li 2017-11-22 10:09:07 UTC
Verified and pass with openshift-ansible-3.7.9-1.git.4.d445616.el7.noarch
1. Deploy logging
2. Create pvc named 
oc get pvc -o name
persistentvolumeclaims/logging-es-ek5tsdfc
persistentvolumeclaims/logging-es-tdxh1mh5

3. Attached the pvc to ES pods
 oc set volume dc/logging-es-data-master-stfcyny3 --add --overwrite --type=pvc --name=elasticsearch-storage --claim-name=logging-es-ek5tsdfc
oc set volume dc/logging-es-ops-data-master-gfy26cki --add --overwrite --type=pvc --name=elasticsearch-storage --claim-name=logging-es-tdxh1mh5
4. Redeployed logging by playbook
openshift_logging_es_pvc_dynamic=True 
openshift_logging_es_pvc_prefix=logging-es
openshift_logging_es_ops_pvc_prefix=logging-es-ops

5. Check the pvc and dc
   The playbook wasn't create new pvc, the playbook is using the existing pvc.
   #oc get pvc -o name
     persistentvolumeclaims/logging-es-ek5tsdfc
     persistentvolumeclaims/logging-es-tdxh1mh5
   ## oc get dc --selector logging-infra=elasticsearch -o yaml |grep -A 1 persistentVolumeClaim
          persistentVolumeClaim:
            claimName: logging-es-ek5tsdfc
--
          persistentVolumeClaim:
            claimName: logging-es-tdxh1mh5

Comment 9 errata-xmlrpc 2017-12-14 21:02:32 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-2017:3438


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