1. On a 4.9 cluster launched by bot with the PR, use a deprecated API, $ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.9.0-0.ci.test-2021-12-13-111902-ci-ln-yjsq6b2-latest True False 10m Cluster version is 4.9.0-0.ci.test-2021-12-13-111902-ci-ln-yjsq6b2-latest 2. Get current apirequestcount of horizontalpodautoscalers.v2beta1.autoscaling: $ oc get apirequestcount/horizontalpodautoscalers.v2beta1.autoscaling NAME REMOVEDINRELEASE REQUESTSINCURRENTHOUR REQUESTSINLAST24H horizontalpodautoscalers.v2beta1.autoscaling 1 4 3. Try to access the deprecated API horizontalpodautoscalers.v2beta1.autoscaling ... $ oc get horizontalpodautoscalers.v2beta1.autoscaling W1213 20:08:53.430912 1614951 warnings.go:70] autoscaling/v2beta1 HorizontalPodAutoscaler is deprecated in v1.22+, unavailable in v1.25+; use autoscaling/v2beta2 HorizontalPodAutoscaler No resources found in default namespace. ---------------------------------- 4. After 1 hour(s) later, check the deprecated apirequestcount of horizontalpodautoscalers.v2beta1.autoscaling, no longer has count > 0 for the deprecated API. $ oc get apirequestcount/horizontalpodautoscalers.v2beta1.autoscaling NAME REMOVEDINRELEASE REQUESTSINCURRENTHOUR REQUESTSINLAST24H horizontalpodautoscalers.v2beta1.autoscaling 0 12 ---------------------------------- After 2 hour(s) later, check the deprecated apirequestcount of horizontalpodautoscalers.v2beta1.autoscaling ... $ oc get apirequestcount/horizontalpodautoscalers.v2beta1.autoscaling NAME REMOVEDINRELEASE REQUESTSINCURRENTHOUR REQUESTSINLAST24H horizontalpodautoscalers.v2beta1.autoscaling 0 20 ---------------------------------- 5. Delete apiresourcecounts/horizontalpodautoscalers.v2beta1.autoscaling . Observe that it does not get recreated. (wait at least 5 min) Mon 13 Dec 2021 10:09:04 PM CST $ oc delete apirequestcount/horizontalpodautoscalers.v2beta1.autoscaling apirequestcount.apiserver.openshift.io "horizontalpodautoscalers.v2beta1.autoscaling" deleted Mon 13 Dec 2021 10:19:05 PM CST Waiting 10 mins, check horizontalpodautoscalers.v2beta1.autoscaling again, $ oc get apirequestcount | grep "horizontalpodautoscalers.v2beta1.autoscaling" horizontalpodautoscalers.v2beta1.autoscaling 1 1 6. Invoke the deprecated API again and confirm apirequestcount/horizontalpodautoscalers.v2beta1.autoscaling gets recreated. Mon 13 Dec 2021 10:19:11 PM CST NAME REMOVEDINRELEASE REQUESTSINCURRENTHOUR REQUESTSINLAST24H $ oc get apirequestcount/horizontalpodautoscalers.v2beta1.autoscaling horizontalpodautoscalers.v2beta1.autoscaling 1 1 Above step 4 and 5 doesn't as expected.
@kewang Looks good. The horizontalpodautoscalers.v2beta1.autoscaling API, while deprecated, is still in use: - In step 2, we see that the API, though deprecated, is in use by someone. - In step 3, we see that the API will not be removed for another 3 releases, so it's OK that someone is using it.[1] - In step 6, most likely whoever was using the API as shown in step 2, is still using it. As such, your verification results are as expected for the horizontalpodautoscalers.v2beta1.autoscaling API.
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 (OpenShift Container Platform 4.9.12 bug fix 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/RHBA-2021:5214