Created attachment 1515807 [details] Log of samples operator Description of problem: When samples operator is in the process of initiating changes to the imagestreams ,but cvo progressing and Available status are still False Version-Release number of selected component (if applicable): bin/openshift-install v0.7.0-master-16-g81e2a8810350b18030d313bc17ddaecdb1ed32b7 How reproducible: always Steps to Reproduce: 1.Removed centos imagestream by set managementState: Removed in samplesresource 2.Config installtype to rhel ,change management state to Managed in samplesresources 3. Check the cvo, 3 status are False 4. Create a secret with credentials for registry.redhat.io under openshift-cluster-samples-operator project 5.Check imported is and templates $ oc get template -n openshift|wc -l 104 $ oc get is -n openshift|wc -l 63 6. Check the cvo status $ oc describe clusteroperators openshift-cluster-samples-operator Name: openshift-cluster-samples-operator --------------------- Message: The samples operator is not in the process of initiating changes to the imagestreams Status: False ##still False, should be true Type: Progressing Last Transition Time: 2018-12-19T09:39:26Z Message: Samples do not exist in the openshift project Status: False ##still False, should be true Type: Available Extension: <nil> Version: 657e69d9dc80e51b4192e7b6c268e86e188ec835 Events: <none> 7. Check the log of samples operator,see attachment 8. when almost finished imported, then cvo status changed $ oc describe clusteroperators openshift-cluster-samples-operator Name: openshift-cluster-samples-operator -------------------------------- Message: The samples operator is in the middle of changing the imagestreams Status: True Type: Progressing Last Transition Time: 2018-12-20T03:24:09Z Message: Samples exist in the openshift project Status: True Type: Available Extension: <nil> Version: 657e69d9dc80e51b4192e7b6c268e86e188ec835 Events: <none> Actual results: cvo progressing and Available status are still False, When some imagestreams and templates are already imported Expected results: Should update cvo progressing and Available status to true, when import images and templates Additional info:
The Progressing and Available become to true after imagestreams create and import 1 mins later #oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.0.0-0.alpha-2019-01-02-232508 True False 57m Cluster version is 4.0.0-0.alpha-2019-01-02-232508
The behavior here has changed with PR https://github.com/openshift/cluster-samples-operator/pull/70 At the moment, it aligns with https://github.com/openshift/cluster-version-operator/blob/master/docs/dev/clusteroperator.md#conditions However, we will tweak it some more when https://github.com/openshift/cluster-version-operator/pull/73 gets consensus and merges. For example, now - available will be true only after the samples are created and imagestream imports complete - if you supply a bad config, available can still be true, but failing will be true - at the moment, we mark available false if you switch to rhel and are lacking the credentials, though that most likely will change after https://github.com/openshift/cluster-version-operator/pull/73 Moving to QE to see if my explanations and the doc link above match what they'll see with the latest samples operator. We can sort through any questions, etc. via this bugzilla as part of reviewing the behavior, as well as adjust to the final spec per https://github.com/openshift/cluster-version-operator/pull/73
Test with below version version 4.0.0-0.alpha-2019-01-03-031244 True False 2h Cluster version is 4.0.0-0.alpha-2019-01-03-031244 The following scenarios passed, mark this bug to verified. Senario: switch to rhel and are lacking the credentials Result: Correct Status: Conditions: Last Transition Time: 2019-01-04T05:49:45Z Message: Samples installation in error at 4.0.0-alpha1-85ee5a974 Status: False Type: Available Last Transition Time: 2019-01-04T05:49:42Z Message: Samples installation in error at 4.0.0-alpha1-85ee5a974: image pull credentials needed Status: False Type: Progressing Last Transition Time: 2019-01-04T05:49:45Z Message: Samples installation in error at 4.0.0-alpha1-85ee5a974: Cannot create rhel imagestreams to registry.redhat.io without the credentials being available Status: True Type: Failing Extension: <nil> Version: Events: <none> Senario 2: Add credentials for rhel installtype. Result: When ImageChangesInProgress is true, the Progressing set to true. After all imagessteams imports succeed and samples created, Available set to true, Processing set to false. Status: Conditions: Last Transition Time: 2019-01-04T06:51:08Z Status: False Type: Available Last Transition Time: 2019-01-04T06:47:32Z Message: Samples moving to 4.0.0-alpha1-85ee5a974 Status: True Type: Progressing Last Transition Time: 2019-01-04T06:51:08Z Status: False Type: Failing Extension: <nil> Version: Events: <none> Status: Conditions: Last Transition Time: 2019-01-04T06:53:47Z Message: Samples installation successful at 4.0.0-alpha1-85ee5a974 Status: True Type: Available Last Transition Time: 2019-01-04T06:53:47Z Message: Samples installation successful at 4.0.0-alpha1-85ee5a974 Status: False Type: Progressing Last Transition Time: 2019-01-04T06:53:47Z Status: False Type: Failing Extension: <nil> Version: 4.0.0-alpha1-85ee5a974 Events: <none> Scenario: With credentials exist, and set to Removed Result: After secret under openshift openshift is removed, clusteroperator will conduce some error, after secret is created again, Available,Processing,Failing set to false. Status: Conditions: Last Transition Time: 2019-01-04T06:57:06Z Message: Samples installation in error at 4.0.0-alpha1-85ee5a974 Status: False Type: Available Last Transition Time: 2019-01-04T06:57:06Z Message: Samples installation in error at 4.0.0-alpha1-85ee5a974: image pull credentials needed Status: False Type: Progressing Last Transition Time: 2019-01-04T06:57:06Z Message: Samples installation in error at 4.0.0-alpha1-85ee5a974: Status: True Type: Failing Extension: <nil> Version: Events: <none> Status: Conditions: Last Transition Time: 2019-01-04T06:59:10Z Status: False Type: Available Last Transition Time: 2019-01-04T06:59:10Z Status: False Type: Progressing Last Transition Time: 2019-01-04T06:59:10Z Status: False Type: Failing Extension: <nil> Version: Events: <none>
This is a 4.0 specific bug found during 4.0 dev cycle ... no doc updated required
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:0758