Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-2216

Delete by query doesn't delete all the projects' logs defined in retentionPolicy

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • Logging 5.4.1
    • None
    • Log Storage
    • None
    • False
    • False
    • NEW
    • VERIFIED
    • Logging (LogExp) - Sprint 214

      Description of problem:

      Creating a clusterlogging/instance, set 2 or more namespaces in retentionPolicy.application.namespaceSpec, then check the logs in ES, only the first project's logs are removed per the minAge.

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

      elasticsearch-operator.5.4.0-68

      How reproducible:

      Always

      Steps to Reproduce:
      1. create some projects to generate logs
      2. create cl/instance with:

          logStore:
            elasticsearch:
              nodeCount: 3
              redundancyPolicy: SingleRedundancy
              resources:
                requests:
                  cpu: 1
                  memory: 2Gi
              storage:
                size: 20Gi
                storageClassName: standard
            retentionPolicy:
              application:
                maxAge: 3h
                namespaceSpec:
                - minAge: 10m
                  namespace: project-1
                - minAge: 20m
                  namespace: project-2
                - minAge: 20m
                  namespace: qitang
                pruneNamespacesInterval: 10m
              audit:
                maxAge: 1d
              infra:
                maxAge: 3h
            type: elasticsearch

      3. wait for 1 hour, check the logs in app* indices

      Actual results:

      Only the first project's logs are removed following the minAge, other projects' logs are not removed  

      Expected results:

      Additional info: 

        1. project-1.png
          project-1.png
          160 kB
        2. project-2.png
          project-2.png
          172 kB
        3. qitang.png
          qitang.png
          205 kB

            [LOG-2216] Delete by query doesn't delete all the projects' logs defined in retentionPolicy

            GitLab CEE Bot added a comment - CPaaS Service Account mentioned this issue in a merge request of openshift-logging / cpaas-config on branch openshift-logging-5.5-rhel-8_ upstream _317cf4db2bb779ce4bb25dc13941ff0c : Updated 7 upstream sources

            GitLab CEE Bot added a comment - CPaaS Service Account mentioned this issue in a merge request of openshift-logging / cpaas-config on branch openshift-logging-5.5-rhel-8_ upstream _317cf4db2bb779ce4bb25dc13941ff0c : Updated 7 upstream sources

            Test passed with quay.io/openshift-logging/elasticsearch-operator@sha256:0657520e4b2a6374df5719ccad9bd7f10cf324b0b7efcac94bf6aa9c6f93832d .

            Qiaoling Tang added a comment - Test passed with quay.io/openshift-logging/elasticsearch-operator@sha256:0657520e4b2a6374df5719ccad9bd7f10cf324b0b7efcac94bf6aa9c6f93832d .

            Hey qitang@redhat.com 

            Yes, I saw there is issue. This PR will fix it https://github.com/openshift/elasticsearch-operator/pull/843

            Sashank Agarwal (Inactive) added a comment - Hey qitang@redhat.com   Yes, I saw there is issue. This PR will fix it https://github.com/openshift/elasticsearch-operator/pull/843

            Hi sasagarw@redhat.com , I test with quay.io/openshift-logging/elasticsearch-operator@sha256:93f46a7a3ed3562b47d32f546b4852ef0017c99b7071eb0880f0a0a840925c62, the image has the fix, but the issue isn't fixed.

            Qiaoling Tang added a comment - Hi sasagarw@redhat.com , I test with quay.io/openshift-logging/elasticsearch-operator@sha256:93f46a7a3ed3562b47d32f546b4852ef0017c99b7071eb0880f0a0a840925c62, the image has the fix, but the issue isn't fixed.

              sasagarw@redhat.com Sashank Agarwal (Inactive)
              sasagarw@redhat.com Sashank Agarwal (Inactive)
              Qiaoling Tang Qiaoling Tang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: