Bug 1539382 - The metrics_cassandra_pvc was changed when redeploy metrics
Summary: The metrics_cassandra_pvc was changed when redeploy metrics
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.9.0
Assignee: ewolinet
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-28 13:16 UTC by Anping Li
Modified: 2018-03-28 14:24 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The default cassandra pvc prefix would default to the pv volume name. Consequence: New pvcs were created when upgrading from older metrics installs. Fix: We no longer change the prefix based on other variables. Result: New pvcs are not created when upgrading from an older install.
Clone Of:
Environment:
Last Closed: 2018-03-28 14:23:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0489 0 None None None 2018-03-28 14:24:35 UTC

Description Anping Li 2018-01-28 13:16:14 UTC
Description of problem:

When redeploy metrics by re-run the metrics playbooks. The pvc name are changed from metrics-cassandra-1 to metrics-1. 

It may caused by the default value in openshift_facts/defaults/main.yml:openshift_metrics_storage_volume_name: 'metrics'


openshift_facts/defaults/main.yml:openshift_metrics_storage_volume_name: 'metrics'
openshift_metrics/defaults/main.yaml:openshift_metrics_cassandra_pvc_prefix: "{{ openshift_metrics_storage_volume_name | default('metrics-cassandra') }}"



Version-Release number of the following components:
openshift-ansible-3.9.0-0.31

How reproducible:
always

Steps to Reproduce:
1. Deploy Metrics with openshift-ansible-3.7.x 
2. Redeploy metrics with openshift-ansible-3.9.0-0.31
3. Check the pvc used by cassandra pod

# oc get pods hawkular-cassandra-1-jwn9b -o json |grep -A 1 persistentVolumeClaim
                "persistentVolumeClaim": {
                    "claimName": "metrics-1"

Actual results:
hawkular-cassandra pod changed the pvc from metrics-cassandra-1 to metrics-1.

[root@host-172-16-120-58 ~]# oc get pvc
NAME                  STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
metrics-1             Bound     pvc-97d96125-0281-11e8-b8ae-fa163ee52e00   10Gi       RWO            standard       2d
metrics-cassandra-1   Bound     pvc-76a33773-0227-11e8-8e50-fa163ee52e00   10Gi       RWO            standard       2d


Expected results:
hawkular-cassandra pod should use the the prior metrics-cassandra-1

Additional info:

Comment 3 Junqi Zhao 2018-02-02 02:17:28 UTC
The default openshift_metrics_cassandra_pvc_prefix is metrics-cassandra now.
But there is another defect BZ 1540851 was found

ansible version
ansible-3.9.0-0.34

Comment 6 errata-xmlrpc 2018-03-28 14:23:55 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-2018:0489


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