Bug 1976112 - batch/v1beta1 CronJob warning appears in image pruner pod when image registry is removed
Summary: batch/v1beta1 CronJob warning appears in image pruner pod when image registry...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.9.0
Assignee: Nichita Gutu
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-25 08:48 UTC by Wenjing Zheng
Modified: 2021-10-18 17:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: spec.managementState in configs.imageregistry is set to Removed. Consequence: Image pruner pod generates warnings about deprecated CronJob in v1.21+ and that batch/v1 should be used. Fix: Updated batch/v1beta1 with batch/v1 in openshift/oc. Result: Warnings about deprecated CronJob in image pruner pods no longer appear.
Clone Of:
Environment:
Last Closed: 2021-10-18 17:36:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 876 0 None open Bug 1976112: Fixed warnings about deprecated CronJob in image-pruner pods 2021-07-07 11:17:26 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:37:08 UTC

Description Wenjing Zheng 2021-06-25 08:48:22 UTC
Description of problem:
Below warning appears in image pruner pod when image registry is removed:
$ oc logs pods/image-pruner-27076840-79qkw 
W0625 08:40:02.621430       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob
I0625 08:40:02.860125       1 prune.go:348] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
Only API objects will be removed.  No modifications to the image registry will be made.
Summary: deleted 0 objects


Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-06-24-101028

How reproducible:
always

Steps to Reproduce:
1.Set spec.managementState to Removed in configs.imageregistry
2.Check the log in image pruner pod
3.

Actual results:
Below warning appears: W0625 08:40:02.621430       1 warnings.go:70] batch/v1beta1 CronJob is deprecated in v1.21+, unavailable in v1.25+; use batch/v1 CronJob

Expected results:
The warning should be removed

Additional info:

Comment 3 Wenjing Zheng 2021-07-15 03:18:24 UTC
Verified on 4.9.0-0.nightly-2021-07-14-204159
$ ./oc logs pods/image-pruner-27105317-m4j94
I0715 03:17:02.680478       1 prune.go:347] Creating image pruner with keepYoungerThan=1h0m0s, keepTagRevisions=3, pruneOverSizeLimit=<nil>, allImages=true
Summary: deleted 0 objects

Comment 4 wewang 2021-08-17 08:33:28 UTC
Case added.

Comment 7 errata-xmlrpc 2021-10-18 17:36:51 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 (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), 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/RHSA-2021:3759


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