Bug 1677236 - skippedImagestreams and skippedTemplates didn't work
Summary: skippedImagestreams and skippedTemplates didn't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.1.0
Assignee: Gabe Montero
QA Contact: XiuJuan Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-14 10:27 UTC by XiuJuan Wang
Modified: 2019-06-04 10:44 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-04 10:44:00 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 None None None 2019-06-04 10:44:07 UTC

Description XiuJuan Wang 2019-02-14 10:27:52 UTC
Description of problem:
After set skippedImagestreams and skippedTemplates, the label of the imagestreams and templates 'samples.operator.openshift.io/managed' are still true.


Version-Release number of selected component (if applicable):
$  oc get clusterversion 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.0.0-0.nightly-2019-02-13-204401   True        False         141m      Error while reconciling 4.0.0-0.nightly-2019-02-13-204401

How reproducible:
always

Steps to Reproduce:
1.set skippedImagestreams and skippedTemplates
2.Check imagestreams and templates
3.

Actual results:
step 1:
$ oc get  config.samples.operator.openshift.io -o yaml 
apiVersion: v1
items:
- apiVersion: samples.operator.openshift.io/v1
  kind: Config
  metadata:
    creationTimestamp: 2019-02-14T07:49:51Z
    finalizers:
    - samples.operator.openshift.io/finalizer
    generation: 18
    name: instance
    namespace: ""
    resourceVersion: "109269"
    selfLink: /apis/samples.operator.openshift.io/v1/configs/instance
    uid: 1c3c0302-302d-11e9-acd3-06a56e794bbc
  spec:
    architectures:
    - x86_64
    installType: rhel
    managementState: Managed
    samplesRegistry: registry.redhat.io
    skippedImagestreams:
    - ruby
    - perl
    skippedTemplates:
    - jenkins-persistent
    - jenkins-ephemeral
  status:
    architectures:
    - x86_64
    conditions:
    - lastTransitionTime: 2019-02-14T09:41:45Z
      lastUpdateTime: 2019-02-14T09:41:45Z
      status: "True"
      type: ConfigurationValid
    - lastTransitionTime: 2019-02-14T09:11:00Z
      lastUpdateTime: 2019-02-14T09:11:00Z
      status: "False"
      type: ImportImageErrorsExist
    - lastTransitionTime: 2019-02-14T09:08:43Z
      lastUpdateTime: 2019-02-14T09:08:43Z
      status: "True"
      type: SamplesExist
    - lastTransitionTime: 2019-02-14T10:19:49Z
      lastUpdateTime: 2019-02-14T10:19:49Z
      status: "False"
      type: ImageChangesInProgress
    - lastTransitionTime: 2019-02-14T09:20:09Z
      lastUpdateTime: 2019-02-14T09:20:09Z
      status: "True"
      type: ImportCredentialsExist
    - lastTransitionTime: 2019-02-14T07:52:19Z
      lastUpdateTime: 2019-02-14T07:52:19Z
      status: "False"
      type: RemovePending
    - lastTransitionTime: 2019-02-14T07:52:19Z
      lastUpdateTime: 2019-02-14T07:52:19Z
      status: "False"
      type: MigrationInProgress
    installType: rhel
    managementState: Managed
    samplesRegistry: registry.redhat.io
    skippedImagestreams:
    - ruby
    - perl
    skippedTemplates:
    - jenkins-persistent
    - jenkins-ephemeral
    version: v4.0.0-0.171.0.1-f15a89623
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

step2:
$ oc get is ruby perl -o yaml  -n openshift | grep operator
      samples.operator.openshift.io/version: v4.0.0-0.171.0.1-f15a89623
      samples.operator.openshift.io/managed: "true"
      samples.operator.openshift.io/version: v4.0.0-0.171.0.1-f15a89623
      samples.operator.openshift.io/managed: "true"
$ oc get template jenkins-persistent jenkins-ephemeral -o yaml  -n openshift | grep operator
      samples.operator.openshift.io/version: v4.0.0-0.171.0.1-f15a89623
      samples.operator.openshift.io/managed: "true"
      samples.operator.openshift.io/version: v4.0.0-0.171.0.1-f15a89623
      samples.operator.openshift.io/managed: "true"


Expected results:
Should set label samples.operator.openshift.io/managed to false. And the imagestreams/templates couldn't be updated/recreate/removed.

Additional info:
SkippedTemplates and skippedImagestreams have been watched by operator.
$  oc logs -f cluster-samples-operator-7bf464d7dc-2zzp5  | grep -i skipped
time="2019-02-14T10:14:38Z" level=info msg="SkippedTemplates changed from []string(nil) to []string{\"jenkins-persistent\", \"jenkins-ephemeral\"}"
time="2019-02-14T10:20:16Z" level=info msg="watch event perl in skipped list for imagestream"
time="2019-02-14T10:20:25Z" level=info msg="watch event ruby in skipped list for imagestream"
time="2019-02-14T10:21:29Z" level=info msg="watch event jenkins-ephemeral in skipped list for template"
time="2019-02-14T10:21:32Z" level=info msg="watch event jenkins-persistent in skipped list for template"

Comment 1 Gabe Montero 2019-02-14 15:57:14 UTC
We don't stop watching the imagestreams ... we just ignore the events, so you'll still see messages like "watch event perl in skipped list for imagestream" @XiuJuan

Comment 2 Gabe Montero 2019-02-14 16:00:11 UTC
But updating the managed label should be addressed....and the e2e's should be updated to account for that.

On the "couldn't be updated/recreate/removed.", the e2e's certainly confirm that behavior, and I've manually tested 
it recently as well.

I'll revisit that while sorting out the managed label.

Comment 3 Gabe Montero 2019-02-14 21:51:37 UTC
PR https://github.com/openshift/cluster-samples-operator/pull/108 is up

Comment 4 Gabe Montero 2019-02-16 13:50:48 UTC
PR has merged

Comment 5 XiuJuan Wang 2019-02-18 05:57:53 UTC
After setting skippedImagestreams and skippedTemplates, the images and templates could be set label samples.operator.openshift.io/managed to false. And couldn't be updated/recreate/deleted.
$ oc get clusterversion 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE     STATUS
version   4.0.0-0.nightly-2019-02-17-024922   True        False         98m       Cluster version is 4.0.0-0.nightly-2019-02-17-024922

Comment 8 errata-xmlrpc 2019-06-04 10:44:00 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:0758


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