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

[Logging 5.6.0]CLF raises 'invalid: unrecognized outputs: [default]' after adding `default` to outputRefs.

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Before this change the reconciliation of the clusterlogforwarder would incorrectly report a degraded status of pipelines that reference the default logstore. This fixes that issue by properly validating the pipeline.
    • Bug Fix
    • Done
    • Log Collection - Sprint 230, Log Collection - Sprint 231

      Description of problem:

      After adding `default` to outputRefs, the CLF raises below failure:

          conditions:
          - lastTransitionTime: "2023-01-06T05:46:22Z"
            message: 'degraded pipelines: invalid [], degraded [forward-to-external-es]'
            reason: Invalid
            status: "True"
            type: Degraded
          - lastTransitionTime: "2023-01-06T05:46:22Z"
            message: Some pipelines are degraded or invalid
            reason: Invalid
            status: "True"
            type: Ready
      
          pipelines:
            forward-to-external-es:
            - lastTransitionTime: "2023-01-06T05:46:22Z"
              message: 'invalid: unrecognized outputs: [default]'
              reason: Invalid
              status: "True"
              type: Degraded

      Logs in CLO:

      E0106 05:45:57.984521       1 event.go:337] Unsupported event type: 'Error'
      E0106 05:46:10.168678       1 event.go:337] Unsupported event type: 'Error'
      {"_ts":"2023-01-06T05:46:10.174033658Z","_level":"0","_component":"cluster-logging-operator","_message":"clusterlogforwarder-controller error updating status","_error":{"msg":"Operation cannot be fulfilled on clusterlogforwarders.logging.openshift.io \"instance\": the object has been modified; please apply your changes to the latest version and try again"}}
      E0106 05:46:22.357475       1 event.go:337] Unsupported event type: 'Error'
      E0106 05:46:34.532686       1 event.go:337] Unsupported event type: 'Error'
      {"_ts":"2023-01-06T05:46:34.53823159Z","_level":"0","_component":"cluster-logging-operator","_message":"clusterlogforwarder-controller error updating status","_error":{"msg":"Operation cannot be fulfilled on clusterlogforwarders.logging.openshift.io \"instance\": the object has been modified; please apply your changes to the latest version and try again"}}
      E0106 05:46:46.695647       1 event.go:337] Unsupported event type: 'Error'
      E0106 05:46:58.898357       1 event.go:337] Unsupported event type: 'Error'
      E0106 05:47:11.087465       1 event.go:337] Unsupported event type: 'Error'
      E0106 05:47:23.269888       1 event.go:337] Unsupported event type: 'Error' 

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

      cluster-logging.5.6.0

      How reproducible:

      Always

      Steps to Reproduce:

      1. deploy an external ES server
      2. deploy clusterlogging:
      apiVersion: logging.openshift.io/v1
      kind: ClusterLogging
      metadata:
        name: instance
        namespace: openshift-logging
      spec:
        collection:
          type: vector
        logStore:
          elasticsearch:
            nodeCount: 1
            redundancyPolicy: ZeroRedundancy
            resources:
              requests:
                memory: 2Gi
            storage: {}
          retentionPolicy:
            application:
              maxAge: 3h
            audit:
              maxAge: 3h
            infra:
              maxAge: 3h
          type: elasticsearch
        managementState: Managed
        visualization:
          kibana:
            replicas: 1
          type: kibana 

      3. create CLF with:

      apiVersion: logging.openshift.io/v1
      kind: ClusterLogForwarder
      metadata:
        name: instance
        namespace: openshift-logging
      spec:
        outputs:
        - name: es-created-by-user
          type: elasticsearch
          url: http://elasticsearch-server.e2e-test-vector-es-namespace-6bpck.svc:9200
        pipelines:
        - inputRefs:
          - infrastructure
          - application
          - audit
          name: forward-to-external-es
          outputRefs:
          - es-created-by-user 

      4. check CLF status, no issue

      5. add `default` to `outputRefs`:

          pipelines:
          - inputRefs:
            - infrastructure
            - application
            - audit
            name: forward-to-external-es
            outputRefs:
            - es-created-by-user
            - default 

      6. check CLF status again

      Actual results:

      Pipeline turns to degraded after adding `default` to pipeline's outputRefs, and collector pods keep being recreated.

      Expected results:

      Pipeline should be ready.

      Additional info:

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

              Created:
              Updated:
              Resolved: