Bug 1846132 - prometheus data loss on upgrade from 4.3 -> 4.4
Summary: prometheus data loss on upgrade from 4.3 -> 4.4
Keywords:
Status: CLOSED DUPLICATE of bug 1833427
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.3.z
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
: 4.6.0
Assignee: Paul Gier
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-10 20:57 UTC by Dan Yocum
Modified: 2023-10-06 20:33 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-11 06:35:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Dan Yocum 2020-06-10 20:57:45 UTC
Description of problem:

When upgrading from 4.3 to 4.4, with persistent monitoring enabled per instructions via:

https://docs.openshift.com/container-platform/4.3/monitoring/cluster_monitoring/configuring-the-monitoring-stack.html

In the template :

data:
  config.yaml: |
    prometheusK8s:
      volumeClaimTemplate:
        metadata:
          name: <PVC_name_prefix>

if PVC_name_prefix is anything other then "prometheus-k8s-db", on upgrade to 4.4, results in complete data reset for prometheus data.  This occurs because the updated crd for prometheuses.monitoring.coreos.com no longer accepts the values in the metadata object, and ignores them.  In turn a new pvc is created (with no data), using the default prefix above.   Previous pvc are retained, but obviously aren't used, so would require some sort of data migration.

Version-Release number of selected component (if applicable):

4.3.

How reproducible:

Always

Steps to Reproduce:
1. Deploy 4.3 cluster with prometheus and set a PVC_name_prefix per the documentation.
2. Upgrade to 4.4
3. Lose PVC

Actual results:

PVC lost

Expected results:

PVC not lost
Additional info:


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