Bug 1718454

Summary: samples operator upgrade while unmanaged/removed needs to still update clusteroperator version, set available = true
Product: OpenShift Container Platform Reporter: Gabe Montero <gmontero>
Component: ImageStreamsAssignee: Gabe Montero <gmontero>
Status: CLOSED ERRATA QA Contact: XiuJuan Wang <xiuwang>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: aos-bugs, jokerman, mmccomas, wzheng
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1719037 (view as bug list) Environment:
Last Closed: 2019-10-16 06:31:35 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: 1719037    

Description Gabe Montero 2019-06-07 19:22:56 UTC
Per recent upgrade experience in openshift/starter while samples operator was unmanaged

NOTE: workaround in the interim is the add the openshift-samples ClusterOperator obj into the clusterversion overrides list

Comment 1 Gabe Montero 2019-06-07 21:56:33 UTC
PR https://github.com/openshift/cluster-samples-operator/pull/151 is up

Comment 2 Gabe Montero 2019-06-10 21:00:10 UTC
PR has merged into master for 4.2

Comment 3 XiuJuan Wang 2019-06-12 11:57:59 UTC
Set samples operator to 'Unmanaged' then upgrade 4.2.0-0.ci-2019-06-03-105723 to 4.2.0-0.ci-2019-06-11-224610 

After upgrade successfully, the managed imagestreams are still 4.2.0-0.ci-2019-06-03-105723, that's correct.
But crd version and openshift-samples clusteroperator version have been upgrade to 4.2.0-0.ci-2019-06-11-224610
$ oc describe is -n openshift | grep "4.2.0-0.ci-2019-06-11-224610"
(return null)
$oc get config.samples.operator  -o yaml   | grep version   -B 1
    managementState: Unmanaged
    version: 4.2.0-0.ci-2019-06-11-224610
$oc describe clusteroperator openshift-samples
Status:
  Conditions:
    Last Transition Time:  2019-06-12T10:55:58Z
    Message:               Samples installation successful at 4.2.0-0.ci-2019-06-11-224610
    Status:                True
    Type:                  Available
    Last Transition Time:  2019-06-12T10:55:59Z
    Message:               Samples installation successful at 4.2.0-0.ci-2019-06-11-224610
    Status:                False
    Type:                  Progressing
    Last Transition Time:  2019-06-12T08:35:05Z
    Status:                False
    Type:                  Degraded
  Extension:               <nil>
  Related Objects:
    Group:     samples.operator.openshift.io
    Name:      cluster
    Resource:  configs
    Group:     
    Name:      openshift-cluster-samples-operator
    Resource:  namespaces
    Group:     
    Name:      openshift
    Resource:  namespaces
  Versions:
    Name:     operator
    Version:  4.2.0-0.ci-2019-06-11-224610

Comment 4 Gabe Montero 2019-06-12 13:28:22 UTC
Changing the version to the latest is part of what this fix is about.  

Version:  4.2.0-0.ci-2019-06-11-224610

in the config CRD and cluster operator is correct

You've verified this fix.

Comment 5 XiuJuan Wang 2019-06-13 03:06:27 UTC
Thanks Gabe~

Add removed status upgrade scenario.
Imagestream under managed are removed.And openshift-samples clusteroperator version and crd version are latest. Also Available = true.

Move this to verified.

Comment 7 errata-xmlrpc 2019-10-16 06:31:35 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-2019:2922