Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1897379

Summary: Metering operator failing upgrade from 4.4 to 4.6 channel
Product: OpenShift Container Platform Reporter: Yash Chouksey <ychoukse>
Component: Metering OperatorAssignee: tflannag
Status: CLOSED ERRATA QA Contact: Peter Ruan <pruan>
Severity: high Docs Contact:
Priority: high    
Version: 4.6CC: aos-bugs, btofel, carl-johan.schenstrom, mchebbi, rmonk, sd-operator-metering
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1898373 (view as bug list) Environment:
Last Closed: 2020-12-21 13:18:30 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:
Bug Depends On: 1898373    
Bug Blocks:    

Description Yash Chouksey 2020-11-12 21:50:37 UTC
Created attachment 1728885 [details]
Screenshot(metering-CRD)

Description of problem:
When metering-operator is upgraded from 4.4 -> 4.5 -> 4.6 , it fails. 
The install plan fails with the following error:
~~~
error validating existing CRs agains new CRD's schema: hivetables.metering.openshift.io: error validating custom resource against new schema &apiextensions.CustomResourceValidation{OpenAPIV3Schema:(*apiextensions.JSONSchemaProps)(0xc0058f6400)}: [].status.partitions: Invalid value: "null": status.partitions in body must be of type array: "null"
~~~
The error indicates that there are objects on the cluster (hivetables) that don’t validate against the schema of the updated CRD, so it’s not safe to apply the CRD update. It’s might be an accidental backwards-incompatible change in the hivetables schema.

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

How reproducible:


Steps to Reproduce:
1. 
2.
3.

Actual results: 

New csv gets stuck in pending state, where all the CR goes into unknown state. 
oc get csv
NAME                                             DISPLAY                                VERSION                 REPLACES                                       PHASE
metering-operator.4.6.0-202010200139.p0.2        Metering                               4.6.0-202010200139.p0   metering-operator.4.5.0-202010170258.p0        Pending


Expected results: 

Metering operator successfully upgrades to 4.6.0-202010200139.p0


Additional info:

Comment 2 Yash Chouksey 2020-11-12 21:55:00 UTC
Created attachment 1728886 [details]
installplan.yml

Comment 3 Yash Chouksey 2020-11-12 21:56:03 UTC
Created attachment 1728887 [details]
csv.yml

Comment 4 Yash Chouksey 2020-11-12 21:56:44 UTC
Created attachment 1728888 [details]
subscriptions.yml

Comment 5 Yash Chouksey 2020-11-12 21:57:40 UTC
Created attachment 1728889 [details]
operatorgroup.yml

Comment 6 Yash Chouksey 2020-11-13 11:43:11 UTC
Created attachment 1729074 [details]
all-hivetables.yaml

Comment 14 Peter Ruan 2020-12-17 05:07:34 UTC
verified with the latest 4.6

Comment 16 errata-xmlrpc 2020-12-21 13:18:30 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 (OpenShift Container Platform 4.6.9 extras update), 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-2020:5616