-
Bug
-
Resolution: Done-Errata
-
Critical
-
4.12
Description of problem:
We deprecated the default field manager in CNO, but it is still used by default calls like Patch(). We need to update all calls to use explicit fieldManager, and add a test to verify deprecated managers are not used.
Since 4.14 https://github.com/openshift/cluster-network-operator/commit/db57a477b10f517bc4ae501d95cc7b8398a8755c#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6R31 (more specifically, since sigs.k8s.io/controller-runtime bump) we were exposed to this bug https://github.com/kubernetes-sigs/controller-runtime/pull/2435/commits/a6b9c0b672c77a79fff4d5bc03221af1e1fe21fa which made the default fieldManager to be "Go-http-client" instead of "cluster-network-operator".
It means, that "cluster-network-operator" deprecation doesn't really work, since the manager is called differently. Manager name, when unset, is coming from https://github.com/kubernetes/kubernetes/blob/b85c9bbf1ac911a2a2aed2d5c1f5eaf5956cc199/staging/src/k8s.io/client-go/rest/config.go#L498 and then is cropped https://github.com/openshift/cluster-network-operator/blob/5f18e4231f291bf5a01812974b0b4dff19c77f2c/vendor/k8s.io/apiserver/pkg/endpoints/handlers/create.go#L253-L260.
Identified changes needed (may be more):
- (status *StatusManager) setAnnotation
- mysterious message for the newly created clusters only (didn't see on CI runs, only seen once)
`Depreciated field manager cluster-network-operator for object "operator.openshift.io/v1, Kind=Network" cluster`
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Check CNO logs for deprecated field manager logs 2. oc logs -l name=network-operator --tail=-1 -n openshift-network-operator|grep "Depreciated field manager" 3.
Actual results:
Expected results:
Additional info:
- causes
-
OCPBUGS-42189 cluster-network-operator failing to start metrics server on port 8080
- Verified
- relates to
-
OCPBUGS-28920 OCP 4.13.30 - allow-from-ingress NetworkPolicy does not consistently allow traffic from HostNetworked pods or from node IP's (packet timeout)
- Closed
- links to
-
RHEA-2024:0041 OpenShift Container Platform 4.16.z bug fix update