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

Prune filter defined without prunefilterspec segfaults

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Before this update, a prune filter without a pruneFilterSpec defined would cause a segfault. With this update, a validation error will be raised and CLO will not segfault.
    • Bug Fix
    • Log Collection - Sprint 251, Log Collection - Sprint 252

      Description of problem:

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

      How reproducible:

      apiVersion: logging.openshift.io/v1
      kind: ClusterLogForwarder
      metadata:
        name: instance
        namespace: openshift-logging
      spec:
        filters:
        - name: prune-meta
          type: prune
        pipelines:
        - filterRefs:
          - prune-meta
          inputRefs:
          - application
          name: application-logs
          outputRefs:
          - default
      

      Note: My original submission included "in" section but without "PruneFilterSpec

      Steps to Reproduce:

      1. ...

      Actual results:

      goroutine 421 [running]:
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
      	/opt/app-root/src/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.17.1/pkg/internal/controller/controller.go:116 +0x1fa
      panic({0x195a8a0, 0x2b4ae60})
      	/usr/lib/golang/src/runtime/panic.go:884 +0x213
      github.com/openshift/cluster-logging-operator/internal/validations/clusterlogforwarder.validatePruneFilter(0xc002d6c970, 0xc002c80528)
      	/opt/apt-root/src/internal/validations/clusterlogforwarder/validate_filters.go:77 +0x3d
      

      Expected results:

      • validation error and CLF rejected

        Additional info:

            rh-ee-calee Calvin Lee
            jcantril@redhat.com Jeffrey Cantrill
            Qiaoling Tang Qiaoling Tang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: