Bug 1867792 - Pruner degrades image registry operator if the latter is removed
Summary: Pruner degrades image registry operator if the latter is removed
Keywords:
Status: VERIFIED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.5
Hardware: All
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 4.6.0
Assignee: Ricardo Maraschini
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks: 1872519
TreeView+ depends on / blocked
 
Reported: 2020-08-10 18:44 UTC by Ricardo Maraschini
Modified: 2020-09-15 12:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Prune enabled with image registry Removed Consequence: Pruner job failing because it fails to reach a registry that does not exist (Removed) Fix: Do not attempt to ping the registry if it is removed. Result: Pruner succeeds and removes only etcd objects (do not attempt to remove blobs)
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift oc pull 520 None closed Bug 1867792: Allow prune to move on with Removed registry 2020-09-21 08:25:07 UTC

Description Ricardo Maraschini 2020-08-10 18:44:52 UTC
Description of problem:

If image registry is removed the pruner degrades the operator with reason ImagePrunerJobFailed::Removed


Version-Release number of selected component (if applicable):

4.5.5

How reproducible:

Always


Steps to Reproduce:
1. Sets image registry management state as Removed
2. Wait for pruner to run

Actual results:

Image registry operator becomes Degraded

Expected results:

No degradation, as the image registry is removed we should not degrade it.


Additional info:

By https://bugzilla.redhat.com/show_bug.cgi?id=1806686 it seems like we still need to run the pruner so it may be useful to check why it is failing instead of changing the behavior.

Comment 2 Ricardo Maraschini 2020-08-10 19:01:50 UTC
Error reported by pruner pod:

error: unable to determine registry: no managed image found

Comment 6 Wenjing Zheng 2020-08-26 03:39:31 UTC
$ oc logs pods/image-pruner-1598412960-9sn29
error: unable to determine registry: no managed image found
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-08-25-222652   True        False         60m     Cluster version is 4.6.0-0.nightly-2020-08-25-222652

Waiting for a payload to include the pr.

Comment 7 Wenjing Zheng 2020-08-27 10:11:33 UTC
Verified with below version:
$ oc logs pods/image-pruner-1598523000-8tdq4
Only API objects will be removed.  No modifications to the image registry will be made.
Deleted 0 objects.
$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.nightly-2020-08-26-152137   True        False         10h     Cluster version is 4.6.0-0.nightly-2020-08-26-152137

Status:
  Conditions:
    Last Transition Time:  2020-08-27T10:01:30Z
    Message:               Available: The registry is removed
ImagePrunerAvailable: Pruner CronJob has been created
    Reason:                Removed
    Status:                True
    Type:                  Available
    Last Transition Time:  2020-08-27T10:01:30Z
    Message:               Progressing: All registry resources are removed
    Reason:                Removed
    Status:                False
    Type:                  Progressing
    Last Transition Time:  2020-08-26T23:29:16Z
    Message:               Degraded: The registry is removed
    Reason:                Removed
    Status:                False
    Type:                  Degraded


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