Bug 1824866 - fix api deprecation warning
Summary: fix api deprecation warning
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.3.z
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.3.z
Assignee: Dan Winship
QA Contact: Weibin Liang
URL:
Whiteboard:
Depends On: 1824870
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-16 15:13 UTC by Dan Winship
Modified: 2020-05-06 12:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: One multus-related DaemonSet mistakenly used the deprecated version "extensions/v1beta1" rather than "apps/v1" in its YAML definition. Consequence: In clusters that still have the alert for deprecated API usage enabled, an alert would be logged. Fix: The DaemonSet has been updated to use the correct version name. Result: No alert
Clone Of:
: 1824870 (view as bug list)
Environment:
Last Closed: 2020-05-06 12:59:44 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift cluster-network-operator pull 598 None closed Bug 1824866: [release-4.3] Fix dhcp daemon api version 2020-05-04 14:17:07 UTC

Description Dan Winship 2020-04-16 15:13:55 UTC
If you use one of the multus-y features that enables the DHCP daemon, you'll get prometheus alerts about using deprecated APIs

Comment 4 zhaozhanqi 2020-04-24 07:05:36 UTC
The fixed PR https://github.com/openshift/cluster-network-operator/pull/598 still not in the latest nightly build openshift-release.svc.ci.openshift.org/releasestream/4.3.0-0.nightly/release/4.3.0-0.nightly-2020-04-23-225015 yet.

Comment 6 Dan Winship 2020-05-04 16:15:10 UTC
For some reason 4.3.18 was built with an out-of-date CNO? (It was built on 4/28 but has a version of CNO from early morning on 4/19).

The 4.3 nightlies have the fix so it should be in 4.3.19...

Comment 8 Dan Winship 2020-05-06 12:59:44 UTC
OK, it appears that the apiserver in 4.3 stores DaemonSets as "extensions/v1beta1" regardless of how they're created:

danw@p50:~> oc get ds --all-namespaces -o yaml|grep ^..apiVersion
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1
- apiVersion: extensions/v1beta1

However, it *does* have the fix:

danw@p50:~> oc rsh -n openshift-network-operator network-operator-6c854f4855-f7k2t head -5 /bindata/network/multus/003-dhcp-daemon.yaml
{{if .RenderDHCP}}
apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: dhcp-daemon


whatever. The alert no longer exists any more anyway so the fix wasn't even necessary.


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