Bug 1773840

Summary: [sriov] sriov operator cannot be upgraded
Product: OpenShift Container Platform Reporter: zhaozhanqi <zzhao>
Component: NetworkingAssignee: Peng Liu <pliu>
Networking sub component: openshift-sdn QA Contact: zhaozhanqi <zzhao>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: urgent CC: ecordell, scuppett
Version: 4.3.0   
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1776605 (view as bug list) Environment:
Last Closed: 2020-05-13 21:52:49 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: 1776605    
Bug Blocks: 1783111    

Description zhaozhanqi 2019-11-19 04:24:00 UTC
Description of problem:
sriov operator cannot be upgraded due to lack of 'skipRange' in csv

Version-Release number of selected component (if applicable):
quay.io/openshift-release-dev/ocp-v4.0-art-dev:v4.3.0-201911132228-ose-sriov-network-operator

How reproducible:
always

Steps to Reproduce:
1. assume the clsuter already setup the sriov operator 
 oc get csv
NAME                                        DISPLAY                   VERSION              REPLACES   PHASE
sriov-network-operator.4.3.0-201911120917   SR-IOV Network Operator   4.3.0-201911120917              Succeeded
 
2. When the new sriov package has push to quay, see.  4.3.0-201911150628 is newer than 201911120917
   # oc rsh -n openshift-marketplace opsrctest-78489ffd96-nr9g4
 
sh-4.2$ cat downloaded/sriov-network-operator/sriov-network-operator-qz298b9a/
4.2/                                 4.3/                                 sriov-network-operator.package.yaml  
sh-4.2$ cat downloaded/sriov-network-operator/sriov-network-operator-qz298b9a/sriov-network-operator.package.yaml 
channels:
- currentCSV: sriov-network-operator.v0.0.1
  name: '4.2'
- currentCSV: sriov-network-operator.4.3.0-201911150628
  name: '4.3'
defaultChannel: '4.3'
packageName: sriov-network-operator
  
3. 

Actual results:
 sriov operator cannot be upgraded

Expected results:
 sriov operator can be upgraded when new packaged is coming.

Additional info:

Comment 3 zhaozhanqi 2019-12-13 06:00:53 UTC
this bug was blocked by https://bugzilla.redhat.com/show_bug.cgi?id=1776605

Comment 4 Evan Cordell 2019-12-13 21:24:45 UTC
Following up from the linked bug: 

There is an issue with the skiprange that has been placed on the manifest.

The semver spec states:

> When major, minor, and patch are equal, a pre-release version has lower precedence than a normal version. Example: 1.0.0-alpha < 1.0.0. 

(see point 11 here: https://semver.org/)

That means that this can be fixed by changing the lower bound to `4.3.0-0`. Here's a test showing that this works: https://play.golang.org/p/BrX89RxoHpU

Comment 5 zhaozhanqi 2019-12-16 02:41:04 UTC
please help update according to https://bugzilla.redhat.com/show_bug.cgi?id=1776605#c11

Comment 7 zhaozhanqi 2019-12-20 03:17:21 UTC
Verified this bug on 4.3.0-201912190717

Comment 9 errata-xmlrpc 2020-05-13 21:52:49 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:0581