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
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Hawkular
Version: 3.11.0
Hardware: All
OS: Linux
Target Milestone: ---
: 3.11.z
Assignee: Jan Martiska
QA Contact: Junqi Zhao
Depends On:
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:
Last Closed: 2019-09-24 08:08:08 UTC
Target Upstream Version:

Attachments (Terms of Use)

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 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_pv_selector={'name': 'pvc-238ae6a6-fd52-11e8-9c5b-525400d757c5'}

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
    state: list
    kind: pvc
    name: "{{ openshift_metrics_cassandra_pvc_prefix }}-{{ metrics_pvc_index }}"
    namespace: "{{ openshift_metrics_project }}"
  register: _metrics_pvc


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.


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