Bug 1802367

Summary: [ptp]The version of ptp csv should be operator build detailed version
Product: OpenShift Container Platform Reporter: huirwang
Component: NetworkingAssignee: zenghui.shi <zshi>
Networking sub component: ptp QA Contact: huirwang
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: urgent CC: bbennett
Version: 4.4   
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1810129 1810323 (view as bug list) Environment:
Last Closed: 2020-07-13 17:14:44 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:    
Bug Blocks: 1810129, 1810323, 1810325    

Description huirwang 2020-02-13 02:22:12 UTC
As below ptp csv information , the version is 4.4.0.  It should be the operator detailed version, 4.4.0-202002110930


oc get csv -n openshift-ptp
NAME                              DISPLAY        VERSION   REPLACES   PHASE
ptp-operator.4.4.0-202002110930   PTP Operator   4.4.0                Succeeded

If we use 4.4.0 as version, then it may casue some upgrade problem when there are new version with 4.4.0-XXXX

We can check that by https://play.golang.org/, use 4.4.0 as MustParse, and use olm.skipRange in new csv as ParseRange,  here suppose we have a new csv 4.4.0-202002150930, then we will get a false result, that means current 4.4.0-202002110930 cannot upgrade to new csv 4.4.0-202002150930.  That is becasue 4.4.0 > 4.4.0-XXXX, it is not in the ParseRange.  

But if we have z stream such as 4.4.1-XXX, because 4.4.0<4.4.1-XXX, that upgrade will succeeded.

I think above maybe explain why the ptp upgrade failing during 4.3.0 test, but succeeded with 4.3.1.

So, here the version should be operator detailed information which does not have above issue.

Comment 2 zenghui.shi 2020-03-04 15:37:09 UTC
The olm.skipRange is replaced correctly, but `version: 4.4.0` is not.
The replacement rule defined in art.yaml is as following:

    - search: "version: {MAJOR}.{MINOR}.0"
      replace: "version: {FULL_VER}"

but in csv file, version has extra quotes: version: "4.4.0", so the regex doesn't match with version in csv file which cause replacement didn't happen.
proposed fix is to remove double quotes for version in csv file.

Comment 5 huirwang 2020-03-09 01:52:42 UTC
oc get csv -n openshift-ptp
NAME                              DISPLAY        VERSION              REPLACES   PHASE
ptp-operator.4.4.0-202003060720   PTP Operator   4.4.0-202003060720              Succeeded

Comment 7 errata-xmlrpc 2020-07-13 17:14:44 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-2020:2409