Bug 1846132

Summary: prometheus data loss on upgrade from 4.3 -> 4.4
Product: OpenShift Container Platform Reporter: Dan Yocum <dyocum>
Component: MonitoringAssignee: Paul Gier <pgier>
Status: CLOSED DUPLICATE QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.3.zCC: alegrand, anpicker, erooth, kakkoyun, lcosic, mloibl, pkrupa, surbania
Target Milestone: ---   
Target Release: 4.6.0   
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: 2020-06-11 06:35:01 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 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: