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

Monitoring operator is not checking if resource exists before attempting to remove it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.16.0
    • Monitoring
    • None
    • Low
    • No
    • MON Sprint 252, MON Sprint 253
    • 2
    • False
    • Hide

      None

      Show
      None

      Description of problem:

          When user projects monitoring feature is turned off the operator is cleaning up resources for user project monitoring, running multiple delete requests to apiserver.
      This has several drawbacks:
      * API Server can't cache DELETE requests, so it has to request etcd every time
      * Audit log is flooded with "delete failed: object 'foo' not found" record
      
      The function should first check that the object exists (GET requests are cachable) before issuing a DELETE request

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

          4.16.0

      How reproducible:

          Always

      Steps to Reproduce:

          1. Start 4.16.0
          2. Check audit log
          3.
          

      Actual results:

          Audit log has messages like:
      configmaps "serving-certs-ca-bundle" not found
      servicemonitors.monitoring.coreos.com "thanos-ruler" not found
      
      printed every few minutes

      Expected results:

          No failed delete requests

      Additional info:

          

            mariofer@redhat.com Mario Fernandez Herrero
            vrutkovs@redhat.com Vadim Rutkovsky
            Junqi Zhao Junqi Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: