Bug 1826033 - Image Pruner Automatically Installed on Upgrade
Summary: Image Pruner Automatically Installed on Upgrade
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.4.0
Assignee: Corey Daley
QA Contact: Wenjing Zheng
Depends On: 1825284
TreeView+ depends on / blocked
Reported: 2020-04-20 17:46 UTC by Corey Daley
Modified: 2020-08-03 13:02 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: the pruner gets enabled by default on upgraded clusters Consequence: it can delete something that the customer does not expect Fix: the pruner is suspended by default Result: all images will stay intact until the customer unsuspend the pruner
Clone Of: 1825284
Last Closed: 2020-05-04 11:50:00 UTC
Target Upstream Version:
cdaley: needinfo-

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github openshift cluster-image-registry-operator pull 523 None closed [release-4.4] Bug 1826033: Bootstrap as suspended 2020-08-07 14:55:49 UTC
Github openshift origin pull 24901 None closed [release-4.4] Bug 1826033: Ignore ImagePruningDisabled alert 2020-08-07 14:55:49 UTC
Red Hat Product Errata RHBA-2020:0581 None None None 2020-05-04 11:50:32 UTC

Comment 6 Wenjing Zheng 2020-04-26 03:19:56 UTC
Verified on 4.4.0-0.nightly-2020-04-25-191512 which is upgrade from 4.3.17:
$ oc describe imagepruners.imageregistry.operator.openshift.io
Name:         cluster
Labels:       <none>
Annotations:  <none>
API Version:  imageregistry.operator.openshift.io/v1
Kind:         ImagePruner
  Creation Timestamp:  2020-04-26T02:19:03Z
  Generation:          1
  Resource Version:    34500
  Self Link:           /apis/imageregistry.operator.openshift.io/v1/imagepruners/cluster
  UID:                 5ff74afc-06ce-414f-8e57-0b5378f86746
  Failed Jobs History Limit:      3
  Keep Tag Revisions:             3
  Successful Jobs History Limit:  3
  Suspend:                        true
    Last Transition Time:  2020-04-26T02:19:03Z
    Message:               Pruner CronJob has been created
    Reason:                Ready
    Status:                True
    Type:                  Available
    Last Transition Time:  2020-04-26T02:19:03Z
    Message:               Pruner completed successfully
    Reason:                Complete
    Status:                False
    Type:                  Failed
    Last Transition Time:  2020-04-26T02:19:03Z
    Message:               The pruner job has been suspended.
    Reason:                Suspended
    Status:                False
    Type:                  Scheduled
  Observed Generation:     1
Events:                    <none>

Comment 7 Wenjing Zheng 2020-04-26 03:35:12 UTC
I also can see the alert like below: 
$ oc get PrometheusRule -n openshift-image-registry image-registry-operator-alerts -o yaml

  - name: ImagePruner
    - alert: ImagePruningDisabled
        message: |
          Automatic image pruning is not enabled. Regular pruning of images
          no longer referenced by ImageStreams is strongly recommended to
          ensure your cluster remains healthy.

          To remove this warning, install the image pruner by creating an
          imagepruner.imageregistry.operator.openshift.io resource with the
          name `cluster`. Ensure that the `suspend` field is set to `false`.
      expr: image_registry_operator_image_pruner_install_status < 2
        severity: warning

Comment 9 errata-xmlrpc 2020-05-04 11:50: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.


Comment 10 akretzsc 2020-07-30 22:21:19 UTC
I performed an in-place upgrade from 4.3.29 to 4.4.14 (both the latest stable release at the time) and ran into this issue today.

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