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

spec.outputs.<output>.http.timeout is not honered when the collector type is fluentd

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • NEW
    • Hide
      Before this update, the clusterlogforwarder.spec.outputs.http.timeout parameter was not translated to the Fluentd configuration when Fluentd was used as the collector type. As a result, HTTP timeouts were not being properly configured, leading to potential issues with connection management. With this change the clusterlogforwarder.spec.outputs.http.timeout is now correctly translated to the Fluentd configuration. Fluentd will now honor the specified timeout, ensuring better handling of HTTP connections according to the user’s configuration.
      Show
      Before this update, the clusterlogforwarder.spec.outputs.http.timeout parameter was not translated to the Fluentd configuration when Fluentd was used as the collector type. As a result, HTTP timeouts were not being properly configured, leading to potential issues with connection management. With this change the clusterlogforwarder.spec.outputs.http.timeout is now correctly translated to the Fluentd configuration. Fluentd will now honor the specified timeout, ensuring better handling of HTTP connections according to the user’s configuration.
    • Bug Fix
    • Log Collection - Sprint 259, Log Collection - Sprint 260
    • Moderate

      Description of problem:

      In the API is observed that available to be defined `clusterlogforwarder.spec.outputs.http.timeout`:

      $ oc explain clusterlogforwarder.spec.outputs.http.timeout
      GROUP:      logging.openshift.io
      KIND:       ClusterLogForwarder
      VERSION:    v1
      
      FIELD: timeout <integer>
      
      DESCRIPTION:
          Timeout specifies the Http request timeout in seconds. If not set, 10secs is
          used.
      

      If the collector type is `fluentd`:

      $ oc get clusterlogging instance -o jsonpath='{.spec.collection.type}'
      fluentd
      

      And defined `clusterlogforwarder.spec.outputs.http.timeout` for an `HTTP` output:

      $ oc get clusterlogforwarder instance -o jsonpath='{.spec.outputs[?(.type=="http")]}'|jq
      {
        "http": {
          "timeout": 20
        },
        "name": "httpout-app",
        "type": "http",
        "url": "http://server.example.com"
      }
      

      The variable is not honored as it doesn't defined in the fluentd configuration generated by the operator:

      $ oc get cm collector-config -o json|jq -r '.data."fluent.conf"'
      ...
        <match **>
          @type http
          endpoint http://server.example.com
          http_method post
          content_type application/x-ndjson
      
          <buffer>
      

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

      $ oc get csv -n openshift-logging
      NAME                                      DISPLAY                            VERSION   REPLACES                                  PHASE
      cluster-logging.v5.8.4                    Red Hat OpenShift Logging          5.8.4     cluster-logging.v5.8.3                    Succeeded
      

      How reproducible:

      Always

      Steps to Reproduce:

      1. Deploy Cluster Logging 5.8 latest z version
      2. Configure clusterLogging being the collector type fluentd
        $ oc get clusterlogging instance -o jsonpath='{.spec.collection.type}'
        fluentd
        
      3. Configure in the clusterLogForwarder an output defining `spec.outputs.<output>.http.timeout`
        apiVersion: logging.openshift.io/v1
        kind: ClusterLogForwarder
        metadata:
          name: instance 
          namespace: openshift-logging 
        spec:
          outputs:
            - name: httpout-app
              type: http
              url: http://server.example.com
              http:
                timeout: 20
          pipelines:
           - name: all 
             inputRefs:
             - infrastructure
             - application
             outputRefs:
              - httpout-app
        

      Actual results:

      The `clusterlogforwarder.spec.outputs.http.timeout` is not translated to the fluentd configuration

      Expected results:

      The `clusterlogforwarder.spec.outputs.http.timeout` is translated to the fluentd configuration

            vparfono Vitalii Parfonov
            rhn-support-ocasalsa Oscar Casal Sanchez
            Qiaoling Tang Qiaoling Tang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: