Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1539382

Summary: The metrics_cassandra_pvc was changed when redeploy metrics
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: Cluster Version OperatorAssignee: ewolinet
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: high Docs Contact:
Priority: high    
Version: 3.9.0CC: aos-bugs, jokerman, juzhao, mmccomas, mwringe
Target Milestone: ---   
Target Release: 3.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-28 14:23:55 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 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