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

Collector pods are in CrashLoopBackOff after adding `drop[].test[].field: .kubernetes.labels.test.logging.io/logging.qe-test-label` to a drop filter.

XMLWordPrintable

    • False
    • Hide

      None

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

      Description of problem:

      Adding below filters to the pipeline, CLF doesn't raise any validation error, but collector pods are in CrashLoopBackOff status:

          filters:
          - drop:
            - test:
              - field: .log_type
                matches: application
              - field: .kubernetes.labels.test.logging.io/logging.qe-test-label
                matches: .+
            name: drop-logs
            type: drop 

      Vector pods:

      $ oc logs clf-51974-6mz6b 
      Creating the directory used for persisting Vector state /var/lib/vector/e2e-test-log-accept-7ltxl/clf-51974
      Checking for buffer lock files
      /var/lib/vector/e2e-test-log-accept-7ltxl/clf-51974 /usr/bin
      found lock files: ''
      /usr/bin
      Starting Vector process...
      2024-07-22T07:10:00.901957Z  WARN transform{component_kind="transform" component_id=pipeline_to_cloudwatch_drop_logs_2 component_type=filter}: vrl::compiler::unused_expression_checker: unexpected identifier `logging` reported as used
      2024-07-22T07:10:00.901990Z  WARN transform{component_kind="transform" component_id=pipeline_to_cloudwatch_drop_logs_2 component_type=filter}: vrl::compiler::unused_expression_checker: unexpected identifier `test` reported as used
      2024-07-22T07:10:00.901996Z  WARN transform{component_kind="transform" component_id=pipeline_to_cloudwatch_drop_logs_2 component_type=filter}: vrl::compiler::unused_expression_checker: unexpected identifier `label` reported as used
      2024-07-22T07:10:01.314911Z ERROR vector::topology::builder: Configuration error. error=Transform "pipeline_to_cloudwatch_drop_logs_2": 
      error[E701]: call to undefined variable
        ┌─ :1:81
        │
      1 │ !((match(.log_type, r'application') && match(.kubernetes.labels.test.logging.io/logging.qe-test-label, r'.+') ?? false))
        │                                                                                 ^^^^^^^
        │                                                                                 │
        │                                                                                 undefined variable
        │                                                                                 did you mean "null"?
        │
        = see language documentation at https://vrl.dev
        = try your code in the VRL REPL, learn more at https://vrl.dev/examples
      
      $ oc get pod
      NAME                           READY   STATUS             RESTARTS      AGE
      clf-51974-6mz6b                0/1     Error              3 (52s ago)   103s
      clf-51974-jx99b                0/1     CrashLoopBackOff   3 (17s ago)   103s
      clf-51974-nll6s                0/1     CrashLoopBackOff   3 (13s ago)   103s
      clf-51974-qhqwn                0/1     CrashLoopBackOff   3 (20s ago)   102s
      clf-51974-s42vg                0/1     CrashLoopBackOff   3 (15s ago)   103s
      clf-51974-vs894                0/1     CrashLoopBackOff   3 (14s ago)   103s 

      vector.toml

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

      cluster-logging.v6.0.0

      How reproducible:

      Always

      Steps to Reproduce:

      1. Add above filter to CLF and add it into a pipeline
      2. Check collector pods status

      Actual results:

      collector pods are in CrashLoopBackOff status

      Expected results:

      If it's a valid filter, collector pods should start without error, if it's an invalid filter, CLF should reject it.

      Additional info:

      No error when adding below filter:

          filters:
          - drop:
            - test:
              - field: .log_type
                matches: application
              - field: .kubernetes.labels."test.logging.io/logging.qe-test-label"
                matches: .+
            name: drop-logs
            type: drop 

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

                Created:
                Updated:
                Resolved: