Bug 2210680

Summary: ODF is using deprecated API cronjobs.v1beta1.batch
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: yhe
Component: ocs-operatorAssignee: Mudit Agarwal <muagarwa>
Status: CLOSED NOTABUG QA Contact: Elad <ebenahar>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.11CC: hnallurv, ocs-bugs, odf-bz-bot
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-29 07:29:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description yhe 2023-05-29 05:53:09 UTC
Description of problem (please be detailed as possible and provide log
snippests):
ODF is using deprecated API cronjobs.v1beta1.batch

Version of all relevant components (if applicable):
OpenShift Container Platform: 4.11.28
OpenShift Data foundation: 4.11.8

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?
Yes, this may affect the upgrade from OCP 4.11 to OCP 4.12 as the deprecated API ODF is using is going to be removed in OCP 4.12.

Is there any workaround available to the best of your knowledge?
No.

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
1.

Can this issue reproducible?
Yes.

Can this issue reproduce from the UI?
No.

If this is a regression, please provide more details to justify this:

Steps to Reproduce:
1.
2.
3.

Actual results:
oc get apirequestcounts cronjobs.v1beta1.batch -o jsonpath='{range .status.currentHour..byUser[*]}{..byVerb[*].verb}{","}{.username}{","}{.userAgent}{"\n"}{end}' | sort -k 2 -t, -u | column -t -s, -NVERBS,USERNAME,USERAGENT
VERBS   USERNAME                                                  USERAGENT
delete  system:serviceaccount:openshift-storage:rook-ceph-system  rook/v0.0.0

Expected results:
The deprecated API cronjobs.v1beta1.batch won't be used, instead, ODF should use the cronjobs.v1.batch

Additional info:
Although the fix of this issue is the final goal, it is also necessary to determine whether it is safe to upgrade the OCP cluster before the fix is provided.

Comment 2 yhe 2023-05-29 07:29:52 UTC
I am going to close this Bugzilla as NOTABUG.

According to the latest update from the customer, they updated the ODF operator from 4.11.5 to 4.11.8 within 1 hour before running the oc get apirequestcounts command, and the system:serviceaccount:openshift-storage:rook-ceph-system is not shown in the oc get apirequestcounts command anymore after 1 hour.

So it seems that in 4.11.5, the old cronjobs.v1beta1.batch API was used but in 4.11.8, the old cronjobs.v1beta1.batch API is not used anymore, and the reason the system:serviceaccount:openshift-storage:rook-ceph-system was shown in the previous result is that it's less than 1 hour since the ODF operator has been updated so old apirequestcounts from 4.11.5 were included in the result.