Bug 1661447 - No way to respect existing PVC when upgrading Metrics with standard playbook
Summary: No way to respect existing PVC when upgrading Metrics with standard playbook
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Hawkular
Version: 3.11.0
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
: 3.11.z
Assignee: Jan Martiska
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-21 09:48 UTC by Andre Costa
Modified: 2019-09-24 08:08 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-24 08:08:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2816 0 None None None 2019-09-24 08:08:18 UTC

Internal Links: 1828761

Description Andre Costa 2018-12-21 09:48:44 UTC
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

Comment 1 Frederic Branczyk 2019-01-23 16:21:17 UTC
Hawkular has its own component, the monitoring component is the Prometheus based stack. Moving to hawkular.

Comment 14 errata-xmlrpc 2019-09-24 08:08:08 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-2019:2816


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