Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-29288

Ensure proper deprecation for the default field manager in CNO

XMLWordPrintable

    • Important
    • No
    • SDN Sprint 249, SDN Sprint 250
    • 2
    • False
    • Hide

      None

      Show
      None
    • Risk is under evaluation, but applies to all deployments. Set severity to 'important'

      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:

          

            pepalani@redhat.com Periyasamy Palanichamy
            npinaeva@redhat.com Nadia Pinaeva
            Jean Chen Jean Chen
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: