Bug 1661447
| Summary: | No way to respect existing PVC when upgrading Metrics with standard playbook | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Andre Costa <andcosta> |
| Component: | Hawkular | Assignee: | Jan Martiska <jmartisk> |
| Status: | CLOSED ERRATA | QA Contact: | Junqi Zhao <juzhao> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.11.0 | CC: | andcosta, aos-bugs, jmartisk, rvargasp, sknauss, surbania |
| Target Milestone: | --- | ||
| Target Release: | 3.11.z | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-09-24 08:08:08 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: | |||
Hawkular has its own component, the monitoring component is the Prometheus based stack. Moving to hawkular. 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-2019:2816 |
Description of problem: It seems there is no way to have the upgrade playbook picking up an already PVC or PV attached to the cassandra pod, since no matter the variable we use in the inventory the playbook keeps creating a new PVC and PV for the cassandra. Version-Release number of the following components: This happens from version 3.9 of OCP until the latest: ansible --version = from 2.4.6.0 to 2.6.11 openshift-ansible = from 3.9.z to 3.11.z How reproducible: Every time we run the playbook to upgrade Metrics stack Steps to Reproduce: Variables used on the inventory: openshift_metrics_cassandra_storage_type=pv openshift_metrics_storage_volume_name="pvc-238ae6a6-fd52-11e8-9c5b-525400d757c5" openshift_metrics_cassandra_pv_selector={'name': 'pvc-238ae6a6-fd52-11e8-9c5b-525400d757c5'} openshift_metrics_cassandra_pvc_prefix=cassandra-vol2 openshift_metrics_cassandra_replicas=1 None of the combination below works, specially the 'openshift_metrics_cassandra_pvc_prefix' that should make the task 'Check to see if PVC already exists' to pick up existing PVC without relying on the prefix. Actual results: Running the upgrade playbook 'openshift-metrics/config.yml' creates a PVC and a dynamic PV every time. Expected results: When checking for any existing PVCs we should have other variables in the task to check for PVC in the project. Additional info: <!--snippet from the task---> - name: Check to see if PVC already exists oc_obj: state: list kind: pvc name: "{{ openshift_metrics_cassandra_pvc_prefix }}-{{ metrics_pvc_index }}" namespace: "{{ openshift_metrics_project }}" register: _metrics_pvc <------> https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_metrics/tasks/generate_cassandra_pvcs.yaml https://github.com/openshift/openshift-ansible/commit/5341e36899a03bf48f0e2c2be7eb5ccb5548bda2#diff-3e36fa4bda3f7e4aad74e56576aa8aee