Bug 1961081 - policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget in CMO logs
Summary: policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.8
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.8.0
Assignee: Filip Petkovski
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-17 07:55 UTC by Damien Grisonnet
Modified: 2021-07-27 23:08 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-27 23:08:44 UTC
Target Upstream Version:


Attachments (Terms of Use)
cluster-monitoring-operator pod logs (111.80 KB, text/plain)
2021-05-27 01:20 UTC, Junqi Zhao
no flags Details
apirequestcount which use poddisruptionbudgets.v1beta1.policy (11.73 KB, text/plain)
2021-05-27 01:21 UTC, Junqi Zhao
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-monitoring-operator pull 1179 0 None open Bug 1961081: update PodDisruptionBudget api version to policy/v1 2021-05-25 13:57:59 UTC
Github openshift cluster-monitoring-operator pull 1184 0 None open Bug 1961081: update pdb apiversion to v1 2021-05-27 08:18:57 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:08:57 UTC

Description Damien Grisonnet 2021-05-17 07:55:21 UTC
Description of problem:

In cluster-monitoring-operator logs, we can see warnings about the PodDisruptionBudget API group being deprecated.

```
W0517 07:46:55.596278       1 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
```

The PodDisruptionBudget manifests need to be updated to use `policy/v1` instead of the deprecated `policy/v1beta1`.

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

How reproducible:
always

Steps to Reproduce:
1. launch a 4.8 cluster
2. inspect CMO's logs

Comment 6 Junqi Zhao 2021-05-27 01:20:02 UTC
fix is in 4.8.0-0.nightly-2021-05-26-172234, issue is not fixed, I think we should also fix in CMO
# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-05-26-172234   True        False         43m     Cluster version is 4.8.0-0.nightly-2021-05-26-172234

# oc -n openshift-monitoring logs $(oc -n openshift-monitoring get po | grep cluster-monitoring-operator | awk '{print $1}') -c cluster-monitoring-operator | grep "policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1" | head -n 3
W0526 23:48:40.734867       1 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0526 23:50:20.801679       1 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget
W0526 23:55:39.439655       1 warnings.go:70] policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1 PodDisruptionBudget

# oc -n openshift-monitoring logs $(oc -n openshift-monitoring get po | grep cluster-monitoring-operator | awk '{print $1}') -c cluster-monitoring-operator | grep "policy/v1beta1 PodDisruptionBudget is deprecated in v1.21+, unavailable in v1.25+; use policy/v1" | wc -l
149

# oc api-resources | grep PodDisruptionBudget
poddisruptionbudgets                  pdb              policy/v1                                     true         PodDisruptionBudget

Comment 7 Junqi Zhao 2021-05-27 01:20:35 UTC
Created attachment 1787406 [details]
cluster-monitoring-operator pod logs

Comment 8 Junqi Zhao 2021-05-27 01:21:34 UTC
Created attachment 1787407 [details]
apirequestcount which use poddisruptionbudgets.v1beta1.policy

Comment 9 Filip Petkovski 2021-05-27 08:20:17 UTC
Thanks for the thorough review Junqi. I made further changes and ran the checks you provided in your previous comment. I did not notice any more warnings related to PDBs with the new change.

Comment 11 Junqi Zhao 2021-05-31 02:04:30 UTC
no warnings about the PodDisruptionBudget API group being deprecated now
# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-05-29-114625   True        False         129m    Cluster version is 4.8.0-0.nightly-2021-05-29-114625

# oc -n openshift-monitoring logs $(oc -n openshift-monitoring get po | grep cluster-monitoring-operator | awk '{print $1}') -c cluster-monitoring-operator | grep -i deprecated
no result

Comment 14 errata-xmlrpc 2021-07-27 23:08:44 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.8.2 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:2438


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