Bug 1802367 - [ptp]The version of ptp csv should be operator build detailed version
Summary: [ptp]The version of ptp csv should be operator build detailed version
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.4
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.5.0
Assignee: zenghui.shi
QA Contact: huirwang
URL:
Whiteboard:
Depends On:
Blocks: 1810129 1810323 1810325
TreeView+ depends on / blocked
 
Reported: 2020-02-13 02:22 UTC by huirwang
Modified: 2020-07-13 17:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1810129 1810323 (view as bug list)
Environment:
Last Closed: 2020-07-13 17:14:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ptp-operator pull 39 0 None closed BUG 1802367: match regex rule defined in art.yaml for version in csv 2020-07-01 03:40:09 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:15:14 UTC

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


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