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

Filters pruning `.log_type` and `.message` should be rejected.

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • NEW
    • NEW
    • Release Note Not Required
    • Log Collection - Sprint 257
    • Moderate

      Description of problem:

      In logging 5.9, the filters that prune `.log_type` and `.message` are rejected(and if the output is google cloud logging, pruning `.hostname` is rejected too), but in logging 6.0, the filters are accepted:

      apiVersion: observability.openshift.io/v1
      kind: ClusterLogForwarder
      metadata:
        creationTimestamp: "2024-07-22T07:32:42Z"
        generation: 2
        name: clf-51974
        namespace: e2e-test-log-accept-7z6qw
        resourceVersion: "184839"
        uid: 0b9b820c-6927-4e4e-862c-0d19e9b447d5
      spec:
        filters:
        - name: prune-logs
          prune:
            in:
            - .log_type
            - .message
          type: prune
        managementState: Managed
        outputs:
        - cloudwatch:
            authentication:
              awsAccessKey:
                keyID:
                  key: aws_access_key_id
                  secretName: logging-51974-e4e98yaf
                keySecret:
                  key: aws_secret_access_key
                  secretName: logging-51974-e4e98yaf
              type: awsAccessKey
            groupName: logging-51974-qitang-wsdd6.{.log_type||"none-typed-logs"}
            region: us-east-2
            tuning:
              compression: none
            url: ""
          name: cloudwatch
          type: cloudwatch
        pipelines:
        - filterRefs:
          - prune-logs
          inputRefs:
          - infrastructure
          - audit
          - application
          name: to-cloudwatch
          outputRefs:
          - cloudwatch
        serviceAccount:
          name: cloudwatch-m0mf6zyi
      status:
        conditions:
        - lastTransitionTime: "2024-07-22T07:32:42Z"
          message: 'permitted to collect log types: [application audit infrastructure]'
          reason: ClusterRolesExist
          status: "True"
          type: observability.openshift.io/Authorized
        - lastTransitionTime: "2024-07-22T07:32:42Z"
          message: ""
          reason: ValidationSuccess
          status: "True"
          type: observability.openshift.io/Valid
        - lastTransitionTime: "2024-07-22T07:32:47Z"
          message: ""
          reason: ReconciliationComplete
          status: "True"
          type: Ready
        filtersStatus:
        - lastTransitionTime: "2024-07-22T07:35:47Z"
          message: filter valid
          reason: ValidationSuccess
          status: "True"
          type: observability.openshift.io/ValidFilter-prune-logs
        inputsStatus:
        - lastTransitionTime: "2024-07-22T07:35:47Z"
          message: input "infrastructure" is valid
          reason: ValidationSuccess
          status: "True"
          type: observability.openshift.io/ValidInput-infrastructure
        - lastTransitionTime: "2024-07-22T07:35:47Z"
          message: input "audit" is valid
          reason: ValidationSuccess
          status: "True"
          type: observability.openshift.io/ValidInput-audit
        - lastTransitionTime: "2024-07-22T07:35:47Z"
          message: input "application" is valid
          reason: ValidationSuccess
          status: "True"
          type: observability.openshift.io/ValidInput-application
        outputsStatus:
        - lastTransitionTime: "2024-07-22T07:32:42Z"
          message: output "cloudwatch" is valid
          reason: ValidationSuccess
          status: "True"
          type: observability.openshift.io/ValidOutput-cloudwatch
        pipelinesStatus:
        - lastTransitionTime: "2024-07-22T07:32:42Z"
          message: pipeline valid
          reason: ValidationSuccess
          status: "True"
          type: observability.openshift.io/ValidPipeline-to-cloudwatch 

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

      cluster-logging.v6.0.0 

      How reproducible:

      Always

      Steps to Reproduce:

      1. Add below filter to CLF:

        - name: prune-logs
          prune:
            in:
            - .log_type
            - .message
          type: prune

      2. Check CLF status

      Actual results:

      No validation failure

      Expected results:

      The filter should be rejected

      Additional info:

      Logging 5.9 task: https://issues.redhat.com/browse/LOG-5132

              jcantril@redhat.com Jeffrey Cantrill
              qitang@redhat.com Qiaoling Tang
              Qiaoling Tang Qiaoling Tang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: